diff options
author | Benjamin Hipple <bhipple@protonmail.com> | 2019-12-02 23:49:50 -0500 |
---|---|---|
committer | Jon <jonringer@users.noreply.github.com> | 2020-01-24 02:01:18 -0800 |
commit | d4119389bd7ec02e3a0bbd9b556b44d60f6a673e (patch) | |
tree | 95abda7028a5521ba587d6e2be1e711b65ea65f8 /pkgs/development | |
parent | 52487f4e431d836eb3ecb87af24915967062d862 (diff) | |
download | nixpkgs-d4119389bd7ec02e3a0bbd9b556b44d60f6a673e.tar nixpkgs-d4119389bd7ec02e3a0bbd9b556b44d60f6a673e.tar.gz nixpkgs-d4119389bd7ec02e3a0bbd9b556b44d60f6a673e.tar.bz2 nixpkgs-d4119389bd7ec02e3a0bbd9b556b44d60f6a673e.tar.lz nixpkgs-d4119389bd7ec02e3a0bbd9b556b44d60f6a673e.tar.xz nixpkgs-d4119389bd7ec02e3a0bbd9b556b44d60f6a673e.tar.zst nixpkgs-d4119389bd7ec02e3a0bbd9b556b44d60f6a673e.zip |
dnnl: init at 1.1.2
This commit continues the work proposed in #68014, and provides an entirely FOSS variant of the `dnnl` package. Updates to add an `mkl` flavor will be added later, pending discussion about the cleanest way to overlay this consistently. Fixes #67982, closes #68014 Co-authored-by: Alex Rice <alexrice999@hotmail.co.uk>
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/libraries/dnnl/bash-to-sh.patch | 13 | ||||
-rw-r--r-- | pkgs/development/libraries/dnnl/default.nix | 39 |
2 files changed, 52 insertions, 0 deletions
diff --git a/pkgs/development/libraries/dnnl/bash-to-sh.patch b/pkgs/development/libraries/dnnl/bash-to-sh.patch new file mode 100644 index 00000000000..063d9ef952b --- /dev/null +++ b/pkgs/development/libraries/dnnl/bash-to-sh.patch @@ -0,0 +1,13 @@ +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index f6810246..e1d2a1f1 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -72,7 +72,7 @@ if(UNIX OR MINGW) + set(test_c_symbols "${CMAKE_CURRENT_BINARY_DIR}/test_c_symbols.c") + add_custom_command( + OUTPUT ${test_c_symbols} +- COMMAND /bin/bash ${CMAKE_CURRENT_SOURCE_DIR}/generate_c_symbols_refs.sh ++ COMMAND @bash@/bin/bash ${CMAKE_CURRENT_SOURCE_DIR}/generate_c_symbols_refs.sh + ${CMAKE_CURRENT_SOURCE_DIR}/.. ${test_c_symbols} ${include_dirs} + ) + register_exe(test_c_symbols-c ${test_c_symbols} "test") diff --git a/pkgs/development/libraries/dnnl/default.nix b/pkgs/development/libraries/dnnl/default.nix new file mode 100644 index 00000000000..8a02ea1598c --- /dev/null +++ b/pkgs/development/libraries/dnnl/default.nix @@ -0,0 +1,39 @@ +{ stdenv, lib, fetchFromGitHub, substituteAll, cmake, bash }: + +stdenv.mkDerivation rec { + pname = "dnnl"; + version = "1.1.2"; + + src = fetchFromGitHub { + owner = "intel"; + repo = "mkl-dnn"; + rev = "v${version}"; + sha256 = "150cdyfiw4izvzmbmdqidwadppb1qjmzhpaqjczm397ygi1m92l1"; + }; + + # Generic fix upstreamed in https://github.com/intel/mkl-dnn/pull/631 + # Delete patch when 1.2.0 is released + patches = [ (substituteAll { + src = ./bash-to-sh.patch; + inherit bash; + }) ]; + + outputs = [ "out" "dev" "doc" ]; + + nativeBuildInputs = [ cmake ]; + + # The test driver doesn't add an RPath to the build libdir + preCheck = '' + export LD_LIBRARY_PATH=$PWD/src + ''; + + doCheck = true; + + 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 ]; + }; +} |