Open
Description
Git commit
Commit: a0374a6
Operating systems
Linux
GGML backends
Vulkan
Problem description & steps to reproduce
I can compile llama-cpp without vulkan, but when I try to compile with vulkan I get the following errors:
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Enabling coopmat glslc support
-- Enabling coopmat2 glslc support
-- Enabling dot glslc support
-- Configuring done (0.4s)
-- Generating done (0.0s)
-- Build files have been written to: /home/andar1an/repos/git/llama.cpp/build/ggml/src/ggml-vulkan/vulkan-shaders-gen-prefix
[ 37%] Performing build step for 'vulkan-shaders-gen'
[ 50%] Building CXX object CMakeFiles/vulkan-shaders-gen.dir/vulkan-shaders-gen.cpp.o
[100%] Linking CXX executable vulkan-shaders-gen
[100%] Built target vulkan-shaders-gen
[ 37%] Performing install step for 'vulkan-shaders-gen'
-- Installing: /home/andar1an/repos/git/llama.cpp/build/Release/./vulkan-shaders-gen
[ 37%] Completed 'vulkan-shaders-gen'
[ 37%] Built target vulkan-shaders-gen
[ 37%] Generate vulkan shaders
ggml_vulkan: Generating and compiling shaders to SPIR-V
cannot compile get_rows_iq1_m
/usr/bin/glslc -fshader-stage=compute --target-env=vulkan1.2 -O /home/andar1an/repos/git/llama.cpp/ggml/src/ggml-vulkan/vulk
shaderc: internal error: compilation succeeded but failed to optimize: [VUID-StandaloneSpirv-None-10684] Invalid explicit la
%scales = OpVariable %_ptr_Function__arr_ushort_uint_4 Function
cannot compile get_rows_iq1_m_f32
/usr/bin/glslc -fshader-stage=compute --target-env=vulkan1.2 -O /home/andar1an/repos/git/llama.cpp/ggml/src/ggml-vulkan/vulk
shaderc: internal error: compilation succeeded but failed to optimize: [VUID-StandaloneSpirv-None-10684] Invalid explicit la
%scales = OpVariable %_ptr_Function__arr_ushort_uint_4 Function
[ 40%] Building CXX object ggml/src/ggml-vulkan/CMakeFiles/ggml-vulkan.dir/ggml-vulkan.cpp.o
/home/andar1an/repos/git/llama.cpp/ggml/src/ggml-vulkan/ggml-vulkan.cpp: In function 'void ggml_vk_load_shaders(vk_device&)'
/home/andar1an/repos/git/llama.cpp/ggml/src/ggml-vulkan/ggml-vulkan.cpp:2679:103: error: 'get_rows_iq1_m_len' was not declar
2679 | ggml_vk_create_pipeline(device, device->pipeline_get_rows[GGML_TYPE_IQ1_M], "get_rows_iq1_m", get_rows_iq1_m
| ^~~~~~~~~~~~~~
| get_rows_iq1_s
/home/andar1an/repos/git/llama.cpp/ggml/src/ggml-vulkan/ggml-vulkan.cpp:2679:125: error: 'get_rows_iq1_m_data' was not decla
2679 | ipeline(device, device->pipeline_get_rows[GGML_TYPE_IQ1_M], "get_rows_iq1_m", get_rows_iq1_m_len, get_rows_iq1
| ^~~~~~~~~~~~
| get_rows_iq1
/home/andar1an/repos/git/llama.cpp/ggml/src/ggml-vulkan/ggml-vulkan.cpp:2697:111: error: 'get_rows_iq1_m_f32_len' was not de
2697 | ml_vk_create_pipeline(device, device->pipeline_get_rows_f32[GGML_TYPE_IQ1_M], "get_rows_iq1_m_f32", get_rows_iq1
| ^~~~~~~~~~~~
| get_rows_iq1_s_f32_len
/home/andar1an/repos/git/llama.cpp/ggml/src/ggml-vulkan/ggml-vulkan.cpp:2697:137: error: 'get_rows_iq1_m_f32_data' was not declared in this scope; did you mean 'get_rows_iq1_s_f32_data'?
2697 | ce, device->pipeline_get_rows_f32[GGML_TYPE_IQ1_M], "get_rows_iq1_m_f32", get_rows_iq1_m_f32_len, get_rows_iq1_m_f32_data, "main", 3, sizeof(vk_op_binary_push_constants), {1024, 1, 1}, {}, 1);
| ^~~~~~~~~~~~~~~~~~~~~~~
| get_rows_iq1_s_f32_data
gmake[3]: *** [ggml/src/ggml-vulkan/CMakeFiles/ggml-vulkan.dir/build.make:206: ggml/src/ggml-vulkan/CMakeFiles/ggml-vulkan.dir/ggml-vulkan.cpp.o] Error 1
gmake[2]: *** [CMakeFiles/Makefile2:2230: ggml/src/ggml-vulkan/CMakeFiles/ggml-vulkan.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:4742: tools/server/CMakeFiles/llama-server.dir/rule] Error 2
gmake: *** [Makefile:1454: llama-server] Error 2
First Bad Commit
No response
Compile command
cmake -B build -DGGML_VULKAN=ON -DGGML_NATIVE=ON -DLLAMA_BUILD_SERVER=ON -DLLAMA_CURL=ON -DBUILD_SHARED_LIBS=OFF && cmake --build build --target llama-server --config Release
Relevant log output
glslc --version
shaderc 2024.4
SPIRV-Tools 1.4.304.0
glslang 1.4.304.0
Target: SPIR-V 1.0
Do I need to update shaderc to 2025? Or could it be a missing dependency? I am not familiar with this so help would be appreciated.