diff options
Diffstat (limited to 'pkgs/applications/science/math')
-rw-r--r-- | pkgs/applications/science/math/caffe/default.nix | 21 | ||||
-rw-r--r-- | pkgs/applications/science/math/cbc/default.nix | 6 | ||||
-rw-r--r-- | pkgs/applications/science/math/cntk/default.nix | 28 | ||||
-rw-r--r-- | pkgs/applications/science/math/cntk/fix_std_bind.patch | 11 | ||||
-rw-r--r-- | pkgs/applications/science/math/mxnet/default.nix | 13 |
5 files changed, 46 insertions, 33 deletions
diff --git a/pkgs/applications/science/math/caffe/default.nix b/pkgs/applications/science/math/caffe/default.nix index 8dc3e3ce43dc..d7357c5048d5 100644 --- a/pkgs/applications/science/math/caffe/default.nix +++ b/pkgs/applications/science/math/caffe/default.nix @@ -7,17 +7,19 @@ , hdf5-cpp , leveldb , lmdb -, opencv +, opencv3 , protobuf , snappy -, atlas , doxygen +, openblas , cudaSupport ? true, cudatoolkit , cudnnSupport ? false, cudnn ? null +, ncclSupport ? false, nccl ? null , pythonSupport ? false, python ? null, numpy ? null }: assert cudnnSupport -> cudaSupport; +assert ncclSupport -> cudaSupport; assert pythonSupport -> (python != null && numpy != null); stdenv.mkDerivation rec { @@ -35,14 +37,19 @@ 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" ]) + ++ lib.optional ncclSupport "-DUSE_NCCL=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.optional ncclSupport nccl ++ lib.optionals pythonSupport [ python numpy ]; propagatedBuildInputs = lib.optional pythonSupport python.pkgs.protobuf; diff --git a/pkgs/applications/science/math/cbc/default.nix b/pkgs/applications/science/math/cbc/default.nix index 7643c912db4b..6de77d81be6f 100644 --- a/pkgs/applications/science/math/cbc/default.nix +++ b/pkgs/applications/science/math/cbc/default.nix @@ -1,11 +1,11 @@ { lib, stdenv, fetchurl, zlib, bzip2 }: stdenv.mkDerivation { - name = "cbc-2.9.5"; + name = "cbc-2.9.9"; src = fetchurl { - url = "http://www.coin-or.org/download/source/Cbc/Cbc-2.9.5.tgz"; - sha256 = "0kmsg9qpajh5jhnql04m6akpdjzlppxfz99q320vw5bkzgl3i18w"; + url = "http://www.coin-or.org/download/source/Cbc/Cbc-2.9.9.tgz"; + sha256 = "1w8axdzm05xf5y13c31w7rc5z6ywxqxiwafnxcq3p195kgj0915a"; }; configureFlags = "-C"; diff --git a/pkgs/applications/science/math/cntk/default.nix b/pkgs/applications/science/math/cntk/default.nix index bef695fc650a..07740f4c8aea 100644 --- a/pkgs/applications/science/math/cntk/default.nix +++ b/pkgs/applications/science/math/cntk/default.nix @@ -12,28 +12,22 @@ let cub = fetchFromGitHub { owner = "NVlabs"; repo = "cub"; - rev = "1.4.1"; - sha256 = "1lcdwblz03c0yq1lxndg566kg14b5qm14x5qixjbmz6wq85kgmqc"; + rev = "1.7.4"; + sha256 = "0ksd5n1lxqhm5l5cd2lps4cszhjkf6gmzahaycs7nxb06qci8c66"; }; in stdenv.mkDerivation rec { name = "CNTK-${version}"; - version = "2.2"; + version = "2.4"; # Submodules src = fetchgit { url = "https://github.com/Microsoft/CNTK"; rev = "v${version}"; - sha256 = "0q4knrwiyphb2fbqf9jzqvkz2jzj6jmbmang3lavdvsh7z0n8zz9"; + sha256 = "0m28wb0ljixcpi14g3gcfiraimh487yxqhd9yrglgyvjb69x597y"; }; - patches = [ - # Fix "'exp' was not declared" - (fetchpatch { - url = "https://github.com/imriss/CNTK/commit/ef1cca6df95cc507deb8471df2c0dd8cbfeef23b.patch"; - sha256 = "0z7xyrxwric0c4h7rfs05f544mcq6d10wgs0vvfcyd2pcf410hy7"; - }) - ]; + patches = [ ./fix_std_bind.patch ]; nativeBuildInputs = [ cmake ]; @@ -48,8 +42,10 @@ in stdenv.mkDerivation rec { "--with-boost=${boost.dev}" "--with-protobuf=${protobuf}" "--with-mpi=${openmpi}" + "--cuda=${if cudaSupport then "yes" else "no"}" + # FIXME + "--asgd=no" ] ++ lib.optionals cudaSupport [ - "--cuda=yes" "--with-cuda=${cudatoolkit}" "--with-gdk-include=${cudatoolkit}/include" "--with-gdk-nvml-lib=${nvidia_x11}/lib" @@ -85,16 +81,12 @@ in stdenv.mkDerivation rec { cp bin/cntk $out/bin ''; - hardeningDisable = [ "format" ]; - - # on 2.2: fatal error: tensorboard/tensorboard.pb.h: No such file or directory - enableParallelBuilding = false; + enableParallelBuilding = true; meta = with lib; { - homepage = "https://github.com/Microsoft/CNTK"; + homepage = https://github.com/Microsoft/CNTK; description = "An open source deep-learning toolkit"; license = if onebitSGDSupport then licenses.unfreeRedistributable else licenses.mit; maintainers = with maintainers; [ abbradar ]; - broken = true; # Never succeeded to build. }; } diff --git a/pkgs/applications/science/math/cntk/fix_std_bind.patch b/pkgs/applications/science/math/cntk/fix_std_bind.patch new file mode 100644 index 000000000000..df97a0c66669 --- /dev/null +++ b/pkgs/applications/science/math/cntk/fix_std_bind.patch @@ -0,0 +1,11 @@ +diff -ru3 CNTK-old/Source/CNTKv2LibraryDll/EvaluatorWrapper.h CNTK-new/Source/CNTKv2LibraryDll/EvaluatorWrapper.h +--- CNTK-old/Source/CNTKv2LibraryDll/EvaluatorWrapper.h 1970-01-01 03:00:01.000000000 +0300 ++++ CNTK-new/Source/CNTKv2LibraryDll/EvaluatorWrapper.h 2018-02-25 18:16:16.330269647 +0300 +@@ -9,6 +9,7 @@ + #include <boost/noncopyable.hpp> + #include <memory> + #include <vector> ++#include <functional> + + #include "CNTKLibrary.h" + #include "CNTKLibraryC.h" diff --git a/pkgs/applications/science/math/mxnet/default.nix b/pkgs/applications/science/math/mxnet/default.nix index d2f3d0c5f337..ce9c214b3f0c 100644 --- a/pkgs/applications/science/math/mxnet/default.nix +++ b/pkgs/applications/science/math/mxnet/default.nix @@ -8,7 +8,7 @@ assert cudnnSupport -> cudaSupport; stdenv.mkDerivation rec { name = "mxnet-${version}"; - version = "0.11.0"; + version = "1.1.0"; # Submodules needed src = fetchgit { @@ -23,9 +23,12 @@ stdenv.mkDerivation rec { ++ lib.optionals cudaSupport [ cudatoolkit nvidia_x11 ] ++ lib.optional cudnnSupport cudnn; - cmakeFlags = [ - (if cudaSupport then "-DCUDA_ARCH_NAME=All" else "-DUSE_CUDA=OFF") - ] ++ lib.optional (!cudnnSupport) "-DUSE_CUDNN=OFF"; + cmakeFlags = + (if cudaSupport then [ + "-DCUDA_ARCH_NAME=All" + "-DCUDA_HOST_COMPILER=${cudatoolkit.cc}/bin/cc" + ] else [ "-DUSE_CUDA=OFF" ]) + ++ lib.optional (!cudnnSupport) "-DUSE_CUDNN=OFF"; installPhase = '' install -Dm755 libmxnet.so $out/lib/libmxnet.so @@ -36,7 +39,7 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { description = "Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler"; - homepage = "https://mxnet.incubator.apache.org/"; + homepage = https://mxnet.incubator.apache.org/; maintainers = with maintainers; [ abbradar ]; license = licenses.asl20; platforms = platforms.linux; |