@@ -23,6 +23,8 @@ if (Vulkan_FOUND)
23
23
../../include/ggml-vulkan.h
24
24
)
25
25
26
+ set (GGML_VULKAN_COOPMAT_GLSLC_SUPPORT OFF )
27
+
26
28
# Compile a test shader to determine whether GL_KHR_cooperative_matrix is supported.
27
29
# If it's not, there will be an error to stderr.
28
30
# If it's supported, set a define to indicate that we should compile those shaders
@@ -35,8 +37,11 @@ if (Vulkan_FOUND)
35
37
else ()
36
38
message (STATUS "GL_KHR_cooperative_matrix supported by glslc" )
37
39
add_compile_definitions (GGML_VULKAN_COOPMAT_GLSLC_SUPPORT )
40
+ set (GGML_VULKAN_COOPMAT_GLSLC_SUPPORT ON )
38
41
endif ()
39
42
43
+ set (GGML_VULKAN_COOPMAT2_GLSLC_SUPPORT OFF )
44
+
40
45
# Compile a test shader to determine whether GL_NV_cooperative_matrix2 is supported.
41
46
# If it's not, there will be an error to stderr.
42
47
# If it's supported, set a define to indicate that we should compile those shaders
@@ -49,6 +54,7 @@ if (Vulkan_FOUND)
49
54
else ()
50
55
message (STATUS "GL_NV_cooperative_matrix2 supported by glslc" )
51
56
add_compile_definitions (GGML_VULKAN_COOPMAT2_GLSLC_SUPPORT )
57
+ set (GGML_VULKAN_COOPMAT2_GLSLC_SUPPORT ON )
52
58
endif ()
53
59
54
60
target_link_libraries (ggml-vulkan PRIVATE Vulkan::Vulkan )
@@ -119,6 +125,8 @@ if (Vulkan_FOUND)
119
125
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} /vulkan-shaders
120
126
CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${HOST_CMAKE_TOOLCHAIN_FILE}
121
127
-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}
122
130
BUILD_COMMAND ${CMAKE_COMMAND} --build .
123
131
INSTALL_COMMAND ${CMAKE_COMMAND} --install .
124
132
INSTALL_DIR ${CMAKE_BINARY_DIR}
0 commit comments