summaryrefslogtreecommitdiff
path: root/gnu/packages/machine-learning.scm
diff options
context:
space:
mode:
authorDavid Elsing <[email protected]>2024-03-23 22:04:58 +0000
committerLudovic Courtès <[email protected]>2024-06-18 11:43:46 +0200
commitca63ef4f5b62bd6b3adcee6e9f00d69be3e26398 (patch)
tree2722bf4da7019e690398334c1991eb947acb9e65 /gnu/packages/machine-learning.scm
parentc45b370385e35a9d6444b16017cf08c97e1463ae (diff)
gnu: Add fbgemm.
* gnu/packages/machine-learning.scm (fbgemm): New variable. * gnu/packages/patches/fbgemm-use-system-libraries.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it.
Diffstat (limited to 'gnu/packages/machine-learning.scm')
-rw-r--r--gnu/packages/machine-learning.scm34
1 files changed, 34 insertions, 0 deletions
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index ddeb9a166a..837ff7df11 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -4115,6 +4115,40 @@ TensorFlow.js, PyTorch, and MediaPipe.")
"-DXNNPACK_BUILD_TESTS=FALSE" ;FIXME: see below
"-DXNNPACK_BUILD_BENCHMARKS=FALSE"))))))
+;; Warning: This package requires AVX2 or AVX-512 instructions.
+(define-public fbgemm
+ (package
+ (name "fbgemm")
+ (version "0.6.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/pytorch/fbgemm")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0mw30v55aicqdbh3xwfj9p8f38nw70ks5cxiwpgwjsk0dylah9rf"))
+ (patches (search-patches "fbgemm-use-system-libraries.patch"))
+ (modules '((guix build utils)))
+ (snippet
+ '(delete-file-recursively "third_party"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:configure-flags
+ ''("-DFBGEMM_LIBRARY_TYPE=shared")
+ ;; Tests require AVX2 or AVX-512 instructions
+ #:tests? #f))
+ (inputs (list asmjit cpuinfo))
+ (native-inputs (list pkg-config python googletest))
+ (home-page "https://github.com/pytorch/fbgemm")
+ (synopsis "Facebook GEneral Matrix Multiplication")
+ (description "Low-precision, high-performance matrix-matrix
+multiplications and convolution library for server-side inference.")
+ (supported-systems '("x86_64-linux"))
+ (license license:bsd-3)))
+
(define-public tensorpipe
(let ((commit "bb1473a4b38b18268e8693044afdb8635bc8351b")
(revision "0"))