Merge pull request #147648 from veprbl/pr/mxnet_1_8_0

mxnet: 1.6.0 -> 1.8.0, enable on darwin
This commit is contained in:
Dmitry Kalinkin 2021-12-16 22:37:03 -05:00 committed by GitHub
commit 50a4c52747
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 9 deletions

View File

@ -1,5 +1,5 @@
{ config, stdenv, lib, fetchurl, bash, cmake
, opencv3, gtest, blas, perl
{ config, stdenv, lib, fetchurl, fetchpatch, bash, cmake
, opencv3, gtest, blas, gomp, llvmPackages, perl
, cudaSupport ? config.cudaSupport or false, cudatoolkit, nvidia_x11
, cudnnSupport ? cudaSupport, cudnn
}:
@ -8,18 +8,35 @@ assert cudnnSupport -> cudaSupport;
stdenv.mkDerivation rec {
pname = "mxnet";
version = "1.6.0";
version = "1.8.0";
src = fetchurl {
url = "https://github.com/apache/incubator-mxnet/releases/download/${version}/apache-mxnet-src-${version}-incubating.tar.gz";
sha256 = "1vvdb7pfh63kb9fzs6gqp95q550a3ck4cj9mqxlk9wwhkh30dsq1";
name = "apache-mxnet-src-${version}-incubating.tar.gz";
url = "https://dlcdn.apache.org/incubator/mxnet/${version}/apache-mxnet-src-${version}-incubating.tar.gz";
hash = "sha256-la/5hYlaukCcCNVRRRCuOLiEkM+2KBqzpf8PWCbI21Q=";
};
patches = [
# Fix build error https://github.com/apache/incubator-mxnet/issues/19405
(fetchpatch {
name = "mxnet-fix-gcc-linker-error-1.patch";
url = "https://github.com/apache/incubator-mxnet/commit/78e31d66d19e385ca4ef73245ce79a47e375d8d1.diff";
sha256 = "sha256-UfmGhh4RbvrEOXe6IJxHm1Aqpy1gS6gHxrX5KQBXjv4=";
})
(fetchpatch {
name = "mxnet-fix-gcc-linker-error-2.patch";
url = "https://github.com/apache/incubator-mxnet/commit/9bfe3116aabd01049fdbd90855cb245a30b795df.diff";
sha256 = "sha256-BL7Zf7Bgn0qpai9HbQ6LBxZNa3iLjVJSe5nxZgqI/fw=";
})
];
nativeBuildInputs = [ cmake perl ];
buildInputs = [ opencv3 gtest blas.provider ]
++ lib.optionals cudaSupport [ cudatoolkit nvidia_x11 ]
++ lib.optional cudnnSupport cudnn;
++ lib.optional stdenv.cc.isGNU gomp
++ lib.optional stdenv.cc.isClang llvmPackages.openmp
++ lib.optionals cudaSupport [ cudatoolkit nvidia_x11 ]
++ lib.optional cudnnSupport cudnn;
cmakeFlags =
[ "-DUSE_MKL_IF_AVAILABLE=OFF" ]
@ -48,6 +65,6 @@ stdenv.mkDerivation rec {
homepage = "https://mxnet.incubator.apache.org/";
maintainers = with maintainers; [ abbradar ];
license = licenses.asl20;
platforms = platforms.linux;
platforms = platforms.unix;
};
}

View File

@ -32046,7 +32046,6 @@ with pkgs;
mxnet = callPackage ../applications/science/math/mxnet {
inherit (linuxPackages) nvidia_x11;
stdenv = gcc9Stdenv;
};
wxmaxima = callPackage ../applications/science/math/wxmaxima { wxGTK = wxGTK30; };