You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Build: ggml-vulkan.cpp fails with "spirv/unified1/spirv.hpp: No such file" although find_package(SPIRV-Headers) succeeded #12
Repro (CachyOS Linux, gcc 16.2, CMake 4.4.4, Vulkan 1.4 headers + glslc installed, no system spirv-headers package; SPIRV-Headers installed to a local prefix passed via CMAKE_PREFIX_PATH):
Configure succeeds — find_package(SPIRV-Headers) resolves from the prefix and the Vulkan backend is enabled — but the build then fails:
ggml/src/ggml-vulkan/ggml-vulkan.cpp:48:14: fatal error: spirv/unified1/spirv.hpp: No such file or directory
The found package include directory is not propagated onto the ggml-vulkan target compile line (no -I<prefix>/include present).
Workaround: export CPATH=<prefix>/include before cmake --build.
This reproduces identically in skin-tokens.cpp (its patched-ggml FetchContent build hits the same error at the same line). On distros that ship spirv-headers system-wide it is invisible, which is probably why CI never sees it.
Suggested fix: link the imported SPIRV-Headers::SPIRV-Headers target (or forward its INTERFACE_INCLUDE_DIRECTORIES) to ggml-vulkan where the superbuild wires up the submodule — or document spirv-headers as a required system dependency next to the Vulkan loader in the README.
Verified 2026-10-18 on both repos, ggml submodule 8c63e70.
Activity
richiejp commentedon Oct 30, 2026
This is actually an upstream problem in GGML/llama.cpp, so I'll try to fix it there