summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2018-02-25 19:58:21 +0300
committerNikolay Amiantov <ab@fmap.me>2018-02-25 22:24:09 +0300
commit1bfca90bf7f099efb28c86131341c3697178b869 (patch)
tree2f2b2ca491049128e26ad0a7d4706798935c8519 /pkgs/applications
parent605a4d4eedb038114076e8bc04d8a0cb205e82f6 (diff)
cntk: 2.2 -> 2.4
Comment for `broken` indicates that it never worked at all, which is strange
since on my machine it did. Anyway it works now for me.
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/science/math/cntk/default.nix24
-rw-r--r--pkgs/applications/science/math/cntk/fix_std_bind.patch11
2 files changed, 19 insertions, 16 deletions
diff --git a/pkgs/applications/science/math/cntk/default.nix b/pkgs/applications/science/math/cntk/default.nix
index bb78fbe235512..b8e3f2e31e12c 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 ];
 
@@ -50,6 +44,8 @@ in stdenv.mkDerivation rec {
     "--with-mpi=${openmpi}"
   ] ++ lib.optionals cudaSupport [
     "--cuda=yes"
+    # FIXME
+    "--asgd=no"
     "--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;
     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 0000000000000..df97a0c666695
--- /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"