commit:     3733474f9c1d366432ae59570970b06833cebb5e
Author:     Sergey Alirzaev <l29ah <AT> riseup <DOT> net>
AuthorDate: Sun Aug 10 00:35:22 2025 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Sun Aug 10 00:35:22 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=3733474f

sci-misc/llama-cpp: handle automagic openmp dep

enabled by default as otherwise results in severe performance hit
see https://github.com/ggml-org/llama.cpp/issues/12171

Signed-off-by: Sergey Alirzaev <l29ah <AT> riseup.net>

 sci-misc/llama-cpp/llama-cpp-0_pre6092.ebuild | 4 +++-
 sci-misc/llama-cpp/llama-cpp-9999.ebuild      | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/sci-misc/llama-cpp/llama-cpp-0_pre6092.ebuild 
b/sci-misc/llama-cpp/llama-cpp-0_pre6092.ebuild
index 99dc17ab50..8b6d1fecff 100644
--- a/sci-misc/llama-cpp/llama-cpp-0_pre6092.ebuild
+++ b/sci-misc/llama-cpp/llama-cpp-0_pre6092.ebuild
@@ -23,7 +23,7 @@ HOMEPAGE="https://github.com/ggml-org/llama.cpp";
 LICENSE="MIT"
 SLOT="0"
 CPU_FLAGS_X86=( avx avx2 f16c )
-IUSE="curl openblas blis hip cuda opencl vulkan"
+IUSE="curl openblas +openmp blis hip cuda opencl vulkan"
 REQUIRED_USE="?? ( openblas blis )"
 
 # curl is needed for pulling models from huggingface
@@ -31,6 +31,7 @@ REQUIRED_USE="?? ( openblas blis )"
 CDEPEND="
        curl? ( net-misc/curl:= )
        openblas? ( sci-libs/openblas:= )
+       openmp? ( llvm-runtimes/openmp:= )
        blis? ( sci-libs/blis:= )
        hip? ( >=dev-util/hip-6.3:=
                >=sci-libs/hipBLAS-6.3:=
@@ -77,6 +78,7 @@ src_configure() {
                -DGENTOO_REMOVE_CMAKE_BLAS_HACK=ON
                -DGGML_CUDA=$(usex cuda ON OFF)
                -DGGML_OPENCL=$(usex opencl ON OFF)
+               -DGGML_OPENMP=$(usex openmp ON OFF)
                -DGGML_VULKAN=$(usex vulkan ON OFF)
 
                # avoid clashing with whisper.cpp

diff --git a/sci-misc/llama-cpp/llama-cpp-9999.ebuild 
b/sci-misc/llama-cpp/llama-cpp-9999.ebuild
index 99dc17ab50..8b6d1fecff 100644
--- a/sci-misc/llama-cpp/llama-cpp-9999.ebuild
+++ b/sci-misc/llama-cpp/llama-cpp-9999.ebuild
@@ -23,7 +23,7 @@ HOMEPAGE="https://github.com/ggml-org/llama.cpp";
 LICENSE="MIT"
 SLOT="0"
 CPU_FLAGS_X86=( avx avx2 f16c )
-IUSE="curl openblas blis hip cuda opencl vulkan"
+IUSE="curl openblas +openmp blis hip cuda opencl vulkan"
 REQUIRED_USE="?? ( openblas blis )"
 
 # curl is needed for pulling models from huggingface
@@ -31,6 +31,7 @@ REQUIRED_USE="?? ( openblas blis )"
 CDEPEND="
        curl? ( net-misc/curl:= )
        openblas? ( sci-libs/openblas:= )
+       openmp? ( llvm-runtimes/openmp:= )
        blis? ( sci-libs/blis:= )
        hip? ( >=dev-util/hip-6.3:=
                >=sci-libs/hipBLAS-6.3:=
@@ -77,6 +78,7 @@ src_configure() {
                -DGENTOO_REMOVE_CMAKE_BLAS_HACK=ON
                -DGGML_CUDA=$(usex cuda ON OFF)
                -DGGML_OPENCL=$(usex opencl ON OFF)
+               -DGGML_OPENMP=$(usex openmp ON OFF)
                -DGGML_VULKAN=$(usex vulkan ON OFF)
 
                # avoid clashing with whisper.cpp

Reply via email to