[arch-commits] Commit in python-pytorch/repos (6 files)

2020-07-25 Thread Antonio Rojas via arch-commits
Date: Saturday, July 25, 2020 @ 21:38:39
  Author: arojas
Revision: 665295

archrelease: copy trunk to community-staging-x86_64

Added:
  python-pytorch/repos/community-staging-x86_64/
  python-pytorch/repos/community-staging-x86_64/PKGBUILD
(from rev 665294, python-pytorch/trunk/PKGBUILD)
  python-pytorch/repos/community-staging-x86_64/fix_include_system.patch
(from rev 665294, python-pytorch/trunk/fix_include_system.patch)
  python-pytorch/repos/community-staging-x86_64/nccl_version.patch
(from rev 665294, python-pytorch/trunk/nccl_version.patch)
  python-pytorch/repos/community-staging-x86_64/use-system-libuv.patch
(from rev 665294, python-pytorch/trunk/use-system-libuv.patch)
  python-pytorch/repos/community-staging-x86_64/use-system-libuv2.patch
(from rev 665294, python-pytorch/trunk/use-system-libuv2.patch)

--+
 PKGBUILD |  178 +
 fix_include_system.patch |   11 ++
 nccl_version.patch   |   46 +++
 use-system-libuv.patch   |   13 +++
 use-system-libuv2.patch  |   13 +++
 5 files changed, 261 insertions(+)

