sci-misc/llama-cpp: + flexiblas backend

Signed-off-by: Sergey Alirzaev <l29ah@riseup.net>
This commit is contained in:
Sergey Alirzaev
2025-11-10 03:24:29 +01:00
parent 94237df606
commit b2cf10b408
3 changed files with 19 additions and 4 deletions

View File

@@ -23,8 +23,8 @@ HOMEPAGE="https://github.com/ggml-org/llama.cpp"
LICENSE="MIT"
SLOT="0"
CPU_FLAGS_X86=( avx avx2 f16c )
IUSE="curl openblas +openmp blis hip cuda opencl vulkan"
REQUIRED_USE="?? ( openblas blis )"
IUSE="curl openblas +openmp blis hip cuda opencl vulkan flexiblas"
REQUIRED_USE="?? ( openblas blis flexiblas )"
# curl is needed for pulling models from huggingface
# numpy is used by convert_hf_to_gguf.py
@@ -33,6 +33,7 @@ CDEPEND="
openblas? ( sci-libs/openblas:= )
openmp? ( llvm-runtimes/openmp:= )
blis? ( sci-libs/blis:= )
flexiblas? ( sci-libs/flexiblas:= )
hip? ( >=dev-util/hip-6.3:=
>=sci-libs/hipBLAS-6.3:=
)
@@ -99,6 +100,12 @@ src_configure() {
)
fi
if use flexiblas; then
mycmakeargs+=(
-DGGML_BLAS=ON -DGGML_BLAS_VENDOR=FlexiBLAS
)
fi
if use cuda; then
local -x CUDAHOSTCXX="$(cuda_gccdir)"
# tries to recreate dev symlinks