summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Bermond2017-10-15 14:25:40 -0200
committerDaniel Bermond2017-10-15 14:25:40 -0200
commitf4c29ff279e0f6874e26623a8a8247016f482bc9 (patch)
tree2c5c6969e77abdc1c8957cb047cdd5452c8ec5c4
parentbd8568b1d472109873cb06303ca767c4beeba8d5 (diff)
downloadaur-f4c29ff279e0f6874e26623a8a8247016f482bc9.tar.gz
Add needed changes for cuda 9.0
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD26
2 files changed, 17 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9f2e95bf8c51..244f6fb31952 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,14 @@
# Generated by mksrcinfo v8
-# Fri Sep 22 15:56:53 UTC 2017
+# Sun Oct 15 16:24:46 UTC 2017
pkgbase = caffe-git
pkgdesc = A deep learning framework made with expression, speed, and modularity in mind (git version, gpu enabled)
- pkgver = 1.0.r29.geffcdb0b6
+ pkgver = 1.0.r35.g691febcb8
pkgrel = 1
url = http://caffe.berkeleyvision.org/
arch = x86_64
license = BSD
makedepends = git
- makedepends = gcc5
+ makedepends = gcc6
makedepends = doxygen
makedepends = texlive-core
depends = boost-libs
diff --git a/PKGBUILD b/PKGBUILD
index 93d952454f13..45f24927d4ba 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,7 +8,7 @@
pkgname=caffe-git
_srcname=caffe
-pkgver=1.0.r29.geffcdb0b6
+pkgver=1.0.r35.g691febcb8
pkgrel=1
pkgdesc="A deep learning framework made with expression, speed, and modularity in mind (git version, gpu enabled)"
arch=('x86_64')
@@ -30,9 +30,9 @@ depends=(
'python-leveldb' 'python-scikit-image' 'python-pydotplus'
# NOTE:
# python-pydotplus (or python-pydot) is required by python executable draw_net.py
- # https://github.com/BVLC/caffe/blob/eeebdab16155d34ff8f5f42137da7df4d1c7eab0/python/caffe/draw.py#L7-L22
+ # https://github.com/BVLC/caffe/blob/691febcb83d6a3147be8e9583c77aefaac9945f8/python/caffe/draw.py#L7-L22
)
-makedepends=('git' 'gcc5' 'doxygen' 'texlive-core')
+makedepends=('git' 'gcc6' 'doxygen' 'texlive-core')
provides=('caffe')
conflicts=('caffe' 'caffe-cpu' 'caffe-cpu-git' 'caffe-dr-git' 'caffe-mnc-dr-git'
'caffe2' 'caffe2-git' 'caffe2-cpu' 'caffe2-cpu-git')
@@ -57,12 +57,16 @@ prepare() {
sed -i '/USE_LMDB/s/^#[[:space:]]//;/USE_LMDB/s/0/1/' Makefile.config
sed -i '/OPENCV_VERSION/s/^#[[:space:]]//g' Makefile.config
- # use gcc5 (CUDA code requires gcc5)
- sed -i '/CUSTOM_CXX/s/^#[[:space:]]//;/CUSTOM_CXX/s/$/-5/' Makefile.config
+ # use gcc6 (CUDA 9.0 code requires gcc6)
+ sed -i '/CUSTOM_CXX/s/^#[[:space:]]//;/CUSTOM_CXX/s/$/-6/' Makefile.config
# set CUDA directory
sed -i '/CUDA_DIR/s/\/usr\/local\/cuda/\/opt\/cuda/' Makefile.config
+ # remove gpu architectures not supported by CUDA 9.0
+ sed -i 's/-gencode[[:space:]]arch=compute_20,code=sm_20//' Makefile.config
+ sed -i 's/-gencode[[:space:]]arch=compute_20,code=sm_21//' Makefile.config
+
# set OpenBLAS as the BLAS provider and adjust its directories
sed -i '/BLAS[[:space:]]\:=[[:space:]]atlas/s/atlas/open/' Makefile.config
sed -i 's/.*BLAS_INCLUDE[[:space:]]\:=[[:space:]]\/path.*/BLAS_INCLUDE := \/usr\/include/' Makefile.config
@@ -105,21 +109,19 @@ pkgver() {
build() {
cd "$pkgname"
- _gcc5_cxxflags="$(printf '%s' "$CXXFLAGS" | sed 's/-fno-plt//')"
- _gcc5_cflags="$( printf '%s' "$CFLAGS" | sed 's/-fno-plt//')"
msg2 "Building target 'all'..."
- CXXFLAGS="$_gcc5_cxxflags" CFLAGS="$_gcc5_cflags" make all
+ make all
msg2 "Building target 'pycaffe'..."
- CXXFLAGS="$_gcc5_cxxflags" CFLAGS="$_gcc5_cflags" make pycaffe
+ make pycaffe
msg2 "Building target 'docs'..."
rm -rf doxygen
- CXXFLAGS="$_gcc5_cxxflags" CFLAGS="$_gcc5_cflags" make docs
+ make docs
msg2 "Building target 'distribute'..."
- CXXFLAGS="$_gcc5_cxxflags" CFLAGS="$_gcc5_cflags" make distribute
+ make distribute
}
# uncomment this block if you want to run the checks/tests
@@ -139,7 +141,7 @@ package() {
mkdir -p "${pkgdir}/usr/share/"{caffe,doc/"${_srcname}"/search,licenses/"${pkgname}"}
# binaries
- cd "${srcdir}/${pkgname}/distribute/bin"
+ cd "${pkgname}/distribute/bin"
install -D -m755 * "${pkgdir}/usr/bin"
# libraries