3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/oneDNN/default.nix

47 lines
1.5 KiB
Nix
Raw Normal View History

{ stdenv, lib, fetchFromGitHub, cmake }:
# This was originally called mkl-dnn, then it was renamed to dnnl, and it has
# just recently been renamed again to oneDNN. See here for details:
# https://github.com/oneapi-src/oneDNN#oneapi-deep-neural-network-library-onednn
stdenv.mkDerivation rec {
pname = "oneDNN";
2020-07-21 10:20:00 +01:00
version = "1.5.1";
src = fetchFromGitHub {
owner = "oneapi-src";
repo = "oneDNN";
rev = "v${version}";
2020-07-21 10:20:00 +01:00
sha256 = "1l66gkidldjpznp8pb01wdgrmm0rmrbndv8lzidz8fp9hf473zgl";
};
outputs = [ "out" "dev" "doc" ];
nativeBuildInputs = [ cmake ];
doCheck = true;
# The test driver doesn't add an RPath to the build libdir
preCheck = ''
2020-07-20 10:20:00 +01:00
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD/src
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH''${DYLD_LIBRARY_PATH:+:}$PWD/src
'' + lib.optionalString stdenv.isx86_64 ''
# Use baseline SIMD in case CPU features get misdetected.
export DNNL_MAX_CPU_ISA=SSE41
'';
# 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
'';
meta = with lib; {
description = "oneAPI Deep Neural Network Library (oneDNN)";
2020-07-20 10:20:00 +01:00
homepage = "https://01.org/oneDNN";
changelog = "https://github.com/oneapi-src/oneDNN/releases/tag/v${version}";
license = licenses.asl20;
2020-07-20 10:20:00 +01:00
platforms = platforms.all;
maintainers = with maintainers; [ alexarice bhipple ];
};
}