@@ -23,6 +23,8 @@ if (Vulkan_FOUND)
2323 ../../include /ggml-vulkan.h
2424 )
2525
26+ set (GGML_VULKAN_COOPMAT_GLSLC_SUPPORT OFF )
27+
2628 # Compile a test shader to determine whether GL_KHR_cooperative_matrix is supported.
2729 # If it's not, there will be an error to stderr.
2830 # If it's supported, set a define to indicate that we should compile those shaders
@@ -35,8 +37,11 @@ if (Vulkan_FOUND)
3537 else ()
3638 message (STATUS "GL_KHR_cooperative_matrix supported by glslc" )
3739 add_compile_definitions (GGML_VULKAN_COOPMAT_GLSLC_SUPPORT)
40+ set (GGML_VULKAN_COOPMAT_GLSLC_SUPPORT ON )
3841 endif ()
3942
43+ set (GGML_VULKAN_COOPMAT2_GLSLC_SUPPORT OFF )
44+
4045 # Compile a test shader to determine whether GL_NV_cooperative_matrix2 is supported.
4146 # If it's not, there will be an error to stderr.
4247 # If it's supported, set a define to indicate that we should compile those shaders
@@ -49,6 +54,7 @@ if (Vulkan_FOUND)
4954 else ()
5055 message (STATUS "GL_NV_cooperative_matrix2 supported by glslc" )
5156 add_compile_definitions (GGML_VULKAN_COOPMAT2_GLSLC_SUPPORT)
57+ set (GGML_VULKAN_COOPMAT2_GLSLC_SUPPORT ON )
5258 endif ()
5359
5460 target_link_libraries (ggml-vulkan PRIVATE Vulkan::Vulkan)
@@ -119,6 +125,8 @@ if (Vulkan_FOUND)
119125 SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} /vulkan-shaders
120126 CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${HOST_CMAKE_TOOLCHAIN_FILE}
121127 -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}
128+ -DGGML_VULKAN_COOPMAT_GLSLC_SUPPORT=${GGML_VULKAN_COOPMAT_GLSLC_SUPPORT}
129+ -DGGML_VULKAN_COOPMAT2_GLSLC_SUPPORT=${GGML_VULKAN_COOPMAT2_GLSLC_SUPPORT}
122130 BUILD_COMMAND ${CMAKE_COMMAND} --build .
123131 INSTALL_COMMAND ${CMAKE_COMMAND} --install .
124132 INSTALL_DIR ${CMAKE_BINARY_DIR}
0 commit comments