about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/oneDNN
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/oneDNN')
-rw-r--r--nixpkgs/pkgs/development/libraries/oneDNN/2.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/oneDNN/default.nix45
2 files changed, 90 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/oneDNN/2.nix b/nixpkgs/pkgs/development/libraries/oneDNN/2.nix
new file mode 100644
index 000000000000..8851b09214f1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/oneDNN/2.nix
@@ -0,0 +1,45 @@
+{ cmake
+, fetchFromGitHub
+, lib
+, stdenv
+}:
+
+# 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 (finalAttrs: {
+  pname = "oneDNN";
+  version = "2.7.5";
+
+  src = fetchFromGitHub {
+    owner = "oneapi-src";
+    repo = "oneDNN";
+    rev = "v${finalAttrs.version}";
+    sha256 = "sha256-oMPBORAdL2rk2ewyUrInYVHYBRvuvNX4p4rwykO3Rhs=";
+  };
+
+  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}/" ""
+  '';
+
+  meta = {
+    changelog = "https://github.com/oneapi-src/oneDNN/releases/tag/v${finalAttrs.version}";
+    description = "oneAPI Deep Neural Network Library (oneDNN)";
+    homepage = "https://01.org/oneDNN";
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ alexarice bhipple ];
+    platforms = lib.platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/oneDNN/default.nix b/nixpkgs/pkgs/development/libraries/oneDNN/default.nix
new file mode 100644
index 000000000000..7448a99439d0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/oneDNN/default.nix
@@ -0,0 +1,45 @@
+{ cmake
+, fetchFromGitHub
+, lib
+, stdenv
+}:
+
+# 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 (finalAttrs: {
+  pname = "oneDNN";
+  version = "3.2.1";
+
+  src = fetchFromGitHub {
+    owner = "oneapi-src";
+    repo = "oneDNN";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-/LbT2nHPpZHjY3xbJ9bDabR7aIMvetNP4mB+rxuTfy8=";
+  };
+
+  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}/" ""
+  '';
+
+  meta = {
+    changelog = "https://github.com/oneapi-src/oneDNN/releases/tag/v${finalAttrs.version}";
+    description = "oneAPI Deep Neural Network Library (oneDNN)";
+    homepage = "https://01.org/oneDNN";
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ bhipple ];
+    platforms = lib.platforms.all;
+  };
+})