Skip to content

Commit b7b960b

Browse files
committed
vulkan: Fix missing cmake logic for dot product extension
1 parent 2004644 commit b7b960b

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

ggml/src/ggml-vulkan/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,10 @@ if (Vulkan_FOUND)
6464

6565
if (${glslc_error} MATCHES ".*extension not supported: GL_EXT_integer_dot_product.*")
6666
message(STATUS "GL_EXT_integer_dot_product not supported by glslc")
67+
set(GGML_VULKAN_INTEGER_DOT_GLSLC_SUPPORT OFF)
6768
else()
6869
message(STATUS "GL_EXT_integer_dot_product supported by glslc")
70+
set(GGML_VULKAN_INTEGER_DOT_GLSLC_SUPPORT ON)
6971
add_compile_definitions(GGML_VULKAN_INTEGER_DOT_GLSLC_SUPPORT)
7072
endif()
7173

@@ -139,6 +141,7 @@ if (Vulkan_FOUND)
139141
-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}
140142
-DGGML_VULKAN_COOPMAT_GLSLC_SUPPORT=${GGML_VULKAN_COOPMAT_GLSLC_SUPPORT}
141143
-DGGML_VULKAN_COOPMAT2_GLSLC_SUPPORT=${GGML_VULKAN_COOPMAT2_GLSLC_SUPPORT}
144+
-DGGML_VULKAN_INTEGER_DOT_GLSLC_SUPPORT=${GGML_VULKAN_INTEGER_DOT_GLSLC_SUPPORT}
142145
BUILD_COMMAND ${CMAKE_COMMAND} --build .
143146
INSTALL_COMMAND ${CMAKE_COMMAND} --install .
144147
INSTALL_DIR ${CMAKE_BINARY_DIR}

ggml/src/ggml-vulkan/vulkan-shaders/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ endif()
66
if (GGML_VULKAN_COOPMAT2_GLSLC_SUPPORT)
77
add_compile_definitions(GGML_VULKAN_COOPMAT2_GLSLC_SUPPORT)
88
endif()
9+
if (GGML_VULKAN_INTEGER_DOT_GLSLC_SUPPORT)
10+
add_compile_definitions(GGML_VULKAN_INTEGER_DOT_GLSLC_SUPPORT)
11+
endif()
912
set(TARGET vulkan-shaders-gen)
1013
add_executable(${TARGET} vulkan-shaders-gen.cpp)
1114
install(TARGETS ${TARGET} RUNTIME)

0 commit comments

Comments
 (0)