summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO11
-rw-r--r--PKGBUILD20
-rw-r--r--external-nnpack-fix.patch24
3 files changed, 48 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 195a427c6144..139bfcfda04e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,18 @@
# Generated by mksrcinfo v8
-# Thu Jun 15 19:35:51 UTC 2017
+# Thu Jun 15 20:09:39 UTC 2017
pkgbase = caffe2-git
pkgdesc = A new lightweight, modular, and scalable deep learning framework (git version, gpu enabled)
- pkgver = 0.7.0.r434.g4c76b747
- pkgrel = 3
+ pkgver = 0.7.0.r439.g8c9da8ef
+ pkgrel = 1
url = http://caffe2.ai/
arch = x86_64
license = BSD
makedepends = git
makedepends = cmake
makedepends = gcc5
+ makedepends = ninja
+ makedepends = confu-git
+ makedepends = python-peachpy-git
depends = google-glog
depends = protobuf
depends = python2
@@ -54,6 +57,7 @@ pkgbase = caffe2-git
conflicts = caffe2-cpu-git
options = !emptydirs
source = caffe2-git::git+https://github.com/caffe2/caffe2.git
+ source = external-nnpack-fix.patch
source = submodule-pybind11::git+https://github.com/pybind/pybind11.git
source = submodule-nccl::git+https://github.com/nvidia/nccl.git
source = submodule-cnmem::git+https://github.com/nvidia/cnmem.git
@@ -72,6 +76,7 @@ pkgbase = caffe2-git
source = submodule-NNPACK_deps-FP16::git+https://github.com/Maratyszcza/FP16.git
source = submodule-NNPACK_deps-psimd::git+https://github.com/Maratyszcza/psimd.git
sha256sums = SKIP
+ sha256sums = 1c94a1ecc0fe2a52c50c9d1a7bfca655d60c08d48995b27c73aa22b6c375da54
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index cafb93ecab59..f8afafe0ade5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,8 +1,8 @@
# Maintainer : Daniel Bermond < yahoo-com: danielbermond >
pkgname=caffe2-git
-pkgver=0.7.0.r434.g4c76b747
-pkgrel=3
+pkgver=0.7.0.r439.g8c9da8ef
+pkgrel=1
pkgdesc='A new lightweight, modular, and scalable deep learning framework (git version, gpu enabled)'
arch=('x86_64')
url='http://caffe2.ai/'
@@ -28,7 +28,12 @@ depends=(
# missing:
# 'python2-nvd3'
)
-makedepends=('git' 'cmake' 'gcc5')
+makedepends=(
+ # official repositories:
+ 'git' 'cmake' 'gcc5' 'ninja'
+ # AUR:
+ 'confu-git' 'python-peachpy-git'
+)
provides=('caffe2')
conflicts=('caffe' 'caffe-cpu' 'caffe-git' 'caffe-cpu-git'
'caffe2' 'caffe2-cpu' 'caffe2-cpu-git')
@@ -36,6 +41,7 @@ options=('!emptydirs')
source=(
# main source:
"$pkgname"::'git+https://github.com/caffe2/caffe2.git'
+ 'external-nnpack-fix.patch'
# git submodules:
'submodule-pybind11'::'git+https://github.com/pybind/pybind11.git'
'submodule-nccl'::'git+https://github.com/nvidia/nccl.git'
@@ -56,6 +62,7 @@ source=(
'submodule-NNPACK_deps-psimd'::'git+https://github.com/Maratyszcza/psimd.git'
)
sha256sums=('SKIP'
+ '1c94a1ecc0fe2a52c50c9d1a7bfca655d60c08d48995b27c73aa22b6c375da54'
'SKIP'
'SKIP'
'SKIP'
@@ -94,6 +101,11 @@ prepare() {
# https://github.com/facebookincubator/gloo/issues/43
cd third_party/gloo
git checkout 21a5c8ea5e02edca03068790df3d7f7ba4e2d75b
+
+ # avoid compile errors with nnpack if system library is found
+ # https://github.com/caffe2/caffe2/pull/808
+ cd "${srcdir}/${pkgname}"
+ patch -Np1 -i "${srcdir}/external-nnpack-fix.patch"
}
pkgver() {
@@ -168,7 +180,7 @@ build() {
-DUSE_MPI:BOOL=ON \
-DUSE_NCCL:BOOL=ON \
-DUSE_NERVANA_GPU:BOOL=ON \
- -DUSE_NNPACK:BOOL=OFF \
+ -DUSE_NNPACK:BOOL=ON \
-DUSE_OPENCV:BOOL=OFF \
-DUSE_FFMPEG:BOOL=OFF \
-DUSE_OPENMP:BOOL=ON \
diff --git a/external-nnpack-fix.patch b/external-nnpack-fix.patch
new file mode 100644
index 000000000000..08a4e0c4ca29
--- /dev/null
+++ b/external-nnpack-fix.patch
@@ -0,0 +1,24 @@
+diff --git a/cmake/Modules/FindNNPACK.cmake b/cmake/Modules/FindNNPACK.cmake
+index 547bf88f..29cf5dce 100644
+--- a/cmake/Modules/FindNNPACK.cmake
++++ b/cmake/Modules/FindNNPACK.cmake
+@@ -21,12 +21,17 @@ find_library(NNPACK_LIBRARY nnpack
+ PATHS ${NNPACK_ROOT_DIR}
+ PATH_SUFFIXES lib lib64)
+
+-find_package_handle_standard_args(NNPACK DEFAULT_MSG NNPACK_INCLUDE_DIR NNPACK_LIBRARY)
++find_library(PTHREADPOOL_LIBRARY pthreadpool
++ PATHS ${NNPACK_ROOT_DIR}
++ PATH_SUFFIXES lib lib64)
++
++find_package_handle_standard_args(NNPACK DEFAULT_MSG NNPACK_INCLUDE_DIR NNPACK_LIBRARY PTHREADPOOL_LIBRARY)
+
+ if(NNPACK_FOUND)
+ set(NNPACK_INCLUDE_DIRS ${NNPACK_INCLUDE_DIR})
+- set(NNPACK_LIBRARIES ${NNPACK_LIBRARY})
++ set(NNPACK_LIBRARIES ${NNPACK_LIBRARY} ${PTHREADPOOL_LIBRARY})
+ message(STATUS "Found NNPACK (include: ${NNPACK_INCLUDE_DIR}, library: ${NNPACK_LIBRARY})")
++ message(STATUS "Found PTHREADPOOL (library: ${PTHREADPOOL_LIBRARY})")
+ mark_as_advanced(NNPACK_ROOT_DIR NNPACK_LIBRARY_RELEASE NNPACK_LIBRARY_DEBUG
+ NNPACK_LIBRARY NNPACK_INCLUDE_DIR)
+ endif()