cntk: partially unbreak
* Use GCC 7 to unbreak the build; * Mark CUDA build as broken due to cub incompatibility.
This commit is contained in:
parent
d9a068b8b7
commit
de171ba0c6
@ -1,7 +1,7 @@
|
|||||||
{ config, lib, stdenv, fetchgit, fetchFromGitHub, cmake
|
{ lib, stdenv, fetchgit, fetchFromGitHub, cmake
|
||||||
, openblas, opencv3, libzip, boost, protobuf, openmpi
|
, openblas, opencv3, libzip, boost, protobuf, openmpi
|
||||||
, onebitSGDSupport ? false
|
, onebitSGDSupport ? false
|
||||||
, cudaSupport ? config.cudaSupport or false, cudatoolkit, nvidia_x11
|
, cudaSupport ? false, addOpenGLRunpath, cudatoolkit, nvidia_x11
|
||||||
, cudnnSupport ? cudaSupport, cudnn
|
, cudnnSupport ? cudaSupport, cudnn
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -27,7 +27,10 @@ in stdenv.mkDerivation rec {
|
|||||||
sha256 = "18l9k7s966a26ywcf7flqyhm61788pcb9fj3wk61jrmgkhy2pcns";
|
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 ]
|
buildInputs = [ openblas opencv3 libzip boost protobuf openmpi ]
|
||||||
++ lib.optional cudaSupport cudatoolkit
|
++ lib.optional cudaSupport cudatoolkit
|
||||||
@ -69,6 +72,7 @@ in stdenv.mkDerivation rec {
|
|||||||
ln -s ${cudnn}/include cuda
|
ln -s ${cudnn}/include cuda
|
||||||
export configureFlags="$configureFlags --with-cudnn=$PWD"
|
export configureFlags="$configureFlags --with-cudnn=$PWD"
|
||||||
''}
|
''}
|
||||||
|
|
||||||
../configure $configureFlags
|
../configure $configureFlags
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -79,9 +83,18 @@ in stdenv.mkDerivation rec {
|
|||||||
cp bin/cntk $out/bin
|
cp bin/cntk $out/bin
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
postFixup = lib.optionalString cudaSupport ''
|
||||||
|
for lib in $out/lib/*; do
|
||||||
|
addOpenGLRunpath "$lib"
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = with lib; {
|
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;
|
homepage = https://github.com/Microsoft/CNTK;
|
||||||
description = "An open source deep-learning toolkit";
|
description = "An open source deep-learning toolkit";
|
||||||
license = if onebitSGDSupport then licenses.unfreeRedistributable else licenses.mit;
|
license = if onebitSGDSupport then licenses.unfreeRedistributable else licenses.mit;
|
||||||
|
@ -23554,8 +23554,10 @@ in
|
|||||||
caffeine-ng = callPackage ../tools/X11/caffeine-ng {};
|
caffeine-ng = callPackage ../tools/X11/caffeine-ng {};
|
||||||
|
|
||||||
cntk = callPackage ../applications/science/math/cntk {
|
cntk = callPackage ../applications/science/math/cntk {
|
||||||
|
stdenv = gcc7Stdenv;
|
||||||
inherit (linuxPackages) nvidia_x11;
|
inherit (linuxPackages) nvidia_x11;
|
||||||
opencv3 = opencv3WithoutCuda; # Used only for image loading.
|
opencv3 = opencv3WithoutCuda; # Used only for image loading.
|
||||||
|
cudaSupport = pkgs.config.cudaSupport or false;
|
||||||
};
|
};
|
||||||
|
|
||||||
ecm = callPackage ../applications/science/math/ecm { };
|
ecm = callPackage ../applications/science/math/ecm { };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user