diff mbox series

[bug#72432,1/2] gnu: Add dlpack.

Message ID 20240803210441.7297-1-ngraves@ngraves.fr
State New
Headers show
Series [bug#72432,1/2] gnu: Add dlpack. | expand

Commit Message

Nicolas Graves Aug. 3, 2024, 9:04 p.m. UTC
* gnu/packages/machine-learning.scm (dlpack): New variable.

Change-Id: I9223e5c3b8f8317f88954cfdaccdfa11a51b7167
---
 gnu/packages/machine-learning.scm | 34 +++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 4c5b713cbf..600e111594 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -133,6 +133,40 @@  (define-module (gnu packages machine-learning)
   #:use-module (gnu packages xorg)
   #:use-module (ice-9 match))
 
+(define-public dlpack
+  (package
+    (name "dlpack")
+    (version "0.8")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/dmlc/dlpack")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1jmfvdrx8dn9b0ksm04ixha0jnrk35ip796qg98kfz6g7niw5ir1"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list #:tests? #f)) ; no tests.
+    (home-page "https://github.com/dmlc/dlpack")
+    (synopsis "In Memory Tensor Structure")
+    (description "This package provides an open in-memory tensor structure for
+sharing tensors among frameworks.  DLPack enables
+@itemize
+@item Easier sharing of operators between deep learning frameworks.
+@item Easier wrapping of vendor level operator implementations, allowing
+collaboration when introducing new devices/ops.
+@item Quick swapping of backend implementations, like different version of
+BLAS
+@item For final users,this could bring more operators, and possibility of
+mixing usage between frameworks.
+@end itemize
+
+This package does not intend to implement Tensor and Ops, but instead use this
+as common bridge to reuse tensor and ops across frameworks.")
+    (license license:asl2.0)))
+
 (define-public fasttext
   (package
     (name "fasttext")