nixpkgs/pkgs/development/libraries/oneDNN/2.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
1.3 KiB
Nix
Raw Normal View History

2023-08-16 17:17:17 +02:00
{ cmake
, fetchFromGitHub
, lib
, stdenv
}:
2023-06-14 18:09:40 +02:00
# 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
2023-08-16 17:17:17 +02:00
stdenv.mkDerivation (finalAttrs: {
2023-06-14 18:09:40 +02:00
pname = "oneDNN";
2023-08-16 02:46:43 +02:00
version = "2.7.5";
2023-06-14 18:09:40 +02:00
src = fetchFromGitHub {
owner = "oneapi-src";
repo = "oneDNN";
2023-08-16 17:17:17 +02:00
rev = "v${finalAttrs.version}";
2023-08-16 02:46:43 +02:00
sha256 = "sha256-oMPBORAdL2rk2ewyUrInYVHYBRvuvNX4p4rwykO3Rhs=";
2023-06-14 18:09:40 +02:00
};
outputs = [ "out" "dev" "doc" ];
nativeBuildInputs = [ cmake ];
# Tests fail on some Hydra builders, because they do not support SSE4.2.
doCheck = false;
# 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-08-16 17:17:17 +02:00
meta = {
changelog = "https://github.com/oneapi-src/oneDNN/releases/tag/v${finalAttrs.version}";
2023-06-14 18:09:40 +02:00
description = "oneAPI Deep Neural Network Library (oneDNN)";
homepage = "https://01.org/oneDNN";
2023-08-16 17:17:17 +02:00
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ alexarice bhipple ];
platforms = lib.platforms.all;
2023-06-14 18:09:40 +02:00
};
2023-08-16 17:17:17 +02:00
})