Source: ggml
-Section: science
+Section: libs
Priority: optional
Maintainer: Mathieu Baudier <mbaudier@argeo.org>
-Build-Depends: debhelper-compat (= 13), pkgconf,
- cmake-data, cmake,
- libopenblas-openmp-dev, libopenblas64-openmp-dev [amd64 arm64],
- libvulkan-dev, glslc,
-Standards-Version: 4.7.0
-Vcs-Git: https://git.djapps.eu/pkg/ggml/sources/ggml
+Standards-Version: 4.7.2
Vcs-Browser: https://git.djapps.eu/?p=pkg/ggml/sources/ggml;a=summary
-Homepage: https://github.com/ggml-org/
-Rules-Requires-Root: binary-targets
-
-Package: ggml
-Architecture: any
-Depends: ${misc:Depends},
- libggml0, libggml-backend-cpu
-Description: Tensor library for machine learning (metapackage)
- ggml is a pure C/C++ library implementing tensor computations
- used by neural networks. It is the basis for llama.cpp (large language models)
- and whisper.cpp (speech recognition) but can be used indepedently.
- This metapackage provides the minimal set of dependencies
- so that the library can actually be usable, since the dynamically-loaded
- CPU backend is required for most usages. Additional backends can be
- installed additionally, typically to support specific computing hardware
- such as GPUs.
+Vcs-Git: https://git.djapps.eu/pkg/ggml/sources/ggml
+Homepage: https://github.com/ggml-org/ggml
+Build-Depends: cmake,
+ debhelper-compat (= 13),
+ libblas-dev,
+ pkgconf,
+ libvulkan-dev,
+ glslc,
+Rules-Requires-Root: no
Package: libggml-base0
-Section: libs
Architecture: any
Multi-Arch: same
-Pre-Depends: ${misc:Pre-Depends}
-Depends: ${misc:Depends}, ${shlibs:Depends}
-# Explicitly conflict with Debian official
-Conflicts: libggml-base
+Depends: ${misc:Depends},
+ ${shlibs:Depends}
Description: Tensor library for machine learning (base)
The ggml base library provides the backend-independent API
upon which specialized libraries or applications can be built.
Package: libggml0
-Section: libs
Architecture: any
Multi-Arch: same
-Pre-Depends: ${misc:Pre-Depends}
-Depends: ${misc:Depends}, ${shlibs:Depends},
- libggml-base0
-# Explicitly conflict with Debian official
-Conflicts: libggml
+Depends: libggml-base0,
+ ${misc:Depends},
+ ${shlibs:Depends},
Description: Tensor library for machine learning (loader)
The ggml library is a thin high-level layer mostly
responsible for loading the various ggml backends,
and connect them to the API provided by the ggml base library.
+Package: libggml-dev
+Section: libdevel
+Architecture: any
+Multi-Arch: same
+Depends: libggml0 (= ${binary:Version}),
+ libggml-base0 (= ${binary:Version}),
+ ${misc:Depends},
+Description: Tensor library for machine learning (development files)
+ This developments package provides the files required to build
+ software based on ggml.
+
Package: libggml-backend-cpu
Architecture: any
Multi-Arch: same
-Pre-Depends: ${misc:Pre-Depends}
-Depends: ${misc:Depends}, ${shlibs:Depends},
- libggml0
-# Explicitly conflict with Debian official
-Conflicts: libggml-cpu
+Depends: libggml-base0,
+ ${misc:Depends},
+ ${shlibs:Depends}
Description: Tensor library for machine learning (CPU backend)
The ggml CPU backend provides computations based solely
on plain CPU, without software or hardware acceleration.
Package: libggml-backend-blas
Architecture: any
Multi-Arch: same
-Pre-Depends: ${misc:Pre-Depends}
-Depends: ${misc:Depends}, ${shlibs:Depends},
- libggml0,
-# GGML shows warning that it uses OpenMP if default OpenBLAS (pthread) is used.
- libopenblas0-openmp, libopenblas64-0-openmp [amd64 arm64],
-# Explicitly conflict with Debian official
-Conflicts: libggml-blas
+Depends: libggml-base0,
+ ${misc:Depends},
+ ${shlibs:Depends}
+Recommends: libopenblas0 | libblis4 | libmkl-rt | libblas3
Description: Tensor library for machine learning (OpenBLAS backend)
The ggml BLAS backend provides software acceleration of the computations
based on OpenBLAS.
Package: libggml-backend-rpc
Architecture: any
Multi-Arch: same
-Pre-Depends: ${misc:Depends}, ${misc:Pre-Depends}
-Depends: ${shlibs:Depends},
- libggml0
+Depends: libggml-base0,
+ ${misc:Depends},
+ ${shlibs:Depends}
Description: Tensor library for machine learning (RPC backend)
The ggml RPC backend allows one to distribute computations over
the network on remote ggml backends.
Package: libggml-backend-vulkan
Architecture: any
Multi-Arch: same
-Pre-Depends: ${misc:Pre-Depends}
-# Explicitly conflict with Debian official
-Conflicts: libggml-vulkan
-Depends: ${misc:Depends}, ${shlibs:Depends},
- libggml0,
- libvulkan1
+Depends: libggml-base0,
+ ${misc:Depends},
+ ${shlibs:Depends}
Description: Tensor library for machine learning (Vulkan backend)
The ggml Vulkan backend provides hardware acceleration of the
computations based on the Vulkan API. This is typically used
to leverage GPU parallel computations capabilities.
-
-Package: ggml-dev
-Architecture: any
-Section: libdevel
-Depends: ${misc:Depends},
- libggml0 (= ${binary:Version}), libggml-base0 (= ${binary:Version}),
-# The generated cmake config then requires to find all backends
-# TODO check with upstream
- libggml-backend-cpu (= ${binary:Version}),
- libggml-backend-blas (= ${binary:Version}),
- libggml-backend-rpc (= ${binary:Version}),
- libggml-backend-vulkan (= ${binary:Version}),
-Description: Tensor library for machine learning (development files)
- This developments package provides the files required to build
- software based on ggml.
#!/usr/bin/make -f
-# See debhelper(7) (uncomment to enable)
#export DH_VERBOSE = 1
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
-LC_ALL := C.UTF-8
-export LC_ALL
-
-# For multiarch
-include /usr/share/dpkg/architecture.mk
-# For DEB_VERSION_UPSTREAM
include /usr/share/dpkg/pkg-info.mk
+GGML_BUILD_NUMBER=$(subst 0.0.,,$(DEB_VERSION_UPSTREAM))
-install_bin=debian/tmp/usr/bin
-install_lib_multiarch=debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)
-install_libexec_multiarch=debian/tmp/usr/libexec/$(DEB_HOST_MULTIARCH)
-
-# parallelism
-DEB_BUILD_OPTIONS ?= parallel=8
-
-# hardening
-export DEB_BUILD_MAINT_OPTIONS = hardening=+all
-
-# ggml specific
-ifeq ($(DEB_HOST_ARCH),aarch64)
- GGML_CPU_AARCH64 ?= ON
-else
- GGML_CPU_AARCH64 ?= OFF
-endif
+# GGML_NATIVE:ON corresponds to -march=native
+CMAKE_OPTS = -DGGML_NATIVE=OFF \
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+ -DGGML_BUILD_NUMBER=$(GGML_BUILD_NUMBER) \
+ -DGGML_BUILD_TESTS=OFF \
+ -DGGML_BUILD_EXAMPLES=OFF \
+ -DGGML_BACKEND_DL=ON \
-ifeq ($(DEB_HOST_ARCH),amd64)
- GGML_CPU_ALL_VARIANTS ?= ON
-else
- GGML_CPU_ALL_VARIANTS ?= OFF
-endif
+CMAKE_OPTS += -DGGML_CPU_ALL_VARIANTS=ON \
+ -DGGML_BLAS=ON \
+ -DGGML_VULKAN=ON \
+ -DGGML_RPC=ON \
%:
-# Use build/ for output, so that it is in the .gitignore of upstream
dh $@ --buildsystem=cmake
override_dh_auto_configure:
- dh_auto_configure -- \
- -DGGML_BUILD_NUMBER=$(subst 0.0.,,$(DEB_VERSION_UPSTREAM)) \
- -DCMAKE_LIBRARY_ARCHITECTURE="$(DEB_HOST_MULTIARCH)" \
- -DCMAKE_BUILD_TYPE=RelWithDebInfo \
- -DBUILD_SHARED_LIBS=ON \
- -DGGML_CCACHE=OFF \
- -DGGML_STANDALONE=ON \
- -DGGML_BUILD_TESTS=ON \
- -DGGML_BUILD_EXAMPLES=OFF \
- -DGGML_CPU_AARCH64=$(GGML_CPU_AARCH64) \
- -DGGML_BACKEND_DL=ON \
- -DGGML_CPU_ALL_VARIANTS=$(GGML_CPU_ALL_VARIANTS) \
- -DGGML_NATIVE=OFF \
- \
- -DGGML_RPC=ON \
- -DGGML_BLAS=ON \
- -DGGML_BLAS_VENDOR=OpenBLAS \
- -DGGML_VULKAN=ON \
- -DGGML_CUDA=OFF \
+ dh_auto_configure -- $(CMAKE_OPTS)
-override_dh_auto_install:
- dh_auto_install
-
+execute_after_dh_auto_install-arch:
# Move backends *.so to libexec, as we don't want them lurking in /usr/bin
- mkdir -p $(install_libexec_multiarch)/ggml
- for file in $(install_bin)/libggml-*.so; do \
- mv $$file $(install_libexec_multiarch)/ggml; \
+ mkdir -p debian/tmp/usr/libexec/$(DEB_HOST_MULTIARCH)/ggml
+ for file in debian/tmp/usr/bin/libggml-*.so; do \
+ mv $$file debian/tmp/usr/libexec/$(DEB_HOST_MULTIARCH)/ggml; \
done
override_dh_installexamples: