aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgitbearflying <34683119+gitbearflying@users.noreply.github.com>2024-06-16 10:06:10 +0200
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2024-06-17 06:48:59 +0700
commit6aa5e9c05b3a0ad55b10394fc232ec5a8ef69bc8 (patch)
tree265f6def02a7eb1d4b6b204e9e37c51a50496aff
parent015514d47793f2329011db6bc364d5e2dcf83998 (diff)
libraries/pytorch: Updated for version 2.3.1
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--libraries/pytorch/boxing.patch19
-rw-r--r--libraries/pytorch/pytorch.SlackBuild10
-rw-r--r--libraries/pytorch/pytorch.info6
3 files changed, 27 insertions, 8 deletions
diff --git a/libraries/pytorch/boxing.patch b/libraries/pytorch/boxing.patch
new file mode 100644
index 0000000000..4d28fd2c8c
--- /dev/null
+++ b/libraries/pytorch/boxing.patch
@@ -0,0 +1,19 @@
+--- aten/src/ATen/core/boxing/impl/boxing.h.orig 2024-06-16 07:55:38.662684245 +0200
++++ aten/src/ATen/core/boxing/impl/boxing.h 2024-06-16 07:58:43.690715864 +0200
+@@ -39,7 +39,15 @@
+ struct has_ivalue_to : std::false_type {};
+
+ template <class T>
+-struct has_ivalue_to<T, std::void_t<decltype(std::declval<IValue>().to<T>())>>
++struct ivalue_to_helper
++{
++ using type = decltype(std::declval<IValue>().template to<T>());
++};
++template <class T>
++using ivalue_to_helper_t = typename ivalue_to_helper<T>::type;
++
++template <class T>
++struct has_ivalue_to<T, std::void_t<ivalue_to_helper_t<T>>>
+ : std::true_type
+ {};
+
diff --git a/libraries/pytorch/pytorch.SlackBuild b/libraries/pytorch/pytorch.SlackBuild
index 4e39d77ef4..4a75253f3d 100644
--- a/libraries/pytorch/pytorch.SlackBuild
+++ b/libraries/pytorch/pytorch.SlackBuild
@@ -25,9 +25,9 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=pytorch
-VERSION=${VERSION:-2.3.0}
+VERSION=${VERSION:-2.3.1}
VERSION_SIX=1.11.0
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -86,9 +86,9 @@ sed -i c10/CMakeLists.txt \
# Make Vulkan Warnings not to make the build fail
sed -i "/Werror=return-type/d" CMakeLists.txt
-# When compiled with icecream, building dnnl-mkl outputs errors like "unspellable token PRAGMA_EOL".
-# This seems harmless as these get recompiled again locally, but it slows down the building process.
-# See https://github.com/icecc/icecream/issues/336
+# Fix compilation with nvidia-cuda-toolkit-12.4.0
+# https://github.com/pytorch/pytorch/issues/122169
+patch -p0 < $CWD/boxing.patch
cd build
unshare -n cmake \
diff --git a/libraries/pytorch/pytorch.info b/libraries/pytorch/pytorch.info
index 60d772b991..474b69c3de 100644
--- a/libraries/pytorch/pytorch.info
+++ b/libraries/pytorch/pytorch.info
@@ -1,11 +1,11 @@
PRGNAM="pytorch"
-VERSION="2.3.0"
+VERSION="2.3.1"
HOMEPAGE="https://pytorch.org/"
DOWNLOAD="UNSUPPORTED"
MD5SUM=""
-DOWNLOAD_x86_64="https://github.com/pytorch/pytorch/releases/download/v2.3.0/pytorch-v2.3.0.tar.gz \
+DOWNLOAD_x86_64="https://github.com/pytorch/pytorch/releases/download/v2.3.1/pytorch-v2.3.1.tar.gz \
https://pypi.io/packages/source/s/six/six-1.11.0.tar.gz"
-MD5SUM_x86_64="786047d07da744410eb41493a1cd0687 \
+MD5SUM_x86_64="2c5e05b270b657219cd3e612ffd10e4e \
d12789f9baf7e9fb2524c0c64f1773f8"
REQUIRES="protobuf3 typing-extensions"
MAINTAINER="Johannes Schoepfer"