summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Bermond2018-09-29 19:05:46 +0000
committerDaniel Bermond2018-09-29 19:05:46 +0000
commitebc331b492350e2c68f92aa9b3a809c01480ce21 (patch)
tree975d39f6aab8c077550de064ac0870b42c95aa85
parentbb93098da12caa9d0892311a0ea38293bf03bb08 (diff)
downloadaur-ebc331b492350e2c68f92aa9b3a809c01480ce21.tar.gz
Fix build. Remove nanopb git submodule. Add system eigen option.
gcc54 is no longer on the official repositories. Fortunatelly, upstream caffe2 git master now builds fine with gcc7, which is the current default cuda compiler (cuda 10.0). nanopb submodule was removed by upstream. The eigen patch to fix build with system eigen is no longer needed because upstream have implemented the cmake option USE_SYSTEM_EIGEN_INSTALL, which we can set to OFF here. References ---------- https://github.com/pytorch/pytorch/commit/964e30de1d1e35b8f5b092ad5126a15cf573724b https://github.com/pytorch/pytorch/commit/c172ffb6321db128fb42f77554869f66406c06c4 https://github.com/pytorch/pytorch/commit/684b55d76257141aa9ea6eb55923896ca4f7d029
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD46
-rw-r--r--caffe2-cuda-git-fix-build-with-eigen.patch17
3 files changed, 14 insertions, 57 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e32f480ceff0..98dab039f528 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,13 +1,13 @@
pkgbase = caffe2-cuda-git
pkgdesc = A new lightweight, modular, and scalable deep learning framework (with cuda, git version)
- pkgver = 0.8.2.r12850.gfbd718994
+ pkgver = 0.8.2.r13647.ga2ebbccc9f
pkgrel = 1
url = http://caffe2.ai/
arch = x86_64
license = BSD
makedepends = git
makedepends = cmake
- makedepends = gcc54
+ makedepends = gcc7
depends = google-glog
depends = protobuf
depends = lapack
@@ -59,7 +59,6 @@ pkgbase = caffe2-cuda-git
options = !emptydirs
source = pytorch-git::git+https://github.com/pytorch/pytorch.git
source = caffe2-submodule-catch::git+https://github.com/catchorg/Catch2.git
- source = caffe2-submodule-nanopb::git+https://github.com/nanopb/nanopb.git
source = caffe2-submodule-pybind11::git+https://github.com/pybind/pybind11.git
source = caffe2-submodule-cub::git+https://github.com/NVlabs/cub.git
source = caffe2-submodule-eigen::git+https://github.com/eigenteam/eigen-git-mirror.git
@@ -85,7 +84,6 @@ pkgbase = caffe2-cuda-git
source = caffe2-submodule-onnx-tensorrt::git+https://github.com/onnx/onnx-tensorrt
source = caffe2-submodule-sleef::git+https://github.com/shibatch/sleef
source = caffe2-submodule-ideep::git+https://github.com/intel/ideep
- source = caffe2-cuda-git-fix-build-with-eigen.patch
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
@@ -113,8 +111,6 @@ pkgbase = caffe2-cuda-git
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
- sha256sums = SKIP
- sha256sums = 76e397ff8fccdf9b484ad1b22bf7313e3edaf8a6adbce46458677313eead796a
pkgname = caffe2-cuda-git
diff --git a/PKGBUILD b/PKGBUILD
index 4ca6a89cd8a1..e55de8738dd3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer : Daniel Bermond < yahoo-com: danielbermond >
pkgname=caffe2-cuda-git
-pkgver=0.8.2.r12850.gfbd718994
+pkgver=0.8.2.r13647.ga2ebbccc9f
pkgrel=1
pkgdesc='A new lightweight, modular, and scalable deep learning framework (with cuda, git version)'
arch=('x86_64')
@@ -27,7 +27,7 @@ depends=(
'python-nvd3' 'python-scikit-image' 'python-glog' 'python-leveldb'
'python-lmdb'
)
-makedepends=('git' 'cmake' 'gcc54')
+makedepends=('git' 'cmake' 'gcc7')
provides=('caffe2' 'caffe2-git' 'caffe2-cuda')
conflicts=('caffe2' 'caffe2-git' 'caffe2-cuda' 'caffe2-cpu' 'caffe2-cpu-git')
options=('!emptydirs')
@@ -36,7 +36,6 @@ source=(
'pytorch-git'::'git+https://github.com/pytorch/pytorch.git'
# git submodules:
'caffe2-submodule-catch'::'git+https://github.com/catchorg/Catch2.git'
- 'caffe2-submodule-nanopb'::'git+https://github.com/nanopb/nanopb.git'
'caffe2-submodule-pybind11'::'git+https://github.com/pybind/pybind11.git'
'caffe2-submodule-cub'::'git+https://github.com/NVlabs/cub.git'
'caffe2-submodule-eigen'::'git+https://github.com/eigenteam/eigen-git-mirror.git'
@@ -62,8 +61,6 @@ source=(
'caffe2-submodule-onnx-tensorrt'::'git+https://github.com/onnx/onnx-tensorrt'
'caffe2-submodule-sleef'::'git+https://github.com/shibatch/sleef'
'caffe2-submodule-ideep'::'git+https://github.com/intel/ideep'
- # patches:
- 'caffe2-cuda-git-fix-build-with-eigen.patch'
)
sha256sums=('SKIP'
'SKIP'
@@ -91,9 +88,7 @@ sha256sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
- 'SKIP'
- 'SKIP'
- '76e397ff8fccdf9b484ad1b22bf7313e3edaf8a6adbce46458677313eead796a')
+ 'SKIP')
prepare() {
cd pytorch-git
@@ -101,11 +96,11 @@ prepare() {
local _submodule
local _submodule_dir
- local _submodule_list="catch nanopb pybind11 cub eigen googletest nervanagpu benchmark \
+ local _submodule_list="catch pybind11 cub eigen googletest nervanagpu benchmark \
protobuf ios-cmake NNPACK gloo NNPACK_deps/pthreadpool \
NNPACK_deps/FXdiv NNPACK_deps/FP16 NNPACK_deps/psimd zstd \
- python-enum python-peachpy python-six ComputeLibrary onnx cereal \
- onnx-tensorrt sleef ideep"
+ python-enum python-peachpy python-six ComputeLibrary onnx
+ cereal onnx-tensorrt sleef ideep"
git submodule init
@@ -118,9 +113,6 @@ prepare() {
done
git submodule update
-
- # fix build if eigen is installed (use eigen from git submodule)
- patch -Np1 -i "${srcdir}/caffe2-cuda-git-fix-build-with-eigen.patch"
}
pkgver() {
@@ -156,31 +148,18 @@ build() {
\
-DBUILD_TEST:BOOL='OFF' \
\
- -DCMAKE_CXX_COMPILER='/usr/bin/g++-5' \
- -DCMAKE_CXX_FLAGS:STRING="${CXXFLAGS/-fno-plt/}" \
- -DCMAKE_C_COMPILER='/usr/bin/gcc-5' \
- -DCMAKE_C_FLAGS:STRING="${CFLAGS/-fno-plt/}" \
+ -DCMAKE_CXX_COMPILER='/usr/bin/g++-7' \
+ -DCMAKE_C_COMPILER='/usr/bin/gcc-7' \
-DCMAKE_INSTALL_LIBDIR:PATH='lib' \
-DCMAKE_INSTALL_PREFIX:PATH='/usr' \
- -DCMAKE_SKIP_INSTALL_RPATH:BOOL='NO' \
- -DCMAKE_SKIP_RPATH:BOOL='NO' \
- -DCMAKE_VERBOSE_MAKEFILE:BOOL='FALSE' \
\
-DCUDA_ARCH_NAME:STRING='Auto' \
- -DCUDA_64_BIT_DEVICE_CODE:BOOL='ON' \
- -DCUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE:BOOL='ON' \
- -DCUDA_BUILD_CUBIN:BOOL='OFF' \
- -DCUDA_BUILD_EMULATION:BOOL='OFF' \
- -DCUDA_HOST_COMPILATION_CPP:BOOL='ON' \
- -DCUDA_HOST_COMPILER:FILEPATH='/usr/bin/gcc-5' \
+ -DCUDA_HOST_COMPILER:FILEPATH='/usr/bin/gcc-7' \
-DCUDA_NVCC_EXECUTABLE:FILEPATH='/opt/cuda/bin/nvcc' \
- -DCUDA_PROPAGATE_HOST_FLAGS:BOOL='ON' \
-DCUDA_SDK_ROOT_DIR:PATH='/opt/cuda' \
- -DCUDA_SEPARABLE_COMPILATION:BOOL='OFF' \
-DCUDA_TOOLKIT_INCLUDE:PATH='/opt/cuda/include' \
-DCUDA_TOOLKIT_ROOT_DIR:PATH='/opt/cuda' \
-DCUDA_USE_STATIC_CUDA_RUNTIME:BOOL='OFF' \
- -DCUDA_VERBOSE_BUILD:BOOL='OFF' \
-DCUDNN_INCLUDE_DIR:PATH='/opt/cuda/include' \
-DCUDNN_LIBRARY:FILEPATH='/opt/cuda/lib64/libcudnn.so' \
-DCUDNN_ROOT_DIR:PATH='/opt/cuda' \
@@ -195,11 +174,9 @@ build() {
\
-DUSE_ACL:BOOL='OFF' \
-DUSE_ASAN:BOOL='OFF' \
- -DUSE_ATEN:BOOL='OFF' \
-DUSE_CUDA:BOOL='ON' \
-DUSE_CUDNN:BOOL='ON' \
- -DUSE_DISTRIBUTED:BOOL='OFF' \
- -DUSE_DISTRIBUTED_MW:BOOL='OFF' \
+ -DUSE_DISTRIBUTED:BOOL='ON' \
-DUSE_FFMPEG:BOOL='ON' \
-DUSE_GFLAGS:BOOL='ON' \
-DUSE_GLOG:BOOL='ON' \
@@ -230,6 +207,7 @@ build() {
-DUSE_ROCKSDB:BOOL='OFF' \
-DUSE_ROCM:BOOL='OFF' \
-DUSE_SNPE:BOOL='OFF' \
+ -DUSE_SYSTEM_EIGEN_INSTALL:BOOL='OFF' \
-DUSE_SYSTEM_NCCL:BOOL='OFF' \
-DUSE_TENSORRT:BOOL='OFF' \
-DUSE_ZMQ:BOOL='ON' \
@@ -263,7 +241,7 @@ package() {
rm -rf "$pkgdir"/usr/lib/cmake/protobuf
rm -f "$pkgdir"/usr/lib/pkgconfig/{protobuf-lite,protobuf}.pc
rm -rf "$pkgdir"/usr/share/pkgconfig
- rm -rf "$pkgdir"/usr/share/{ATen,cmake/ATen}
+ rm -rf "$pkgdir"/usr/share/{ATen,cmake/{ATen,ONNX}}
rm -f "$pkgdir"/usr/share/man/man1/{unzstd,zstd{cat,}}.1
for _entry in ${_exclude_dirs[@]} ${_exclude_libs[@]}
do
diff --git a/caffe2-cuda-git-fix-build-with-eigen.patch b/caffe2-cuda-git-fix-build-with-eigen.patch
deleted file mode 100644
index a8da7d411481..000000000000
--- a/caffe2-cuda-git-fix-build-with-eigen.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff -Naurp a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake
---- a/cmake/Dependencies.cmake 2018-08-14 16:49:21.000000000 +0000
-+++ b/cmake/Dependencies.cmake 2018-08-14 16:36:44.000000000 +0000
-@@ -327,11 +327,11 @@ endif()
- # ---[ EIGEN
- # Due to license considerations, we will only use the MPL2 parts of Eigen.
- set(EIGEN_MPL2_ONLY 1)
--find_package(Eigen3)
-+#find_package(Eigen3)
- if(EIGEN3_FOUND)
- message(STATUS "Found system Eigen at " ${EIGEN3_INCLUDE_DIR})
- else()
-- message(STATUS "Did not find system Eigen. Using third party subdirectory.")
-+ message(STATUS "Using Eigen third party subdirectory for compatibility.")
- set(EIGEN3_INCLUDE_DIR ${CMAKE_CURRENT_LIST_DIR}/../third_party/eigen)
- endif()
- include_directories(SYSTEM ${EIGEN3_INCLUDE_DIR})