diff options
author | Nikolay Amiantov <ab@fmap.me> | 2018-02-25 20:00:26 +0300 |
---|---|---|
committer | Nikolay Amiantov <ab@fmap.me> | 2018-02-25 22:24:09 +0300 |
commit | 25079ad238144950fc846eaf90b77439844d0832 (patch) | |
tree | 56210afd0999357fdc40bfec60860b4bae79a4da /pkgs/applications/science/math/caffe | |
parent | 1bfca90bf7f099efb28c86131341c3697178b869 (diff) | |
download | nixlib-25079ad238144950fc846eaf90b77439844d0832.tar nixlib-25079ad238144950fc846eaf90b77439844d0832.tar.gz nixlib-25079ad238144950fc846eaf90b77439844d0832.tar.bz2 nixlib-25079ad238144950fc846eaf90b77439844d0832.tar.lz nixlib-25079ad238144950fc846eaf90b77439844d0832.tar.xz nixlib-25079ad238144950fc846eaf90b77439844d0832.tar.zst nixlib-25079ad238144950fc846eaf90b77439844d0832.zip |
caffe: depend on opencv3
openblas is used since it's propagated from OpenCV and ATLAS compiled without architecture-specific optimizations is generally slower than OpenBLAS as I heard.
Diffstat (limited to 'pkgs/applications/science/math/caffe')
-rw-r--r-- | pkgs/applications/science/math/caffe/default.nix | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/pkgs/applications/science/math/caffe/default.nix b/pkgs/applications/science/math/caffe/default.nix index 8dc3e3ce43dc..dc9c5f7359ec 100644 --- a/pkgs/applications/science/math/caffe/default.nix +++ b/pkgs/applications/science/math/caffe/default.nix @@ -7,11 +7,11 @@ , hdf5-cpp , leveldb , lmdb -, opencv +, opencv3 , protobuf , snappy -, atlas , doxygen +, openblas , cudaSupport ? true, cudatoolkit , cudnnSupport ? false, cudnn ? null , pythonSupport ? false, python ? null, numpy ? null @@ -35,12 +35,15 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake doxygen ]; - cmakeFlags = [ - "-DCUDA_ARCH_NAME=All" - (if pythonSupport then "-Dpython_version=${python.version}" else "-DBUILD_python=OFF") - ] ++ lib.optional (!cudaSupport) "-DCPU_ONLY=ON"; + cmakeFlags = + [ (if pythonSupport then "-Dpython_version=${python.version}" else "-DBUILD_python=OFF") + "-DBLAS=open" + ] ++ (if cudaSupport then [ + "-DCUDA_ARCH_NAME=All" + "-DCUDA_HOST_COMPILER=${cudatoolkit.cc}/bin/cc" + ] else [ "-DCPU_ONLY=ON" ]); - buildInputs = [ boost google-gflags glog protobuf hdf5-cpp lmdb leveldb snappy opencv atlas ] + buildInputs = [ boost google-gflags glog protobuf hdf5-cpp lmdb leveldb snappy opencv3 openblas ] ++ lib.optional cudaSupport cudatoolkit ++ lib.optional cudnnSupport cudnn ++ lib.optionals pythonSupport [ python numpy ]; |