diff --git a/.gear/llama.cpp.spec b/.gear/llama.cpp.spec index 23281fa62..a52c07eb9 100644 --- a/.gear/llama.cpp.spec +++ b/.gear/llama.cpp.spec @@ -8,6 +8,7 @@ %else %def_without cuda %endif +%def_with vulkan Name: llama.cpp Version: 4855 @@ -24,6 +25,9 @@ Requires: %name-cuda = %EVR %filter_from_requires /(libcudart\.so\.12)/d %filter_from_requires /debug64(libcuda\.so\.1)/d %endif +%if_with vulkan +Requires: %name-vulkan = %EVR +%endif Source: %name-%version.tar Patch: %name-%version.patch @@ -39,6 +43,10 @@ BuildRequires: libstdc++-devel-static BuildRequires: gcc12-c++ BuildRequires: nvidia-cuda-devel-static %endif +%if_with vulkan +BuildRequires: glslc +BuildRequires: libvulkan-devel +%endif %{?!_without_check:%{?!_disable_check: BuildRequires: ctest BuildRequires: tinyllamas-gguf @@ -120,6 +128,14 @@ Requires: %name-cpu = %EVR %description cuda %summary. +%package vulkan +Summary: %name backend for GPU +Group: Sciences/Computer science +Requires: %name-cpu = %EVR + +%description vulkan +%summary. + %prep %setup %autopatch -p1 @@ -153,6 +169,9 @@ export NVCC_PREPEND_FLAGS=-ccbin=g++-12 %if_with cuda -DGGML_CUDA=ON \ -DCMAKE_CUDA_ARCHITECTURES='52-virtual;80-virtual' \ +%endif +%if_with vulkan + -DGGML_VULKAN=ON \ %endif %nil grep -E 'LLAMA|GGML' %_cmake__builddir/CMakeCache.txt | sort | tee build-options.txt @@ -224,6 +243,13 @@ llama-cli -m %_datadir/tinyllamas/stories260K.gguf -p "Once upon a time" -s 55 - %_libexecdir/llama/libggml-cuda.so %endif +%if_with vulkan +%files vulkan +%_bindir/vulkan-shaders-gen +%dir %_libexecdir/llama +%_libexecdir/llama/libggml-vulkan.so +%endif + %changelog * Mon Mar 10 2025 Vitaly Chikunov 1:4855-alt1 - Update to b4855 (2025-03-07).