summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Bermond2021-03-06 16:58:30 +0000
committerDaniel Bermond2021-03-06 16:58:30 +0000
commitea2fdc0d35fef24a8bb62827c8872969b0930765 (patch)
treeb5e4883510b63d65c8e06cf12ed5846f2026586a
parent6727ee061ebd5d38bad5c918c29506a6cad8c1dd (diff)
downloadaur-ea2fdc0d35fef24a8bb62827c8872969b0930765.tar.gz
Update to version 1.8.0
-rw-r--r--.SRCINFO83
-rw-r--r--010-caffe2-fix-include-system-path.patch12
-rw-r--r--020-caffe2-use-system-libuv.patch25
-rw-r--r--030-caffe2-disable-non-x86_64.patch13
-rw-r--r--PKGBUILD129
5 files changed, 146 insertions, 116 deletions
diff --git a/.SRCINFO b/.SRCINFO
index cc1b5372712d..539b5f8ed00b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = caffe2
pkgdesc = A new lightweight, modular, and scalable deep learning framework
- pkgver = 0.8.2_1.6.0
+ pkgver = 0.8.2_1.8.0
pkgrel = 1
url = https://caffe2.ai/
arch = x86_64
@@ -13,12 +13,14 @@ pkgbase = caffe2
makedepends = cudnn
makedepends = nccl
makedepends = pybind11
+ makedepends = qt5-base
depends = google-glog
depends = protobuf
depends = openmp
depends = python
depends = python-numpy
depends = python-protobuf
+ depends = python-typing_extensions
depends = python-yaml
depends = blas
depends = lapack
@@ -44,45 +46,49 @@ pkgbase = caffe2
optdepends = python-lmdb
conflicts = python-pytorch
options = !emptydirs
- source = git+https://github.com/pytorch/pytorch.git#tag=v1.6.0
- source = git+https://github.com/pybind/pybind11
- source = git+https://github.com/NVlabs/cub
- source = git+https://github.com/eigenteam/eigen-git-mirror
- source = git+https://github.com/google/googletest
- source = git+https://github.com/google/benchmark
- source = protobuf-protocolbuffers::git+https://github.com/protocolbuffers/protobuf
- source = git+https://github.com/Yangqing/ios-cmake
- source = git+https://github.com/Maratyszcza/NNPACK
- source = git+https://github.com/facebookincubator/gloo
- source = git+https://github.com/Maratyszcza/pthreadpool
- source = git+https://github.com/Maratyszcza/FXdiv
- source = git+https://github.com/Maratyszcza/FP16
- source = git+https://github.com/Maratyszcza/psimd
- source = git+https://github.com/facebook/zstd
- source = cpuinfo-pytorch::git+https://github.com/pytorch/cpuinfo
- source = git+https://github.com/PeachPy/enum34
- source = git+https://github.com/Maratyszcza/PeachPy
- source = git+https://github.com/benjaminp/six
- source = git+https://github.com/onnx/onnx
- source = git+https://github.com/onnx/onnx-tensorrt
- source = git+https://github.com/shibatch/sleef
- source = git+https://github.com/intel/ideep
+ source = git+https://github.com/pytorch/pytorch.git#tag=v1.8.0
+ source = git+https://github.com/pybind/pybind11.git
+ source = cub-nvlabs::git+https://github.com/NVlabs/cub.git
+ source = git+https://github.com/eigenteam/eigen-git-mirror.git
+ source = git+https://github.com/google/googletest.git
+ source = git+https://github.com/google/benchmark.git
+ source = protobuf-protocolbuffers::git+https://github.com/protocolbuffers/protobuf.git
+ source = git+https://github.com/Yangqing/ios-cmake.git
+ source = git+https://github.com/Maratyszcza/NNPACK.git
+ source = git+https://github.com/facebookincubator/gloo.git
+ source = git+https://github.com/Maratyszcza/pthreadpool.git
+ source = git+https://github.com/Maratyszcza/FXdiv.git
+ source = git+https://github.com/Maratyszcza/FP16.git
+ source = git+https://github.com/Maratyszcza/psimd.git
+ source = git+https://github.com/facebook/zstd.git
+ source = cpuinfo-pytorch::git+https://github.com/pytorch/cpuinfo.git
+ source = git+https://github.com/PeachPy/enum34.git
+ source = git+https://github.com/Maratyszcza/PeachPy.git
+ source = git+https://github.com/benjaminp/six.git
+ source = git+https://github.com/onnx/onnx.git
+ source = git+https://github.com/onnx/onnx-tensorrt.git
+ source = git+https://github.com/shibatch/sleef.git
+ source = git+https://github.com/intel/ideep.git
source = git+https://github.com/NVIDIA/nccl.git
- source = git+https://github.com/google/gemmlowp
- source = git+https://github.com/pytorch/QNNPACK
- source = git+https://github.com/intel/ARM_NEON_2_x86_SSE
- source = git+https://github.com/pytorch/fbgemm
- source = git+https://github.com/houseroad/foxi
- source = git+https://github.com/01org/tbb
- source = git+https://github.com/facebookincubator/fbjni
- source = git+https://github.com/google/XNNPACK
- source = git+https://github.com/fmtlib/fmt
- source = git+https://github.com/pytorch/tensorpipe
+ source = git+https://github.com/google/gemmlowp.git
+ source = git+https://github.com/pytorch/QNNPACK.git
+ source = git+https://github.com/intel/ARM_NEON_2_x86_SSE.git
+ source = git+https://github.com/pytorch/fbgemm.git
+ source = git+https://github.com/houseroad/foxi.git
+ source = git+https://github.com/01org/tbb.git
+ source = git+https://github.com/facebookincubator/fbjni.git
+ source = XNNPACK-malfet::git+https://github.com/malfet/XNNPACK.git
+ source = git+https://github.com/fmtlib/fmt.git
+ source = git+https://github.com/pytorch/tensorpipe.git
+ source = git+https://github.com/pytorch/kineto.git
source = git+https://github.com/asmjit/asmjit.git
source = git+https://github.com/01org/mkl-dnn.git
source = git+https://github.com/emil-e/rapidcheck.git
+ source = git+https://github.com/libuv/libuv.git
+ source = git+https://github.com/google/libnop.git
source = 010-caffe2-fix-include-system-path.patch
source = 020-caffe2-use-system-libuv.patch
+ source = 030-caffe2-disable-non-x86_64.patch
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
@@ -120,8 +126,12 @@ pkgbase = caffe2
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
- sha256sums = e3d8ebbed02311d065f32a10e8264b1ad76e8df691d78baac3caa1b5b3f1e9f6
- sha256sums = 4e8840d3c6311c17ff19184fa5a7dec2d51ad6f0520708616af0f03a6c231648
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = c68ddbd539e2a8ef3a1874a65e9c6701fc9d136b592be095b953cdcab38815fd
+ sha256sums = 5bf80f75ce07be91043e78e0cd096146b312373fd7a7abb0628a5d9f6515d870
+ sha256sums = 7385ac0742f00245c3bd7560e33648566a25b950964806c55b6c3eaee25981ac
pkgname = caffe2
pkgdesc = A new lightweight, modular, and scalable deep learning framework (cpu only)
@@ -138,6 +148,7 @@ pkgname = caffe2-cuda
depends = python
depends = python-numpy
depends = python-protobuf
+ depends = python-typing_extensions
depends = python-yaml
depends = blas
depends = lapack
diff --git a/010-caffe2-fix-include-system-path.patch b/010-caffe2-fix-include-system-path.patch
index 1de75d680db1..5c72921f0dfc 100644
--- a/010-caffe2-fix-include-system-path.patch
+++ b/010-caffe2-fix-include-system-path.patch
@@ -1,11 +1,11 @@
--- a/torch/utils/cpp_extension.py
+++ b/torch/utils/cpp_extension.py
-@@ -1570,7 +1570,7 @@ def _write_ninja_file_to_build_library(path,
- common_cflags = ['-DTORCH_EXTENSION_NAME={}'.format(name)]
- common_cflags.append('-DTORCH_API_INCLUDE_EXTENSION_H')
- common_cflags += ['-I{}'.format(include) for include in user_includes]
-- common_cflags += ['-isystem {}'.format(include) for include in system_includes]
-+ common_cflags += ['-I{}'.format(include) for include in system_includes]
+@@ -1760,7 +1760,7 @@ def _write_ninja_file_to_build_library(path,
+ common_cflags.append(f'-DPYBIND11_{pname}=\\"{pval}\\"')
+
+ common_cflags += [f'-I{include}' for include in user_includes]
+- common_cflags += [f'-isystem {include}' for include in system_includes]
++ common_cflags += [f'-I{include}' for include in system_includes]
common_cflags += ['-D_GLIBCXX_USE_CXX11_ABI=' + str(int(torch._C._GLIBCXX_USE_CXX11_ABI))]
diff --git a/020-caffe2-use-system-libuv.patch b/020-caffe2-use-system-libuv.patch
index cf5eb3a4f752..6628bcf76292 100644
--- a/020-caffe2-use-system-libuv.patch
+++ b/020-caffe2-use-system-libuv.patch
@@ -1,22 +1,11 @@
--- a/cmake/Dependencies.cmake
+++ b/cmake/Dependencies.cmake
-@@ -1295,7 +1295,7 @@ if(USE_DISTRIBUTED AND USE_TENSORPIPE)
- set(__BUILD_TESTING ${BUILD_TESTING})
- set(BUILD_TESTING OFF)
- set(TP_BUILD_PYTHON OFF)
-- set(TP_BUILD_LIBUV ON)
-+ set(TP_BUILD_LIBUV OFF)
+@@ -1346,7 +1346,7 @@ if(USE_DISTRIBUTED AND USE_TENSORPIPE)
+ set(TP_USE_CUDA ON CACHE BOOL "" FORCE)
+ set(TP_ENABLE_CUDA_IPC ON CACHE BOOL "" FORCE)
+ endif()
+- set(TP_BUILD_LIBUV ON CACHE BOOL "" FORCE)
++ set(TP_BUILD_LIBUV OFF CACHE BOOL "" FORCE)
+ set(TP_STATIC_OR_SHARED STATIC CACHE STRING "" FORCE)
add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/tensorpipe)
-
---- a/third_party/tensorpipe/cmake/pytorch.cmake
-+++ b/third_party/tensorpipe/cmake/pytorch.cmake
-@@ -138,7 +138,7 @@ endif()
-
- add_library(tensorpipe ${TENSORPIPE_SRC})
-
--set(TP_BUILD_LIBUV ON)
-+set(TP_BUILD_LIBUV OFF)
- find_package(uv REQUIRED)
- target_link_libraries(tensorpipe PRIVATE uv::uv)
-
diff --git a/030-caffe2-disable-non-x86_64.patch b/030-caffe2-disable-non-x86_64.patch
new file mode 100644
index 000000000000..a9f4c449b12d
--- /dev/null
+++ b/030-caffe2-disable-non-x86_64.patch
@@ -0,0 +1,13 @@
+--- a/tools/setup_helpers/cmake.py
++++ b/tools/setup_helpers/cmake.py
+@@ -295,6 +295,10 @@ class CMake:
+ build_options.update(cmake__options)
+
+ CMake.defines(args,
++ DISABLE_AVX2=1,
++ DISABLE_AVX512F=1,
++ DISABLE_FMA4=1,
++ DISABLE_SSE4=1,
+ PYTHON_EXECUTABLE=sys.executable,
+ PYTHON_LIBRARY=cmake_python_library,
+ PYTHON_INCLUDE_DIR=distutils.sysconfig.get_python_inc(),
diff --git a/PKGBUILD b/PKGBUILD
index f78dc47d6fb7..e100b0d52894 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,11 +2,11 @@
# select the desired cuda architecture(s)
# default is to build for all (takes a very long time to build)
-_cuda_archs='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'
+_cuda_archs='5.2;5.3;6.0;6.1;6.2;7.0;7.0+PTX;7.2;7.2+PTX;7.5;7.5+PTX;8.0;8.0+PTX;8.6;8.6+PTX'
pkgbase=caffe2
pkgname=('caffe2' 'caffe2-cuda')
-_pytorchver=1.6.0 # pytorch stable release version
+_pytorchver=1.8.0
pkgver="0.8.2_${_pytorchver}"
pkgrel=1
pkgdesc='A new lightweight, modular, and scalable deep learning framework'
@@ -14,53 +14,58 @@ arch=('x86_64')
url='https://caffe2.ai/'
license=('BSD')
depends=('google-glog' 'protobuf' 'openmp' 'python' 'python-numpy' 'python-protobuf'
- 'python-yaml' 'blas' 'lapack' 'gflags' 'numactl' 'intel-mkl' 'opencv' 'libuv')
+ 'python-typing_extensions' 'python-yaml' 'blas' 'lapack' 'gflags' 'numactl'
+ 'intel-mkl' 'opencv' 'libuv')
optdepends=('python-flask' 'graphviz' 'python-hypothesis' 'python-matplotlib'
'python-pydot' 'python-nvd3' 'python-yaml' 'python-requests'
'python-scikit-image' 'python-scipy' 'python-setuptools'
'python-future' 'python-tornado' 'python-six' 'python-lmdb')
-makedepends=('git' 'cmake' 'gtest' 'snappy' 'cuda' 'cudnn' 'nccl' 'pybind11')
+makedepends=('git' 'cmake' 'gtest' 'snappy' 'cuda' 'cudnn' 'nccl' 'pybind11' 'qt5-base')
conflicts=('python-pytorch')
options=('!emptydirs')
source=("git+https://github.com/pytorch/pytorch.git#tag=v${_pytorchver}"
- 'git+https://github.com/pybind/pybind11'
- 'git+https://github.com/NVlabs/cub'
- 'git+https://github.com/eigenteam/eigen-git-mirror'
- 'git+https://github.com/google/googletest'
- 'git+https://github.com/google/benchmark'
- 'protobuf-protocolbuffers'::'git+https://github.com/protocolbuffers/protobuf'
- 'git+https://github.com/Yangqing/ios-cmake'
- 'git+https://github.com/Maratyszcza/NNPACK'
- 'git+https://github.com/facebookincubator/gloo'
- 'git+https://github.com/Maratyszcza/pthreadpool'
- 'git+https://github.com/Maratyszcza/FXdiv'
- 'git+https://github.com/Maratyszcza/FP16'
- 'git+https://github.com/Maratyszcza/psimd'
- 'git+https://github.com/facebook/zstd'
- 'cpuinfo-pytorch'::'git+https://github.com/pytorch/cpuinfo'
- 'git+https://github.com/PeachPy/enum34'
- 'git+https://github.com/Maratyszcza/PeachPy'
- 'git+https://github.com/benjaminp/six'
- 'git+https://github.com/onnx/onnx'
- 'git+https://github.com/onnx/onnx-tensorrt'
- 'git+https://github.com/shibatch/sleef'
- 'git+https://github.com/intel/ideep'
+ 'git+https://github.com/pybind/pybind11.git'
+ 'cub-nvlabs'::'git+https://github.com/NVlabs/cub.git'
+ 'git+https://github.com/eigenteam/eigen-git-mirror.git'
+ 'git+https://github.com/google/googletest.git'
+ 'git+https://github.com/google/benchmark.git'
+ 'protobuf-protocolbuffers'::'git+https://github.com/protocolbuffers/protobuf.git'
+ 'git+https://github.com/Yangqing/ios-cmake.git'
+ 'git+https://github.com/Maratyszcza/NNPACK.git'
+ 'git+https://github.com/facebookincubator/gloo.git'
+ 'git+https://github.com/Maratyszcza/pthreadpool.git'
+ 'git+https://github.com/Maratyszcza/FXdiv.git'
+ 'git+https://github.com/Maratyszcza/FP16.git'
+ 'git+https://github.com/Maratyszcza/psimd.git'
+ 'git+https://github.com/facebook/zstd.git'
+ 'cpuinfo-pytorch'::'git+https://github.com/pytorch/cpuinfo.git'
+ 'git+https://github.com/PeachPy/enum34.git'
+ 'git+https://github.com/Maratyszcza/PeachPy.git'
+ 'git+https://github.com/benjaminp/six.git'
+ 'git+https://github.com/onnx/onnx.git'
+ 'git+https://github.com/onnx/onnx-tensorrt.git'
+ 'git+https://github.com/shibatch/sleef.git'
+ 'git+https://github.com/intel/ideep.git'
'git+https://github.com/NVIDIA/nccl.git'
- 'git+https://github.com/google/gemmlowp'
- 'git+https://github.com/pytorch/QNNPACK'
- 'git+https://github.com/intel/ARM_NEON_2_x86_SSE'
- 'git+https://github.com/pytorch/fbgemm'
- 'git+https://github.com/houseroad/foxi'
- 'git+https://github.com/01org/tbb'
- 'git+https://github.com/facebookincubator/fbjni'
- 'git+https://github.com/google/XNNPACK'
- 'git+https://github.com/fmtlib/fmt'
- 'git+https://github.com/pytorch/tensorpipe'
+ 'git+https://github.com/google/gemmlowp.git'
+ 'git+https://github.com/pytorch/QNNPACK.git'
+ 'git+https://github.com/intel/ARM_NEON_2_x86_SSE.git'
+ 'git+https://github.com/pytorch/fbgemm.git'
+ 'git+https://github.com/houseroad/foxi.git'
+ 'git+https://github.com/01org/tbb.git'
+ 'git+https://github.com/facebookincubator/fbjni.git'
+ 'XNNPACK-malfet'::'git+https://github.com/malfet/XNNPACK.git'
+ 'git+https://github.com/fmtlib/fmt.git'
+ 'git+https://github.com/pytorch/tensorpipe.git'
+ 'git+https://github.com/pytorch/kineto.git'
'git+https://github.com/asmjit/asmjit.git'
'git+https://github.com/01org/mkl-dnn.git'
'git+https://github.com/emil-e/rapidcheck.git'
+ 'git+https://github.com/libuv/libuv.git'
+ 'git+https://github.com/google/libnop.git'
'010-caffe2-fix-include-system-path.patch'
- '020-caffe2-use-system-libuv.patch')
+ '020-caffe2-use-system-libuv.patch'
+ '030-caffe2-disable-non-x86_64.patch')
sha256sums=('SKIP'
'SKIP'
'SKIP'
@@ -98,13 +103,16 @@ sha256sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
- 'e3d8ebbed02311d065f32a10e8264b1ad76e8df691d78baac3caa1b5b3f1e9f6'
- '4e8840d3c6311c17ff19184fa5a7dec2d51ad6f0520708616af0f03a6c231648')
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'c68ddbd539e2a8ef3a1874a65e9c6701fc9d136b592be095b953cdcab38815fd'
+ '5bf80f75ce07be91043e78e0cd096146b312373fd7a7abb0628a5d9f6515d870'
+ '7385ac0742f00245c3bd7560e33648566a25b950964806c55b6c3eaee25981ac')
prepare() {
# submodules which clone dir coincides with the submodule name
local _submodule_list=('pybind11'
- 'cub'
'googletest'
'benchmark'
'protobuf'
@@ -120,7 +128,6 @@ prepare() {
'fbgemm'
'foxi'
'tbb'
- 'XNNPACK'
'fmt'
'tensorpipe')
@@ -133,6 +140,7 @@ prepare() {
done
# submodules which clone dir does not coincide with the submodule name
+ git -C pytorch config --local submodule.third_party/cub.url "${srcdir}/cub-nvlabs"
git -C pytorch config --local submodule.third_party/eigen.url "${srcdir}/eigen-git-mirror"
git -C pytorch config --local submodule.third_party/protobuf.url "${srcdir}/protobuf-protocolbuffers"
git -C pytorch config --local submodule.third_party/NNPACK_deps/pthreadpool.url "${srcdir}/pthreadpool"
@@ -146,6 +154,7 @@ prepare() {
git -C pytorch config --local submodule.third_party/nccl/nccl.url "${srcdir}/nccl"
git -C pytorch config --local submodule.third_party/gemmlowp/gemmlowp.url "${srcdir}/gemmlowp"
git -C pytorch config --local submodule.android/libs/fbjni.url "${srcdir}/fbjni"
+ git -C pytorch config --local submodule.third_party/XNNPACK.url "${srcdir}/XNNPACK-malfet"
# special case (upstream uses third-party instead of third_party)
git -C pytorch config --local submodule.third-party/cpuinfo.url "${srcdir}/cpuinfo-pytorch"
@@ -166,24 +175,26 @@ prepare() {
git -C pytorch/third_party/ideep config --local submodule.tests/rapidcheck.url "${srcdir}/rapidcheck"
git -C pytorch/third_party/ideep submodule update
+ # tensorpipe submodules
+ git -C pytorch/third_party/tensorpipe submodule init
+ git -C pytorch/third_party/tensorpipe config --local submodule.third_party/pybind11.url "${srcdir}/pybind11"
+ git -C pytorch/third_party/tensorpipe config --local submodule.third_party/libuv.url "${srcdir}/libuv"
+ git -C pytorch/third_party/tensorpipe config --local submodule.third_party/googletest.url "${srcdir}/googletest"
+ git -C pytorch/third_party/tensorpipe config --local submodule.third_party/libnop.url "${srcdir}/libnop"
+ git -C pytorch/third_party/tensorpipe submodule update
+
patch -d pytorch -Np1 -i "${srcdir}/010-caffe2-fix-include-system-path.patch"
patch -d pytorch -Np1 -i "${srcdir}/020-caffe2-use-system-libuv.patch"
+ patch -d pytorch -Np1 -i "${srcdir}/030-caffe2-disable-non-x86_64.patch"
}
build() {
- local _common_opts=('..'
- '-DBLAS:STRING=Eigen'
- '-DBUILD_BINARY:BOOL=ON'
+ local _common_opts=('-DBUILD_BINARY:BOOL=ON'
'-DBUILD_CUSTOM_PROTOBUF:BOOL=OFF'
'-DBUILD_SHARED_LIBS:BOOL=ON'
'-DCMAKE_BUILD_TYPE:STRING=None'
- '-DCMAKE_INSTALL_LIBDIR:PATH=lib'
'-DCMAKE_INSTALL_PREFIX:PATH=/usr'
'-DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES'
- '-DCXX_AVX2_FOUND:BOOL=FALSE'
- '-DCXX_AVX_FOUND:BOOL=FALSE'
- '-DC_AVX2_FOUND:BOOL=FALSE'
- '-DC_AVX_FOUND:BOOL=FALSE'
'-DUSE_GFLAGS:BOOL=ON'
'-DUSE_GLOG:BOOL=ON'
'-DUSE_OPENCV:BOOL=ON'
@@ -197,11 +208,13 @@ build() {
-DCUDA_HOST_COMPILER:FILEPATH='/opt/cuda/bin/gcc' \
-DCUDA_NVCC_FLAGS:STRING='-Xfatbin -compress-all' \
-DTORCH_CUDA_ARCH_LIST="$_cuda_archs" \
+ -DNCCL_INCLUDE_DIR:PATH='/usr/include' \
-DUSE_CUDA:BOOL='ON' \
-DUSE_CUDNN:BOOL='ON' \
-DUSE_METAL:BOOL='OFF' \
-DUSE_NCCL:BOOL='ON' \
-DUSE_SYSTEM_NCCL:BOOL='ON'
+
## fix: avoid a second compilation in package()
sed -i 's/^preinstall:[[:space:]]all/preinstall:/' build-cuda/Makefile
make -C build-cuda
@@ -215,25 +228,29 @@ _package_common() {
make -C "$1" DESTDIR="$pkgdir" install
# remove unneeded files
- rm -f "$pkgdir"/usr/include/*.h*
- rm -rf "$pkgdir"/usr/share/ATen
+ rm "$pkgdir"/usr/include/*.h*
local _dir
local _file
while read -r -d '' _dir
do
rm -r "$_dir"
- done < <(find "${pkgdir}/usr"/{include,share/doc} -mindepth 1 -maxdepth 1 -type d ! -name 'caffe*' ! -name 'c10*' \
- ! -name 'TH*' ! -name 'torch' ! -name 'tensorpipe' -print0)
+ done < <(find "${pkgdir}/usr"/{include,share/doc} -mindepth 1 -maxdepth 1 -type d ! -name 'ATen*' ! -name 'caffe*' \
+ ! -name 'c10*' ! -name 'TH*' ! -name '*torch*' -print0)
while read -r -d '' _dir
do
rm -r "$_dir"
- done < <(find "${pkgdir}/usr"/{lib,share}/cmake -mindepth 1 -maxdepth 1 -type d ! -name 'Caffe*' ! -name 'Torch' \
- ! -name 'tensorpipe' -print0)
+ done < <(find "${pkgdir}/usr"/{lib,share}/cmake -mindepth 1 -maxdepth 1 -type d ! -name 'ATen*' ! -name 'Caffe*' \
+ ! -name 'Torch*' -print0)
while read -r -d '' _file
do
rm "$_file"
done < <(find -L "${pkgdir}/usr/lib" -mindepth 1 -maxdepth 1 -type f ! -name '*c10*.so*' ! -name '*caffe*' \
- ! -name '*shm*' ! -name '*torch*.so*' ! -name '*tensorpipe*' -print0)
+ ! -name '*shm*' ! -name '*torch*.so*' -print0)
+ while read -r -d '' _file
+ do
+ rm "$_file"
+ done < <(find -L "${pkgdir}/usr/lib/pkgconfig" -mindepth 1 -maxdepth 1 -type f ! -name '*c10*' ! -name '*caffe*' \
+ ! -name '*shm*' ! -name '*torch*' -print0)
# license
install -D -m644 pytorch/{LICENSE,NOTICE} -t "${pkgdir}/usr/share/licenses/${pkgname}"