2023-10-09 19:29:22 +00:00
|
|
|
{ cmake
|
|
|
|
, fetchFromGitHub
|
|
|
|
, lib
|
|
|
|
, stdenv
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# This was originally called mkl-dnn, then it was renamed to dnnl, and it has
|
2020-05-15 21:57:56 +00:00
|
|
|
# just recently been renamed again to oneDNN. See here for details:
|
2020-04-24 23:36:52 +00:00
|
|
|
# https://github.com/oneapi-src/oneDNN#oneapi-deep-neural-network-library-onednn
|
2023-10-09 19:29:22 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-05-15 21:57:56 +00:00
|
|
|
pname = "oneDNN";
|
2023-08-22 20:05:09 +00:00
|
|
|
version = "3.2.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "oneapi-src";
|
|
|
|
repo = "oneDNN";
|
2023-10-09 19:29:22 +00:00
|
|
|
rev = "v${finalAttrs.version}";
|
|
|
|
hash = "sha256-/LbT2nHPpZHjY3xbJ9bDabR7aIMvetNP4mB+rxuTfy8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" "doc" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
# Tests fail on some Hydra builders, because they do not support SSE4.2.
|
|
|
|
doCheck = false;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
# Fixup bad cmake paths
|
|
|
|
postInstall = ''
|
|
|
|
substituteInPlace $out/lib/cmake/dnnl/dnnl-config.cmake \
|
|
|
|
--replace "\''${PACKAGE_PREFIX_DIR}/" ""
|
|
|
|
|
|
|
|
substituteInPlace $out/lib/cmake/dnnl/dnnl-targets.cmake \
|
|
|
|
--replace "\''${_IMPORT_PREFIX}/" ""
|
|
|
|
'';
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
meta = {
|
|
|
|
changelog = "https://github.com/oneapi-src/oneDNN/releases/tag/v${finalAttrs.version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "oneAPI Deep Neural Network Library (oneDNN)";
|
2020-08-20 17:08:02 +00:00
|
|
|
homepage = "https://01.org/oneDNN";
|
2023-10-09 19:29:22 +00:00
|
|
|
license = lib.licenses.asl20;
|
|
|
|
maintainers = with lib.maintainers; [ bhipple ];
|
|
|
|
platforms = lib.platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2023-10-09 19:29:22 +00:00
|
|
|
})
|