mxnet: disable GPU autodetection

This commit is contained in:
Nikolay Amiantov 2017-09-17 19:35:47 +03:00
parent 098c6825e0
commit 67bbe467a4
2 changed files with 8 additions and 5 deletions

View file

@ -1,6 +1,6 @@
{ stdenv, lib, fetchgit, cmake
, opencv, gtest, openblas, liblapack
, cudaSupport ? false, cudatoolkit
, cudaSupport ? false, cudatoolkit, nvidia_x11
, cudnnSupport ? false, cudnn
}:
@ -20,11 +20,12 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
buildInputs = [ opencv gtest openblas liblapack ]
++ lib.optional cudaSupport cudatoolkit
++ lib.optionals cudaSupport [ cudatoolkit nvidia_x11 ]
++ lib.optional cudnnSupport cudnn;
cmakeFlags = lib.optional (!cudaSupport) "-DUSE_CUDA=OFF"
++ lib.optional (!cudnnSupport) "-DUSE_CUDNN=OFF";
cmakeFlags = [
(if cudaSupport then "-DCUDA_ARCH_NAME=All" else "-DUSE_CUDA=OFF")
] ++ lib.optional (!cudnnSupport) "-DUSE_CUDNN=OFF";
installPhase = ''
install -Dm755 libmxnet.so $out/lib/libmxnet.so

View file

@ -18559,7 +18559,9 @@ with pkgs;
sbcl = null;
};
mxnet = callPackage ../applications/science/math/mxnet { };
mxnet = callPackage ../applications/science/math/mxnet {
inherit (linuxPackages) nvidia_x11;
};
wxmaxima = callPackage ../applications/science/math/wxmaxima { wxGTK = wxGTK30; };