summaryrefslogtreecommitdiff
path: root/gnu/packages/machine-learning.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/machine-learning.scm')
-rw-r--r--gnu/packages/machine-learning.scm44
1 files changed, 44 insertions, 0 deletions
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 837ebbba67..8140380db9 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -70,6 +70,7 @@
#:use-module (gnu packages mpi)
#:use-module (gnu packages ocaml)
#:use-module (gnu packages onc-rpc)
+ #:use-module (gnu packages opencl)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages protobuf)
@@ -1955,6 +1956,49 @@ any function). It currently contains the interface and IO code from the Shap
project, and it will potentially also do the same for the Lime project.")
(license license:expat)))
+(define-public onednn
+ (package
+ (name "onednn")
+ (version "2.2.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/oneapi-src/oneDNN")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ ;; GPU tests fail with: "C++ exception with description 'could not
+ ;; create an engine' thrown in auxiliary test code (environments or
+ ;; event listeners)". It may be because of the build environment
+ ;; isolation. Disable them for now.
+ (patches (search-patches "onednn-disable-gpu-tests.patch"
+ "onednn-use-system-googletest.patch"))
+ (sha256
+ (base32 "1a7fak7g8zpv1hnbnnnv964bkvdpwm5vgsx39j2sp2jswwh5s7g5"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(;; See doc/build/build_options.md for a list of build options.
+ #:configure-flags (list "-DDNNL_BUILD_EXAMPLES=OFF"
+ "-DDNNL_GPU_RUNTIME=OCL")))
+ (native-inputs
+ `(("googletest" ,googletest)
+ ("opencl-headers" ,opencl-headers)
+ ("python" ,python-wrapper)))
+ (inputs
+ `(("ocl-icd" ,ocl-icd)))
+ (home-page "https://01.org/oneDNN")
+ (synopsis "Library of building blocks for deep learning applications")
+ ;; See "Requirements for Building from Source" in the README for a list.
+ (supported-systems '("x86_64-linux" "aarch-64-linux"))
+ (description
+ "oneAPI Deep Neural Network Library (oneDNN) is a performance library of
+basic building blocks for deep learning applications. It is intended for deep
+learning applications and framework developers interested in improving
+application performance on Intel CPUs and GPUs.")
+ ;; See THIRD-PARTY-PROGRAMS for a full list.
+ (license (list license:asl2.0 ;oneDNN
+ license:bsd-3)))) ;XByak, IIT API
+
(define-public python-keras-applications
(package
(name "python-keras-applications")