guix_mirror_bot pushed a commit to branch master
in repository guix.
commit 02dba5ab3ec6d13c75c0778bb087a1875cdc7c2f
Author: Cayetano Santos <[email protected]>
AuthorDate: Sun Feb 8 11:13:14 2026 +0100
gnu: Add ggml.
* gnu/packages/machine-learning.scm (ggml): New variable.
Merges guix/guix!6238
Change-Id: Iebfff1cd9587a3ba3bb02020533c658b6c21f614
---
gnu/packages/machine-learning.scm | 46 +++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)
diff --git a/gnu/packages/machine-learning.scm
b/gnu/packages/machine-learning.scm
index c4f4ef4230..c8f7e8727c 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -207,6 +207,52 @@ frameworks.")
representations and sentence classification.")
(license license:expat)))
+(define-public ggml
+ (package
+ (name "ggml")
+ (version "0.9.6")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ggml-org/ggml")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0l979hsbqbiwi8wl6z43r2gras4xhw1v1dd3rcap97s3jysb6bda"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:configure-flags
+ #~(list #$(string-append "-DGGML_BUILD_NUMBER=" version)
+ "-DBUILD_SHARED_LIBS_DEFAULT=ON"
+ "-DGGML_BACKEND_DL=ON"
+ "-DGGML_VULKAN=ON"
+ "-DGGML_BUILD_TESTS=ON"
+ "-DGGML_OPENCL=ON"
+ "-DGGML_NATIVE_DEFAULT=OFF" ;no '-march=native'
+ "-DGGML_BLAS_DEFAULT=ON"
+ "-DGGML_BLAS_VENDOR_DEFAULT=OpenBLAS")))
+ (inputs
+ (list glslang
+ openblas
+ openblas-ilp64
+ opencl-icd-loader
+ shaderc
+ spirv-headers
+ spirv-tools
+ vulkan-headers
+ vulkan-loader))
+ (native-inputs
+ (list opencl-headers pkg-config python-minimal-wrapper))
+ (properties '((tunable? . #true)))
+ (home-page "https://github.com/ggml-org/ggml")
+ (synopsis "Tensor library for machine learning")
+ (description "@code{ggml} is a @acronym{ML, Machine Learning} library
+written in C and C++ with a focus on transformer inference, similar to ML
+libraries such as PyTorch and TensorFlow.")
+ (license license:expat)))
+
(define-public python-apricot-select
(package
(name "python-apricot-select")