diff options
author | Nikolay Amiantov <ab@fmap.me> | 2019-10-05 16:17:37 +0300 |
---|---|---|
committer | Nikolay Amiantov <ab@fmap.me> | 2019-10-05 16:18:20 +0300 |
commit | de171ba0c687374bd5694c57ff85c8d29f8aa1f1 (patch) | |
tree | 48ab162434211e7fa8f29212260f386054266a93 /pkgs/applications/science | |
parent | d9a068b8b71c7289632b4d90e2d0b3380cafd5f2 (diff) | |
download | nixlib-de171ba0c687374bd5694c57ff85c8d29f8aa1f1.tar nixlib-de171ba0c687374bd5694c57ff85c8d29f8aa1f1.tar.gz nixlib-de171ba0c687374bd5694c57ff85c8d29f8aa1f1.tar.bz2 nixlib-de171ba0c687374bd5694c57ff85c8d29f8aa1f1.tar.lz nixlib-de171ba0c687374bd5694c57ff85c8d29f8aa1f1.tar.xz nixlib-de171ba0c687374bd5694c57ff85c8d29f8aa1f1.tar.zst nixlib-de171ba0c687374bd5694c57ff85c8d29f8aa1f1.zip |
cntk: partially unbreak
* Use GCC 7 to unbreak the build; * Mark CUDA build as broken due to cub incompatibility.
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r-- | pkgs/applications/science/math/cntk/default.nix | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/pkgs/applications/science/math/cntk/default.nix b/pkgs/applications/science/math/cntk/default.nix index c20a6954c3cb..ceb87b25ba85 100644 --- a/pkgs/applications/science/math/cntk/default.nix +++ b/pkgs/applications/science/math/cntk/default.nix @@ -1,7 +1,7 @@ -{ config, lib, stdenv, fetchgit, fetchFromGitHub, cmake +{ lib, stdenv, fetchgit, fetchFromGitHub, cmake , openblas, opencv3, libzip, boost, protobuf, openmpi , onebitSGDSupport ? false -, cudaSupport ? config.cudaSupport or false, cudatoolkit, nvidia_x11 +, cudaSupport ? false, addOpenGLRunpath, cudatoolkit, nvidia_x11 , cudnnSupport ? cudaSupport, cudnn }: @@ -27,7 +27,10 @@ in stdenv.mkDerivation rec { sha256 = "18l9k7s966a26ywcf7flqyhm61788pcb9fj3wk61jrmgkhy2pcns"; }; - nativeBuildInputs = [ cmake ]; + nativeBuildInputs = [ cmake ] ++ lib.optional cudaSupport addOpenGLRunpath; + + # Force OpenMPI to use g++ in PATH. + OMPI_CXX = "g++"; buildInputs = [ openblas opencv3 libzip boost protobuf openmpi ] ++ lib.optional cudaSupport cudatoolkit @@ -69,6 +72,7 @@ in stdenv.mkDerivation rec { ln -s ${cudnn}/include cuda export configureFlags="$configureFlags --with-cudnn=$PWD" ''} + ../configure $configureFlags ''; @@ -79,9 +83,18 @@ in stdenv.mkDerivation rec { cp bin/cntk $out/bin ''; + postFixup = lib.optionalString cudaSupport '' + for lib in $out/lib/*; do + addOpenGLRunpath "$lib" + done + ''; + enableParallelBuilding = true; meta = with lib; { + # Newer cub is included with cudatoolkit now and it breaks the build. + # https://github.com/Microsoft/CNTK/issues/3191 + broken = cudaSupport; homepage = https://github.com/Microsoft/CNTK; description = "An open source deep-learning toolkit"; license = if onebitSGDSupport then licenses.unfreeRedistributable else licenses.mit; |