diff options
author | Johannes Schoepfer <slackbuilds@schoepfer.info> | 2024-05-31 22:59:33 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-06-01 02:35:03 +0700 |
commit | 17b0445e37bc674ad74ccf38b46cffb158e85411 (patch) | |
tree | 55f81aff3699439ee10af8d64b7de5dc847924d8 /libraries | |
parent | 559103643032db2d61dd820504d0533b1b3a1ece (diff) |
libraries/pytorch: Update source.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/pytorch/README | 6 | ||||
-rw-r--r-- | libraries/pytorch/pytorch.SlackBuild | 17 | ||||
-rw-r--r-- | libraries/pytorch/pytorch.info | 8 |
3 files changed, 16 insertions, 15 deletions
diff --git a/libraries/pytorch/README b/libraries/pytorch/README index 34bcd6aac5e7e..a27962167abdd 100644 --- a/libraries/pytorch/README +++ b/libraries/pytorch/README @@ -1,7 +1,3 @@ Deep neural networks built on a tape-based autograd system. -CUDA(nvidia GPU) support is untested, but might be picked up -at buildtime if the environment is present. - -Optional autodetected dependencies: -OpenBLAS || blas +This package is a library build, supporting CPU(not GPU). diff --git a/libraries/pytorch/pytorch.SlackBuild b/libraries/pytorch/pytorch.SlackBuild index 30ac0a2b9ff11..c0bffe556f3d8 100644 --- a/libraries/pytorch/pytorch.SlackBuild +++ b/libraries/pytorch/pytorch.SlackBuild @@ -26,6 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=pytorch VERSION=${VERSION:-2.3.0} +VERSION_SIX=1.11.0 BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -74,6 +75,10 @@ cd $PRGNAM-v$VERSION chown -R root:root . chmod -R u+w,go-w,a+rX-st $PKG +# Needed for NNPACK +mkdir -p build/confu-deps/six-download/six-prefix/src/ +cp $CWD/six-$VERSION_SIX.tar.gz build/confu-deps/six-download/six-prefix/src/ + # Fix cmake libdir location sed -i c10/CMakeLists.txt \ -e "s;DESTINATION lib;DESTINATION lib$LIBDIRSUFFIX;g" @@ -85,16 +90,15 @@ sed -i "/Werror=return-type/d" CMakeLists.txt # This seems harmless as these get recompiled again locally, but it slows down the building process. # See https://github.com/icecc/icecream/issues/336 -export USE_NNPACK=0 -python3 setup.py build --cmake-only +unshare -n python3 setup.py build --cmake-only cd build unshare -n cmake \ -G Ninja \ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ - -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_INSTALL_PREFIX="/usr" \ + -DCMAKE_CXX_STANDARD=17 \ -DLIBSHM_INSTALL_LIB_SUBDIR="lib$LIBDIRSUFFIX" \ -DTORCH_INSTALL_LIB_DIR="lib$LIBDIRSUFFIX" \ -DPYTHON_EXECUTABLE=$(which python3) \ @@ -102,17 +106,16 @@ cd build -DBUILD_TEST=OFF \ -DUSE_FFMPEG=ON \ -DUSE_GOLD_LINKER=ON \ - -DUSE_NNPACK=OFF \ -DUSE_OPENCL=ON \ -DUSE_OPENCV=ON \ -DUSE_VULKAN=ON \ -DCMAKE_BUILD_TYPE=Release .. "${NINJA:=ninja}" DESTDIR=tmpxxx $NINJA install/strip - - mkdir -p $PKG/usr + + mkdir -p $PKG/usr/{share,lib$LIBDIRSUFFIX} mv tmpxxx/usr/bin $PKG/usr - mkdir -p $PKG/usr/lib$LIBDIRSUFFIX + mv tmpxxx/usr/share/cmake $PKG/usr/share mv tmpxxx/usr/lib$LIBDIRSUFFIX/*.so $PKG/usr/lib$LIBDIRSUFFIX cd .. python3 setup.py install --root=$PKG diff --git a/libraries/pytorch/pytorch.info b/libraries/pytorch/pytorch.info index 175aa944bee4b..0b01b9255a896 100644 --- a/libraries/pytorch/pytorch.info +++ b/libraries/pytorch/pytorch.info @@ -3,8 +3,10 @@ VERSION="2.3.0" 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" -MD5SUM_x86_64="786047d07da744410eb41493a1cd0687" -REQUIRES="protobuf3 typing-extensions" +DOWNLOAD_x86_64="https://github.com/pytorch/pytorch/releases/download/v2.3.0/pytorch-v2.3.0.tar.gz \ + https://pypi.io/packages/source/s/six/six-1.11.0.tar.gz" +MD5SUM_x86_64="786047d07da744410eb41493a1cd0687 \ + d12789f9baf7e9fb2524c0c64f1773f8" +REQUIRES="oneTBB protobuf3 OpenBLAS typing-extensions" MAINTAINER="Johannes Schoepfer" EMAIL="slackbuilds@schoepfer.info" |