-
Notifications
You must be signed in to change notification settings - Fork 6k
Fixed cooperative matrix shaders on Vulkan builds when CROSS_COMPILE ON #2914
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
04ab3d3
e6ab39f
62e5be8
eaa2808
3275375
3519d2d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,8 +4,22 @@ if(NOT GLSLC_EXECUTABLE) | |
| message(FATAL_ERROR "glslc not found.") | ||
| endif() | ||
|
|
||
| option(GGML_VULKAN_COOPMAT_GLSLC_SUPPORT "Enable coopmat shaders" OFF) | ||
| option(GGML_VULKAN_COOPMAT2_GLSLC_SUPPORT "Enable coopmat2 shaders" OFF) | ||
|
|
||
| message(STATUS "GGML_VULKAN_COOPMAT_GLSLC_SUPPORT: ${GGML_VULKAN_COOPMAT_GLSLC_SUPPORT}") | ||
| message(STATUS "GGML_VULKAN_COOPMAT2_GLSLC_SUPPORT: ${GGML_VULKAN_COOPMAT2_GLSLC_SUPPORT}") | ||
|
|
||
| set(TARGET vulkan-shaders-gen) | ||
| add_executable(${TARGET} vulkan-shaders-gen.cpp) | ||
| if (GGML_VULKAN_COOPMAT_GLSLC_SUPPORT) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In ggml-org/llama.cpp#11695 (comment) I had guessed that we may need to pass through a cmake variable telling this makefile which version of glslc to use? Is that not necessary? It's just the #defines that weren't making it through?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not 100% sure if we need additional version to be used (and in my case it was working as same version as the host system was used). I can confirm that only providing the compile definitions is working for my build => https://github.com/sandrohanea/whisper.net/actions/runs/13977409227/job/39134498314 |
||
| target_compile_definitions(vulkan-shaders-gen PRIVATE GGML_VULKAN_COOPMAT_GLSLC_SUPPORT) | ||
| endif() | ||
|
|
||
| if (GGML_VULKAN_COOPMAT2_GLSLC_SUPPORT) | ||
| target_compile_definitions(vulkan-shaders-gen PRIVATE GGML_VULKAN_COOPMAT2_GLSLC_SUPPORT) | ||
| endif() | ||
|
|
||
| install(TARGETS ${TARGET} RUNTIME) | ||
| target_compile_features(${TARGET} PRIVATE cxx_std_17) | ||
| target_link_libraries(vulkan-shaders-gen PUBLIC Threads::Threads) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should there be an "OFF" here like there is for coopmat1 above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
I got too fast on it, thanks for catching it!
It would not be consistent otherwise => won't cause issues as default will be OFF anyway, but I think it is better to have it explicit.