- updated to stable release 1.4.0, which has as Highlights:
* Distributed Model Parallel Training * Pruning functionalities have been added to PyTorch - New Features: * torch.optim.lr_scheduler now support “chaining.” * torch.distributed.rpc is a newly introduced package - full Changelog listed in relases file or under https://github.com/pytorch/pytorch/releases - added files: * skip-third-party-check.patch which is a patch to skip the check of disabled dependencies * QNNPACK-7d2a4e9931a82adc3814275b6219a03e24e36b4c.tar.gz which is part of pytorch but developed in different repo - removed patch files: * fix-build-options.patch * honor-PSIMD-env.patch * removed-some-tests.patch - Requires python-PeachPy on x86_64 only, as it is optional and available on x86_64 only OBS-URL: https://build.opensuse.org/package/show/science:machinelearning/python-torch?expand=0&rev=7
This commit is contained in:
parent
3756bcc792
commit
0a90b0a626
3
QNNPACK-7d2a4e9931a82adc3814275b6219a03e24e36b4c.tar.gz
Normal file
3
QNNPACK-7d2a4e9931a82adc3814275b6219a03e24e36b4c.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0d752bd75f46ce4d7c6f0a60b0d6c0e5918a7b4683c825284f8db3706dd24f76
|
||||
size 205600
|
@ -1,53 +0,0 @@
|
||||
From 80993cc82764264b3809847029a2d3c563148590 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Goll <cgoll@suse.de>
|
||||
Date: Wed, 12 Jun 2019 09:50:22 +0200
|
||||
Subject: [PATCH 1/2] fix build options
|
||||
|
||||
---
|
||||
CMakeLists.txt | 2 +-
|
||||
setup.py | 2 --
|
||||
tools/build_pytorch_libs.py | 2 +-
|
||||
3 files changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 71f8b69..1585d77 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -67,7 +67,7 @@ option(BUILD_ATEN_MOBILE "Build ATen for Android and iOS" OFF)
|
||||
option(BUILD_ATEN_ONLY "Build only a subset focused on ATen only" OFF)
|
||||
option(BUILD_BINARY "Build C++ binaries" OFF)
|
||||
option(BUILD_DOCS "Build Caffe2 documentation" OFF)
|
||||
-option(BUILD_CUSTOM_PROTOBUF "Build and use Caffe2's own protobuf under third_party" ON)
|
||||
+option(BUILD_CUSTOM_PROTOBUF "Build and use Caffe2's own protobuf under third_party" OFF)
|
||||
option(BUILD_PYTHON "Build Python binaries" ON)
|
||||
option(BUILD_CAFFE2_OPS "Build Caffe2 operators" ON)
|
||||
option(BUILD_SHARED_LIBS "Build libcaffe2.so" ON)
|
||||
diff --git a/setup.py b/setup.py
|
||||
index b1faf3a..9536549 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -272,8 +272,6 @@ def build_deps():
|
||||
check_file(os.path.join(third_party_path, 'cpuinfo', 'CMakeLists.txt'))
|
||||
check_file(os.path.join(third_party_path, 'onnx', 'CMakeLists.txt'))
|
||||
check_file(os.path.join(third_party_path, 'foxi', 'CMakeLists.txt'))
|
||||
- check_file(os.path.join(third_party_path, 'QNNPACK', 'CMakeLists.txt'))
|
||||
- check_file(os.path.join(third_party_path, 'fbgemm', 'CMakeLists.txt'))
|
||||
|
||||
check_pydep('yaml', 'pyyaml')
|
||||
check_pydep('typing', 'typing')
|
||||
diff --git a/tools/build_pytorch_libs.py b/tools/build_pytorch_libs.py
|
||||
index 432fed3..257e9f2 100644
|
||||
--- a/tools/build_pytorch_libs.py
|
||||
+++ b/tools/build_pytorch_libs.py
|
||||
@@ -190,7 +190,7 @@ def run_cmake(version,
|
||||
USE_QNNPACK=USE_QNNPACK,
|
||||
USE_TENSORRT=check_env_flag('USE_TENSORRT'),
|
||||
USE_FFMPEG=check_env_flag('USE_FFMPEG'),
|
||||
- USE_SYSTEM_EIGEN_INSTALL="OFF",
|
||||
+ USE_SYSTEM_EIGEN_INSTALL=True,
|
||||
USE_MKLDNN=USE_MKLDNN,
|
||||
USE_NCCL=USE_NCCL,
|
||||
NCCL_EXTERNAL=USE_NCCL,
|
||||
--
|
||||
2.16.4
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b444b4428adc4befc777d9a1af2fd9bbf5f5a2339913668357196c5133e9cc7b
|
||||
size 27632
|
3
foxi-97fe555430a857581b9b826ecd955e4f0a3653f0.tar.gz
Normal file
3
foxi-97fe555430a857581b9b826ecd955e4f0a3653f0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3b8b0dbc1b27e1de29399b942ec7258c1d4b51c2bfa3bb6876fbc14bec414f3c
|
||||
size 28548
|
3
gemmlowp-3fb5c176c17c765a3492cd2f0321b0dab712f350.tar.gz
Normal file
3
gemmlowp-3fb5c176c17c765a3492cd2f0321b0dab712f350.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:fdd6f08bdb33d33f4df516ffb91730fdb163479c19502cfc983083fd9cf43bfa
|
||||
size 826382
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e12e096e986221d96d55185e870397b3717b625d6c5d155fbd9a7be314bed06a
|
||||
size 825494
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0e98a4fdb6e27add72b4bb0e63a5ed20a9271139c3d0ccc2c15c502e3366bca3
|
||||
size 163744
|
3
gloo-7c541247a6fa49e5938e304ab93b6da661823d0f.tar.gz
Normal file
3
gloo-7c541247a6fa49e5938e304ab93b6da661823d0f.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3044a0041eab739ed94c6880d031063f1d048eaa6d89c708ef01c80aae3dfa06
|
||||
size 222514
|
@ -1,26 +0,0 @@
|
||||
From 72e66f5fa324eb2b5a38e3c69de30cc3d7a128fe Mon Sep 17 00:00:00 2001
|
||||
From: Christian Goll <cgoll@suse.de>
|
||||
Date: Wed, 12 Jun 2019 11:10:04 +0200
|
||||
Subject: [PATCH 2/2] honor PSIMD env
|
||||
|
||||
---
|
||||
tools/build_pytorch_libs.py | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tools/build_pytorch_libs.py b/tools/build_pytorch_libs.py
|
||||
index 257e9f2..3668b91 100644
|
||||
--- a/tools/build_pytorch_libs.py
|
||||
+++ b/tools/build_pytorch_libs.py
|
||||
@@ -206,7 +206,8 @@ def run_cmake(version,
|
||||
USE_REDIS=os.getenv('USE_REDIS'),
|
||||
USE_GLOG=os.getenv('USE_GLOG'),
|
||||
USE_GFLAGS=os.getenv('USE_GFLAGS'),
|
||||
- WERROR=os.getenv('WERROR'))
|
||||
+ WERROR=os.getenv('WERROR'),
|
||||
+ PSIMD_SOURCE_DIR=os.getenv('PSIMD_SOURCE_DIR'))
|
||||
|
||||
if USE_GLOO_IBVERBS:
|
||||
cmake_defines(cmake_args, USE_IBVERBS="1", USE_GLOO_IBVERBS="1")
|
||||
--
|
||||
2.16.4
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:37b42dada8b6ef7b56a2099f71257ea9717cda86c149db80c24dc006597251fa
|
||||
size 2427576
|
3
onnx-fea8568cac61a482ed208748fdc0e1a8e47f62f5.tar.gz
Normal file
3
onnx-fea8568cac61a482ed208748fdc0e1a8e47f62f5.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:90910ab142174b003f342f445a2112227c0a10945051f55352db298004bd3b1f
|
||||
size 2593140
|
@ -1,14 +1,35 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 14 13:01:33 UTC 2020 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||
Fri Feb 21 14:15:00 UTC 2020 - Christian Goll <cgoll@suse.com>
|
||||
|
||||
- Requires python-PeachPy on x86_64 only, as it is optional
|
||||
and available on x86_64 only
|
||||
- updated to stable release 1.4.0, which has as Highlights:
|
||||
* Distributed Model Parallel Training
|
||||
* Pruning functionalities have been added to PyTorch
|
||||
- New Features:
|
||||
* torch.optim.lr_scheduler now support “chaining.”
|
||||
* torch.distributed.rpc is a newly introduced package
|
||||
- full Changelog listed in relases file or under
|
||||
https://github.com/pytorch/pytorch/releases
|
||||
- added files:
|
||||
* skip-third-party-check.patch which is a patch to skip
|
||||
the check of disabled dependencies
|
||||
* QNNPACK-7d2a4e9931a82adc3814275b6219a03e24e36b4c.tar.gz
|
||||
which is part of pytorch but developed in different repo
|
||||
- removed patch files:
|
||||
* fix-build-options.patch
|
||||
* honor-PSIMD-env.patch
|
||||
* removed-some-tests.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 8 10:47:18 UTC 2020 - Christian Goll <cgoll@suse.com>
|
||||
|
||||
- updated the requirement for examples and converters
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 14 13:01:33 UTC 2020 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||
|
||||
- Requires python-PeachPy on x86_64 only, as it is optional
|
||||
and available on x86_64 only
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 12 11:17:34 UTC 2019 - Christian Goll <cgoll@suse.com>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package pytorch
|
||||
# spec file for package python-torch
|
||||
#
|
||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -13,29 +13,33 @@
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
%define srcname pytorch
|
||||
%define skip_python2 1
|
||||
%define pname torch
|
||||
|
||||
Name: python-torch
|
||||
Version: 1.1.0
|
||||
Version: 1.4.0
|
||||
Release: 0
|
||||
Summary: Deep learning framework aka pytorch/Caffe2
|
||||
License: BSD-2-Clause and BSD-3-Clause and MIT and Zlib and BSL-1.0 and Apache-2.0
|
||||
License: BSD-2-Clause AND BSD-3-Clause AND MIT AND Zlib AND BSL-1.0 AND Apache-2.0
|
||||
Group: Development/Languages/Python
|
||||
Url: https://pytorch.org
|
||||
URL: https://pytorch.org
|
||||
Source0: https://github.com/pytorch/pytorch/archive/v%{version}.tar.gz#/%{srcname}-%{version}.tar.gz
|
||||
Source1: https://github.com/pytorch/pytorch/releases
|
||||
#License10: BSD-3-Clause
|
||||
Source10: https://github.com/facebookincubator/gloo/archive/670b4d4aa46886cc66874e2a4dc846f5cfc2a285.tar.gz#/gloo-670b4d4aa46886cc66874e2a4dc846f5cfc2a285.tar.gz
|
||||
Source10: https://github.com/facebookincubator/gloo/archive/7c541247a6fa49e5938e304ab93b6da661823d0f.tar.gz#/gloo-7c541247a6fa49e5938e304ab93b6da661823d0f.tar.gz
|
||||
#License12: BSD-2-Clause
|
||||
Source12: https://github.com/pytorch/cpuinfo/archive/89fe1695edf9ee14c22f815f24bac45577a4f135.tar.gz#/cpuinfo-89fe1695edf9ee14c22f815f24bac45577a4f135.tar.gz
|
||||
#License13: BSL-1.0
|
||||
Source13: https://github.com/zdevito/sleef/archive/191f655caa25526ae226cf88dd2529265176014a.tar.gz#/sleef-191f655caa25526ae226cf88dd2529265176014a.tar.gz
|
||||
Source13: https://github.com/zdevito/sleef/archive/7f523de651585fe25cade462efccca647dcc8d02.tar.gz#/sleef-7f523de651585fe25cade462efccca647dcc8d02.tar.gz
|
||||
#License14: BSD-3-Clause
|
||||
Source14: https://github.com/pybind/pybind11/archive/25abf7efba0b2990f5a6dfb0a31bc65c0f2f4d17.tar.gz#/pybind11-25abf7efba0b2990f5a6dfb0a31bc65c0f2f4d17.tar.gz
|
||||
# License15: MIT
|
||||
Source15: https://github.com/onnx/onnx/archive/22662bfd4dcc6baebf29e3b823a051676f991001.tar.gz#/onnx-22662bfd4dcc6baebf29e3b823a051676f991001.tar.gz
|
||||
Source15: https://github.com/onnx/onnx/archive/fea8568cac61a482ed208748fdc0e1a8e47f62f5.tar.gz#/onnx-fea8568cac61a482ed208748fdc0e1a8e47f62f5.tar.gz
|
||||
#License16: BSD-2-Clause
|
||||
Source16: https://github.com/Maratyszcza/pthreadpool/archive/13da0b4c21d17f94150713366420baaf1b5a46f4.tar.gz#/pthreadpool-13da0b4c21d17f94150713366420baaf1b5a46f4.tar.gz
|
||||
# License17: MIT
|
||||
@ -45,55 +49,58 @@ Source18: https://github.com/Maratyszcza/psimd/archive/90a938f30ba414ada2f
|
||||
# License19: MIT
|
||||
Source19: https://github.com/Maratyszcza/FP16/archive/febbb1c163726b5db24bed55cc9dc42529068997.tar.gz#/FP16-febbb1c163726b5db24bed55cc9dc42529068997.tar.gz
|
||||
#License20: Apache-2.0
|
||||
Source20: https://github.com/google/gemmlowp/archive/8416bab644641a5c0a81ecf91a5cda804af0aee1.tar.gz#/gemmlowp-8416bab644641a5c0a81ecf91a5cda804af0aee1.tar.gz
|
||||
Source20: https://github.com/google/gemmlowp/archive/3fb5c176c17c765a3492cd2f0321b0dab712f350.tar.gz#/gemmlowp-3fb5c176c17c765a3492cd2f0321b0dab712f350.tar.gz
|
||||
#License21: MIT
|
||||
Source21: https://github.com/houseroad/foxi/archive/8f74bc4df3a4cfc69b1a3eadf62aa29d9961c72d.tar.gz#/foxi-8f74bc4df3a4cfc69b1a3eadf62aa29d9961c72d.tar.gz
|
||||
Patch0: fix-build-options.patch
|
||||
Patch1: removed-peachpy-depedency.patch
|
||||
Patch2: honor-PSIMD-env.patch
|
||||
Patch3: removed-some-tests.patch
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{pythons}
|
||||
BuildRequires: python-py-cpuinfo
|
||||
BuildRequires: python-pybind11-devel
|
||||
Source21: https://github.com/houseroad/foxi/archive/97fe555430a857581b9b826ecd955e4f0a3653f0.tar.gz#/foxi-97fe555430a857581b9b826ecd955e4f0a3653f0.tar.gz
|
||||
# License22: MIT
|
||||
Source22: https://github.com/pytorch/QNNPACK/archive/7d2a4e9931a82adc3814275b6219a03e24e36b4c.tar.gz#/QNNPACK-7d2a4e9931a82adc3814275b6219a03e24e36b4c.tar.gz
|
||||
|
||||
Patch0: removed-peachpy-depedency.patch
|
||||
Patch1: skip-third-party-check.patch
|
||||
|
||||
BuildRequires: %{python_module Gloo}
|
||||
%ifarch x86_64
|
||||
BuildRequires: %{python_module PeachPy}
|
||||
%endif
|
||||
BuildRequires: %{python_module opcodes}
|
||||
BuildRequires: %{python_module PyYAML}
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module future}
|
||||
BuildRequires: %{python_module hypothesis}
|
||||
BuildRequires: %{python_module leveldb}
|
||||
BuildRequires: %{python_module numpy-devel}
|
||||
BuildRequires: %{python_module opcodes}
|
||||
BuildRequires: %{python_module protobuf}
|
||||
BuildRequires: %{python_module psutil}
|
||||
BuildRequires: %{python_module rpm-macros}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module typing_extensions}
|
||||
BuildRequires: %{python_module typing}
|
||||
BuildRequires: %{python_module numpy-devel}
|
||||
BuildRequires: %{pythons}
|
||||
BuildRequires: cmake
|
||||
BuildRequires: eigen3-devel
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: glog-devel
|
||||
BuildRequires: gtest
|
||||
BuildRequires: libopenblas_pthreads-devel
|
||||
BuildRequires: libnuma-devel
|
||||
BuildRequires: lmdb-devel
|
||||
BuildRequires: leveldb-devel
|
||||
BuildRequires: ninja
|
||||
BuildRequires: libnuma-devel
|
||||
BuildRequires: libopenblas_pthreads-devel
|
||||
BuildRequires: lmdb-devel
|
||||
BuildRequires: memory-constraints
|
||||
BuildRequires: ninja
|
||||
BuildRequires: openblas-devel
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: protobuf-c
|
||||
BuildRequires: protobuf-devel
|
||||
BuildRequires: python-py-cpuinfo
|
||||
BuildRequires: python-pybind11-devel
|
||||
BuildRequires: snappy-devel
|
||||
BuildRequires: %{python_module future}
|
||||
BuildRequires: %{python_module hypothesis}
|
||||
BuildRequires: %{python_module protobuf}
|
||||
BuildRequires: %{python_module psutil}
|
||||
BuildRequires: %{python_module rpm-macros}
|
||||
BuildRequires: %{python_module leveldb}
|
||||
BuildRequires: %{python_module Gloo}
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Requires: python-future
|
||||
Requires: python-leveldb
|
||||
Requires: python-numpy
|
||||
Requires: python-protobuf
|
||||
Requires: python-six
|
||||
Requires: python-future
|
||||
Requires: python-numpy
|
||||
Requires: python-leveldb
|
||||
|
||||
Provides: python-caffe2 = %version
|
||||
Provides: python-pytorch = %version
|
||||
@ -123,9 +130,9 @@ to access the C/C++ interface.
|
||||
Summary: Converters for onnx and caffe2
|
||||
Group: Development/Languages/Python
|
||||
BuildArch: noarch
|
||||
Requires: python3-pip
|
||||
Requires: python3-onnx
|
||||
Requires: python3-click
|
||||
Requires: python3-onnx
|
||||
Requires: python3-pip
|
||||
Requires: python3-pname
|
||||
|
||||
%description -n pytorch-converters
|
||||
@ -142,8 +149,9 @@ Recommends: python3-networkx
|
||||
This example files can be used to start an own pytorch/caffe2 project.
|
||||
|
||||
%package -n libtorch
|
||||
Summary: Library which used by %{name}
|
||||
Group: Development/Libraries/Python
|
||||
Summary: Library which used by %{name}
|
||||
Group: Development/Libraries/Python
|
||||
|
||||
%description -n libtorch
|
||||
Library which is used by %{name}
|
||||
|
||||
@ -151,10 +159,8 @@ Library which is used by %{name}
|
||||
%define make_depend_src() test -e $(basename %1| sed 's/-.*//') && rmdir %{?2}%{!?2:$(basename %1| sed 's/-.*//')}; tar xzf %1; mv $(basename %1 | sed 's/\.tar\.gz//' ) %{?2}%{!?2:$(basename %1| sed 's/-.*//')}
|
||||
%define make_depend_src_uppercase() rmdir -p $(basename %1| sed 's/-.*//'| tr '[:upper:]' '[:lower:]'); tar xzf %1; mv $(basename %1 | cut -f 1 -d '.' ) $(basename %1| sed 's/-.*//'| tr '[:upper:]' '[:lower:]')
|
||||
%setup -q -n %{srcname}-%{version}
|
||||
%patch0 -p 1
|
||||
%patch1 -p 1
|
||||
%patch2 -p 1
|
||||
%patch3 -p 1
|
||||
cp %{S:1} releases.html
|
||||
%autopatch -p 1
|
||||
cd third_party
|
||||
rmdir python-peachpy/
|
||||
%make_depend_src %{SOURCE10}
|
||||
@ -168,49 +174,65 @@ rmdir python-peachpy/
|
||||
%make_depend_src %{SOURCE19}
|
||||
%make_depend_src %{SOURCE20} gemmlowp/gemmlowp
|
||||
%make_depend_src %{SOURCE21}
|
||||
%make_depend_src %{SOURCE22}
|
||||
# link system eigen to right place
|
||||
rmdir eigen
|
||||
ln -s /usr/include/eigen3 eigen
|
||||
cd ..
|
||||
|
||||
%build
|
||||
export NO_NNPACK=1
|
||||
export NO_QNNPACK=1
|
||||
export NO_CUDNN=1
|
||||
#export NO_DISTRIBUTED=1
|
||||
export NO_MKLDNN=1
|
||||
export NO_TEST=1
|
||||
#export CC=gcc-7
|
||||
#export CXX=g++-7
|
||||
export USE_NNPACK=0
|
||||
export USE_CUDNN=0
|
||||
export USE_TEST=0
|
||||
export USE_LEVELDB=ON
|
||||
export USE_LMDB=ON
|
||||
export BUILD_CUSTOM_PROTOBUF=OFF
|
||||
export USE_FBGEMM=0
|
||||
export PSIMD_SOURCE_DIR=%{_topdir}/BUILD/%{srcname}-%{version}/third_party/psimd/
|
||||
export USE_SYSTEM_LIB="tbb,fbgemm,fbgemm/third_party/asmjit,onnx/third_party/benchmark"
|
||||
export BUILD_CUSTOM_PROTOBUF=OFF
|
||||
export BUILD_TEST=0
|
||||
%limit_build -m 2000
|
||||
export MAX_JOBS=%{?jobs}
|
||||
%python_build
|
||||
|
||||
%install
|
||||
export USE_NNPACK=0
|
||||
export USE_CUDNN=0
|
||||
export USE_TEST=0
|
||||
export USE_LEVELDB=ON
|
||||
export USE_LMDB=ON
|
||||
export USE_FBGEMM=0
|
||||
export USE_SYSTEM_LIB="tbb,fbgemm,fbgemm/third_party/asmjit,onnx/third_party/benchmark"
|
||||
export BUILD_CUSTOM_PROTOBUF=OFF
|
||||
export BUILD_TEST=1
|
||||
%limit_build -m 2000
|
||||
export MAX_JOBS=%{?jobs}
|
||||
%python_install
|
||||
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||
|
||||
install -m 755 -D caffe2/python/examples/* -t %{buildroot}%{_docdir}/%{name}/
|
||||
install -m 644 -D %{buildroot}%{python_sitearch}/torch/lib/* %{buildroot}/%{_libdir}
|
||||
rm -r %{buildroot}%{python_sitearch}/torch/lib
|
||||
cd %{buildroot}/%{_libdir}
|
||||
rm libtorch.so
|
||||
ln -s libtorch.so.1 libtorch.so
|
||||
cd -
|
||||
for file in $(find %{buildroot}%{python_sitearch} -type f -name \*.py -perm 644 -size +1b); do
|
||||
%{__grep} '/usr/bin/env ' $file && sed -i 's@/usr/bin/env python@/usr/bin/python@' $file && chmod 755 $file
|
||||
done
|
||||
|
||||
%check
|
||||
export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}
|
||||
%python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} $python test/run_test.py
|
||||
#rm -r %{buildroot}%{python_sitearch}/torch/lib
|
||||
#cd %{buildroot}/%{_libdir}
|
||||
#rm libtorch.so
|
||||
#ln -s libtorch.so.1 libtorch.so
|
||||
#cd -
|
||||
#for file in $(find %{buildroot}%{python_sitearch} -type f -name \*.py -perm 644 -size +1b); do
|
||||
#%{__grep} '/usr/bin/env ' $file && sed -i 's@/usr/bin/env python@/usr/bin/python@' $file && chmod 755 $file
|
||||
#done
|
||||
#
|
||||
#%check
|
||||
#export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}
|
||||
#%%python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} $python test/run_test.py
|
||||
|
||||
%post -n libtorch -p /sbin/ldconfig
|
||||
%postun -n libtorch -p /sbin/ldconfig
|
||||
|
||||
%files %{python_files}
|
||||
%defattr(-,root,root)
|
||||
%doc README.md NOTICE
|
||||
%doc README.md NOTICE releases.html
|
||||
%license LICENSE
|
||||
%{python_sitearch}/torch/
|
||||
%{python_sitearch}/caffe2/
|
||||
@ -226,8 +248,6 @@ export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}
|
||||
%exclude %{python_sitearch}/torch/include/torch/csrc
|
||||
%exclude %{python_sitearch}/torch/include/torch/*.h
|
||||
|
||||
|
||||
|
||||
%files %{python_files devel}
|
||||
%{python_sitearch}/torch/share
|
||||
%{python_sitearch}/torch/include/TH/
|
||||
@ -247,4 +267,5 @@ export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}
|
||||
|
||||
%files -n libtorch
|
||||
%{_libdir}/*.so*
|
||||
|
||||
%changelog
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:15f1af53ee5cac59203ec2ab42bda95e9ae574acfcc84c35a36e29290a22b2ad
|
||||
size 6991706
|
3
pytorch-1.4.0.tar.gz
Normal file
3
pytorch-1.4.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8efc9c3d1804ffb97cbcf4ef988febc8d0b8701763614a586c7fc457a97cf847
|
||||
size 9641840
|
@ -1,45 +0,0 @@
|
||||
From 4621345f5c512eb5ddc98d370a0ba99184fcf112 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Goll <cgoll@suse.de>
|
||||
Date: Thu, 13 Jun 2019 14:43:21 +0200
|
||||
Subject: [PATCH 3/3] removed some tests
|
||||
|
||||
---
|
||||
test/run_test.py | 7 -------
|
||||
1 file changed, 7 deletions(-)
|
||||
|
||||
diff --git a/test/run_test.py b/test/run_test.py
|
||||
index fd53902..19b7727 100644
|
||||
--- a/test/run_test.py
|
||||
+++ b/test/run_test.py
|
||||
@@ -19,28 +19,21 @@ import torch.distributed as dist
|
||||
|
||||
TESTS = [
|
||||
'autograd',
|
||||
- 'cpp_extensions',
|
||||
'c10d',
|
||||
- 'cuda',
|
||||
- 'cuda_primary_ctx',
|
||||
- 'dataloader',
|
||||
'distributed',
|
||||
'distributions',
|
||||
'docs_coverage',
|
||||
'expecttest',
|
||||
'indexing',
|
||||
- 'indexing_cuda',
|
||||
'jit',
|
||||
'mkldnn',
|
||||
'multiprocessing',
|
||||
'multiprocessing_spawn',
|
||||
'nccl',
|
||||
- 'nn',
|
||||
'numba_integration',
|
||||
'optim',
|
||||
'quantized',
|
||||
'sparse',
|
||||
- 'thd_distributed',
|
||||
'torch',
|
||||
'type_info',
|
||||
'type_hints',
|
||||
--
|
||||
2.16.4
|
||||
|
69
skip-third-party-check.patch
Normal file
69
skip-third-party-check.patch
Normal file
@ -0,0 +1,69 @@
|
||||
From 0f1b2fb9bd2b9ea9ae7c25b366c74dd9daf39439 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Goll <cgoll@suse.de>
|
||||
Date: Thu, 20 Feb 2020 15:18:18 +0100
|
||||
Subject: [PATCH] skip third party check Add the possibilty to skip check for
|
||||
subdirs in third_party
|
||||
|
||||
---
|
||||
setup.py | 37 +++++++++++++++++++++----------------
|
||||
1 file changed, 21 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 01fee0e3a5..4c3d86cee6 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -160,7 +160,9 @@
|
||||
# USE_TBB
|
||||
# enable TBB support
|
||||
#
|
||||
-
|
||||
+# USE_SYSTEM_LIB
|
||||
+# A comma seperated list of libraries for which should not be checked
|
||||
+# under the directory third_party
|
||||
from __future__ import print_function
|
||||
from setuptools import setup, Extension, distutils, find_packages
|
||||
from collections import defaultdict
|
||||
@@ -287,22 +289,25 @@ def build_deps():
|
||||
report('-- Building version ' + version)
|
||||
|
||||
def check_file(f):
|
||||
- if not os.path.exists(f):
|
||||
- report("Could not find {}".format(f))
|
||||
- report("Did you run 'git submodule update --init --recursive'?")
|
||||
- sys.exit(1)
|
||||
-
|
||||
- check_file(os.path.join(third_party_path, "gloo", "CMakeLists.txt"))
|
||||
- check_file(os.path.join(third_party_path, "pybind11", "CMakeLists.txt"))
|
||||
- check_file(os.path.join(third_party_path, 'cpuinfo', 'CMakeLists.txt'))
|
||||
- check_file(os.path.join(third_party_path, 'tbb', 'Makefile'))
|
||||
- check_file(os.path.join(third_party_path, 'onnx', 'CMakeLists.txt'))
|
||||
- check_file(os.path.join(third_party_path, 'foxi', 'CMakeLists.txt'))
|
||||
- check_file(os.path.join(third_party_path, 'QNNPACK', 'CMakeLists.txt'))
|
||||
- check_file(os.path.join(third_party_path, 'fbgemm', 'CMakeLists.txt'))
|
||||
- check_file(os.path.join(third_party_path, 'fbgemm', 'third_party',
|
||||
+ if os.path.dirname(f) in str(os.getenv('USE_SYSTEM_LIB')):
|
||||
+ report("Not checking for {} in third_party".format(f))
|
||||
+ else:
|
||||
+ if not os.path.exists(os.path.join(third_party_path,f)):
|
||||
+ report("Could not find {}".format(os.path.join(third_party_path,f)))
|
||||
+ report("Did you run 'git submodule update --init --recursive'?")
|
||||
+ sys.exit(1)
|
||||
+
|
||||
+ check_file(os.path.join("gloo", "CMakeLists.txt"))
|
||||
+ check_file(os.path.join("pybind11", "CMakeLists.txt"))
|
||||
+ check_file(os.path.join('cpuinfo', 'CMakeLists.txt'))
|
||||
+ check_file(os.path.join('tbb', 'Makefile'))
|
||||
+ check_file(os.path.join('onnx', 'CMakeLists.txt'))
|
||||
+ check_file(os.path.join('foxi', 'CMakeLists.txt'))
|
||||
+ check_file(os.path.join('QNNPACK', 'CMakeLists.txt'))
|
||||
+ check_file(os.path.join('fbgemm', 'CMakeLists.txt'))
|
||||
+ check_file(os.path.join('fbgemm', 'third_party',
|
||||
'asmjit', 'CMakeLists.txt'))
|
||||
- check_file(os.path.join(third_party_path, 'onnx', 'third_party',
|
||||
+ check_file(os.path.join('onnx', 'third_party',
|
||||
'benchmark', 'CMakeLists.txt'))
|
||||
|
||||
check_pydep('yaml', 'pyyaml')
|
||||
--
|
||||
2.25.0
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:61a7a845468703660d86cf7e979f2d7630a6e78b308514c41569dce451a6bfce
|
||||
size 677112
|
3
sleef-7f523de651585fe25cade462efccca647dcc8d02.tar.gz
Normal file
3
sleef-7f523de651585fe25cade462efccca647dcc8d02.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8cb5fae822077ca9cbc14dcc7bba9a3a35ad519284fc5169f9a176672c63860a
|
||||
size 1174007
|
Loading…
Reference in New Issue
Block a user