Priority: optional
Maintainer: Mathieu Baudier <mbaudier@argeo.org>
Build-Depends: debhelper-compat (= 13), pkg-config, cmake-data, cmake, cpio, git, patchelf,
- libopenblas-openmp-dev, libopenblas64-openmp-dev, libvulkan-dev, glslc
+ libopenblas-openmp-dev, libopenblas64-openmp-dev [amd64 arm64], libvulkan-dev, glslc
Standards-Version: 4.5.1
Homepage: https://github.com/ggerganov
Rules-Requires-Root: binary-targets
Depends: ${shlibs:Depends},
libggml,
# GGML shows warning that it uses OpenMP if default OpenBLAS (pthread) is used.
- libopenblas0-openmp, libopenblas64-0-openmp,
+ libopenblas0-openmp, libopenblas64-0-openmp [amd64 arm64],
Description: Tensor library for machine learning (OpenBLAS backend)
GGML Tensor library for machine learning. (OpenBLAS backend)
LC_ALL := C.UTF-8
export LC_ALL
+# multiarch
include /usr/share/dpkg/architecture.mk
-DEB_BUILD_OPTIONS ?= parallel=8
-
build_multiarch=build/$(DEB_HOST_MULTIARCH)
install_lib_multiarch=debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)
+# parallelism
+DEB_BUILD_OPTIONS ?= parallel=8
+
+# ggml specific
+ifeq ($(DEB_HOST_ARCH),aarch64)
+ GGML_CPU_AARCH64 ?= ON
+else
+ GGML_CPU_AARCH64 ?= OFF
+endif
+
+ifneq ($(DEB_HOST_ARCH),i386)
+ GGML_CPU_ALL_VARIANTS ?= ON
+else
+ GGML_CPU_ALL_VARIANTS ?= OFF
+endif
+
%:
# Use build/ for output, so that it is in the .gitignore of upstream
dh $@ --buildsystem=cmake --builddirectory=$(build_multiarch)
-DGGML_STANDALONE=ON \
-DGGML_BUILD_TESTS=OFF \
-DGGML_BUILD_EXAMPLES=OFF \
- \
+ -DGGML_CPU_AARCH64=$(GGML_CPU_AARCH64) \
-DGGML_BACKEND_DL=ON \
- -DGGML_CPU_ALL_VARIANTS=ON \
+ -DGGML_CPU_ALL_VARIANTS=$(GGML_CPU_ALL_VARIANTS) \
-DGGML_NATIVE=OFF \
+ \
-DGGML_RPC=ON \
-DGGML_BLAS=ON \
-DGGML_BLAS_VENDOR=OpenBLAS \
patchelf --set-soname $$(basename "$$file") $$file; \
install -t $(install_lib_multiarch) $$file; \
done
- #install -t $(install_lib_multiarch) $(build_multiarch)/bin/libggml-*.so
override_dh_dwz:
# dwz is failing most probably because of using patchelf in order to set soname