2019-12-03 04:49:50 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, substituteAll, cmake, bash }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "dnnl";
|
2020-03-20 22:14:30 +00:00
|
|
|
version = "1.2.2";
|
2019-12-03 04:49:50 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "intel";
|
|
|
|
repo = "mkl-dnn";
|
|
|
|
rev = "v${version}";
|
2020-03-20 22:14:30 +00:00
|
|
|
sha256 = "0ydy7ibm6sh1awrikyj938n26cpg5magnxraz2d0pj76irv4vj5m";
|
2019-12-03 04:49:50 +00:00
|
|
|
};
|
|
|
|
|
2020-02-03 01:24:23 +00:00
|
|
|
# Generic fix merged upstream in https://github.com/intel/mkl-dnn/pull/631
|
|
|
|
# Delete after next release
|
2019-12-03 04:49:50 +00:00
|
|
|
patches = [ (substituteAll {
|
|
|
|
src = ./bash-to-sh.patch;
|
|
|
|
inherit bash;
|
|
|
|
}) ];
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" "doc" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2020-02-03 01:24:23 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2019-12-03 04:49:50 +00:00
|
|
|
# The test driver doesn't add an RPath to the build libdir
|
|
|
|
preCheck = ''
|
|
|
|
export LD_LIBRARY_PATH=$PWD/src
|
|
|
|
'';
|
|
|
|
|
2020-02-03 01:24:23 +00:00
|
|
|
# The cmake install gets tripped up and installs a nix tree into $out, in
|
|
|
|
# addition to the correct install; clean it up.
|
|
|
|
postInstall = ''
|
|
|
|
rm -r $out/nix
|
|
|
|
'';
|
2019-12-03 04:49:50 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Deep Neural Network Library (DNNL)";
|
|
|
|
homepage = "https://intel.github.io/mkl-dnn/dev_guide_transition_to_dnnl.html";
|
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
maintainers = with maintainers; [ alexarice bhipple ];
|
|
|
|
};
|
|
|
|
}
|