Copied: python-pytorch/repos/community-staging-x86_64/PKGBUILD (from rev 
665294, python-pytorch/trunk/PKGBUILD)
===
--- community-staging-x86_64/PKGBUILD   (rev 0)
+++ community-staging-x86_64/PKGBUILD   2020-07-25 21:38:39 UTC (rev 665295)
@@ -0,0 +1,178 @@
+# Maintainer: Sven-Hendrik Haase 
+# Contributor: Stephen Zhang 
+
+pkgbase=python-pytorch
+pkgname=("python-pytorch" "python-pytorch-opt" "python-pytorch-cuda" 
"python-pytorch-opt-cuda")
+_pkgname="pytorch"
+pkgver=1.6.0rc6
+_pkgver=1.6.0-rc6
+pkgrel=2
+pkgdesc="Tensors and Dynamic neural networks in Python with strong GPU 
acceleration"
+arch=('x86_64')
+url="https://pytorch.org;
+license=('BSD')
+depends=('google-glog' 'gflags' 'opencv' 'openmp' 'nccl' 'pybind11' 'python' 
'python-yaml' 'libuv'
+ 'python-numpy' 'protobuf' 'ffmpeg' 'python-future' 'qt5-base' 
'onednn' 'intel-mkl')
+makedepends=('python' 'python-setuptools' 'python-yaml' 'python-numpy' 'cmake' 
'cuda'
+ 'cudnn' 'git' 'magma' 'ninja' 'pkgconfig' 'doxygen')
+source=("${_pkgname}-${pkgver}::git+https://github.com/pytorch/pytorch.git#tag=v$_pkgver;
+fix_include_system.patch
+use-system-libuv.patch
+use-system-libuv2.patch
+nccl_version.patch)
+sha256sums=('SKIP'
+'147bdaeac8ec46ea46382e6146878bd8f8d51e05d5bd6f930dfd8e2b520859b9'
+'6f3b7a87172011de810bf1ab581245b4463ef86e5cd09bec63aeffa372e26646'
+'7b65c3b209fc39f92ba58a58be6d3da40799f1922910b1171ccd9209eda1f9eb'
+'1a276bd827a0c76dab908cbc6605fa4c9fc2cc2b9431b6578a41133ae27dba2b')
+
+prepare() {
+  cd "${_pkgname}-${pkgver}"
+
+  # This is the lazy way since pytorch has sooo many submodules and they keep
+  # changing them around but we've run into more problems so far doing it the
+  # manual than the lazy way. This lazy way (not explicitly specifying all
+  # submodules) will make building inefficient but for now I'll take it.
+  # It will result in the same package, don't worry.
+  git submodule update --init --recursive
+
+  # https://bugs.archlinux.org/task/64981
+  patch -N torch/utils/cpp_extension.py "${srcdir}"/fix_include_system.patch
+
+  # Use system libuv
+  patch -Np1 -i "${srcdir}"/use-system-libuv.patch
+  patch -Np1 -i "${srcdir}"/use-system-libuv2.patch -d third_party/tensorpipe
+
+  # FindNCCL patch to export correct nccl version
+  patch -Np1 -i "${srcdir}"/nccl_version.patch
+
+  # remove local nccl
+  rm -rf third_party/nccl/nccl
+
+  cd ..
+
+  cp -a "${_pkgname}-${pkgver}" "${_pkgname}-${pkgver}-opt"
+  cp -a "${_pkgname}-${pkgver}" "${_pkgname}-${pkgver}-cuda"
+  cp -a "${_pkgname}-${pkgver}" "${_pkgname}-${pkgver}-opt-cuda"
+
+  export VERBOSE=1
+  export PYTORCH_BUILD_VERSION="${pkgver}"
+  export PYTORCH_BUILD_NUMBER=1
+
+  # Check tools/setup_helpers/cmake.py, setup.py and CMakeLists.txt for a list 
of flags that can be set via env vars.
+  export USE_MKLDNN=ON
+  # export BUILD_CUSTOM_PROTOBUF=OFF
+  # export BUILD_SHARED_LIBS=OFF
+  export USE_FFMPEG=ON
+  export USE_GFLAGS=ON
+  export USE_GLOG=ON
+  export BUILD_BINARY=ON
+  export USE_OPENCV=ON
+  export USE_SYSTEM_NCCL=ON
+  export NCCL_VERSION=$(pkg-config nccl --modversion)
+  export NCCL_VER_CODE=$(sed -n 's/^#define NCCL_VERSION_CODE\s*\(.*\).*/\1/p' 
/usr/include/nccl.h)
+  export CUDAHOSTCXX=g++-9
+  export CUDA_HOME=/opt/cuda
+  export CUDNN_LIB_DIR=/usr/lib
+  export CUDNN_INCLUDE_DIR=/usr/include
+  export TORCH_NVCC_FLAGS="-Xfatbin -compress-all"
+  export 
TORCH_CUDA_ARCH_LIST="5.2;5.3;6.0;6.0+PTX;6.1;6.1+PTX;6.2;6.2+PTX;7.0;7.0+PTX;7.2;7.2+PTX;7.5;7.5+PTX;8.0;8.0+PTX;"
+}
+
+build() {
+  echo "Building without cuda and without non-x86-64 optimizations"
+  export USE_CUDA=0
+  export USE_CUDNN=0
+  cd 

[arch-commits] Commit in python-pytorch/repos (6 files)

2020-07-12 Thread Sven-Hendrik Haase via arch-commits
Date: Monday, July 13, 2020 @ 05:52:23
  Author: svenstaro
Revision: 663401

archrelease: copy trunk to community-testing-x86_64

Added:
  python-pytorch/repos/community-testing-x86_64/
  python-pytorch/repos/community-testing-x86_64/PKGBUILD
(from rev 663400, python-pytorch/trunk/PKGBUILD)
  python-pytorch/repos/community-testing-x86_64/fix_include_system.patch
(from rev 663400, python-pytorch/trunk/fix_include_system.patch)
  python-pytorch/repos/community-testing-x86_64/nccl_version.patch
(from rev 663400, python-pytorch/trunk/nccl_version.patch)
  python-pytorch/repos/community-testing-x86_64/use-system-libuv.patch
(from rev 663400, python-pytorch/trunk/use-system-libuv.patch)
  python-pytorch/repos/community-testing-x86_64/use-system-libuv2.patch
(from rev 663400, python-pytorch/trunk/use-system-libuv2.patch)

--+
 PKGBUILD |  182 +
 fix_include_system.patch |   11 ++
 nccl_version.patch   |   46 +++
 use-system-libuv.patch   |   13 +++
 use-system-libuv2.patch  |   13 +++
 5 files changed, 265 insertions(+)

Copied: python-pytorch/repos/community-testing-x86_64/PKGBUILD (from rev 
663400, python-pytorch/trunk/PKGBUILD)
===
--- community-testing-x86_64/PKGBUILD   (rev 0)
+++ community-testing-x86_64/PKGBUILD   2020-07-13 05:52:23 UTC (rev 663401)
@@ -0,0 +1,182 @@
+# Maintainer: Sven-Hendrik Haase 
+# Contributor: Stephen Zhang 
+
+pkgbase=python-pytorch
+pkgname=("python-pytorch" "python-pytorch-opt" "python-pytorch-cuda" 
"python-pytorch-opt-cuda")
+_pkgname="pytorch"
+pkgver=1.6.0rc3
+_pkgver=1.6.0-rc3
+pkgrel=1
+pkgdesc="Tensors and Dynamic neural networks in Python with strong GPU 
acceleration"
+arch=('x86_64')
+url="https://pytorch.org;
+license=('BSD')
+depends=('google-glog' 'gflags' 'opencv' 'openmp' 'nccl' 'pybind11' 'python' 
'python-yaml'
+ 'python-numpy' 'protobuf' 'ffmpeg' 'python-future' 'qt5-base' 
'onednn' 'intel-mkl')
+makedepends=('python' 'python-setuptools' 'python-yaml' 'python-numpy' 'cmake' 
'cuda'
+ 'cudnn' 'git' 'magma' 'ninja' 'pkgconfig' 'doxygen')
+source=("${_pkgname}-${pkgver}::git+https://github.com/pytorch/pytorch.git#tag=v$_pkgver;
+fix_include_system.patch
+use-system-libuv.patch
+use-system-libuv2.patch
+nccl_version.patch)
+sha256sums=('SKIP'
+'147bdaeac8ec46ea46382e6146878bd8f8d51e05d5bd6f930dfd8e2b520859b9'
+'6f3b7a87172011de810bf1ab581245b4463ef86e5cd09bec63aeffa372e26646'
+'7b65c3b209fc39f92ba58a58be6d3da40799f1922910b1171ccd9209eda1f9eb'
+'1a276bd827a0c76dab908cbc6605fa4c9fc2cc2b9431b6578a41133ae27dba2b')
+
+get_pyver () {
+  python -c 'import sys; print(str(sys.version_info[0]) + "." + 
str(sys.version_info[1]))'
+}
+
+prepare() {
+  cd "${_pkgname}-${pkgver}"
+
+  # This is the lazy way since pytorch has sooo many submodules and they keep
+  # changing them around but we've run into more problems so far doing it the
+  # manual than the lazy way. This lazy way (not explicitly specifying all
+  # submodules) will make building inefficient but for now I'll take it.
+  # It will result in the same package, don't worry.
+  git submodule update --init --recursive
+
+  # https://bugs.archlinux.org/task/64981
+  patch -N torch/utils/cpp_extension.py "${srcdir}"/fix_include_system.patch
+
+  # Use system libuv
+  patch -Np1 -i "${srcdir}"/use-system-libuv.patch
+  patch -Np1 -i "${srcdir}"/use-system-libuv2.patch -d third_party/tensorpipe
+
+  # FindNCCL patch to export correct nccl version
+  patch -Np1 -i "${srcdir}"/nccl_version.patch
+
+  # remove local nccl
+  rm -rf third_party/nccl/nccl
+
+  cd ..
+
+  cp -a "${_pkgname}-${pkgver}" "${_pkgname}-${pkgver}-opt"
+  cp -a "${_pkgname}-${pkgver}" "${_pkgname}-${pkgver}-cuda"
+  cp -a "${_pkgname}-${pkgver}" "${_pkgname}-${pkgver}-opt-cuda"
+
+  export VERBOSE=1
+  export PYTORCH_BUILD_VERSION="${pkgver}"
+  export PYTORCH_BUILD_NUMBER=1
+
+  # Check tools/setup_helpers/cmake.py, setup.py and CMakeLists.txt for a list 
of flags that can be set via env vars.
+  export USE_MKLDNN=ON
+  # export BUILD_CUSTOM_PROTOBUF=OFF
+  # export BUILD_SHARED_LIBS=OFF
+  export USE_FFMPEG=ON
+  export USE_GFLAGS=ON
+  export USE_GLOG=ON
+  export BUILD_BINARY=ON
+  export USE_OPENCV=ON
+  export USE_SYSTEM_NCCL=ON
+  export NCCL_VERSION=$(pkg-config nccl --modversion)
+  export NCCL_VER_CODE=$(sed -n 's/^#define NCCL_VERSION_CODE\s*\(.*\).*/\1/p' 
/usr/include/nccl.h)
+  export CUDAHOSTCXX=g++-9
+  export CUDA_HOME=/opt/cuda
+  export CUDNN_LIB_DIR=/usr/lib
+  export CUDNN_INCLUDE_DIR=/usr/include
+  export TORCH_NVCC_FLAGS="-Xfatbin -compress-all"
+  export 
TORCH_CUDA_ARCH_LIST="5.2;5.3;6.0;6.0+PTX;6.1;6.1+PTX;6.2;6.2+PTX;7.0;7.0+PTX;7.2;7.2+PTX;7.5;7.5+PTX;8.0;8.0+PTX;"
+}
+
+build() {
+  echo "Building without cuda and