Spaces:
Sleeping
Sleeping
Sandro Hanea
Sandro Hanea
commited on
cmake: improve Vulkan cooperative matrix support checks (#2966)
Browse files
ggml/src/ggml-vulkan/CMakeLists.txt
CHANGED
|
@@ -36,9 +36,14 @@ if (Vulkan_FOUND)
|
|
| 36 |
set(GGML_VULKAN_COOPMAT_GLSLC_SUPPORT OFF CACHE INTERNAL "Whether coopmat is supported by glslc")
|
| 37 |
else()
|
| 38 |
message(STATUS "GL_KHR_cooperative_matrix supported by glslc")
|
| 39 |
-
add_compile_definitions(GGML_VULKAN_COOPMAT_GLSLC_SUPPORT)
|
| 40 |
set(GGML_VULKAN_COOPMAT_GLSLC_SUPPORT ON CACHE INTERNAL "Whether coopmat is supported by glslc")
|
| 41 |
endif()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
endif()
|
| 43 |
|
| 44 |
if(NOT DEFINED GGML_VULKAN_COOPMAT2_GLSLC_SUPPORT)
|
|
@@ -54,9 +59,15 @@ if (Vulkan_FOUND)
|
|
| 54 |
set(GGML_VULKAN_COOPMAT2_GLSLC_SUPPORT OFF CACHE INTERNAL "Whether coopmat2 is supported by glslc")
|
| 55 |
else()
|
| 56 |
message(STATUS "GL_NV_cooperative_matrix2 supported by glslc")
|
| 57 |
-
|
| 58 |
set(GGML_VULKAN_COOPMAT2_GLSLC_SUPPORT ON CACHE INTERNAL "Whether coopmat2 is supported by glslc")
|
| 59 |
endif()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
endif()
|
| 61 |
|
| 62 |
target_link_libraries(ggml-vulkan PRIVATE Vulkan::Vulkan)
|
|
|
|
| 36 |
set(GGML_VULKAN_COOPMAT_GLSLC_SUPPORT OFF CACHE INTERNAL "Whether coopmat is supported by glslc")
|
| 37 |
else()
|
| 38 |
message(STATUS "GL_KHR_cooperative_matrix supported by glslc")
|
|
|
|
| 39 |
set(GGML_VULKAN_COOPMAT_GLSLC_SUPPORT ON CACHE INTERNAL "Whether coopmat is supported by glslc")
|
| 40 |
endif()
|
| 41 |
+
else()
|
| 42 |
+
message(STATUS "GL_KHR_cooperative_matrix support already defined: ${GGML_VULKAN_COOPMAT_GLSLC_SUPPORT}")
|
| 43 |
+
endif()
|
| 44 |
+
|
| 45 |
+
if(GGML_VULKAN_COOPMAT_GLSLC_SUPPORT)
|
| 46 |
+
add_compile_definitions(GGML_VULKAN_COOPMAT_GLSLC_SUPPORT)
|
| 47 |
endif()
|
| 48 |
|
| 49 |
if(NOT DEFINED GGML_VULKAN_COOPMAT2_GLSLC_SUPPORT)
|
|
|
|
| 59 |
set(GGML_VULKAN_COOPMAT2_GLSLC_SUPPORT OFF CACHE INTERNAL "Whether coopmat2 is supported by glslc")
|
| 60 |
else()
|
| 61 |
message(STATUS "GL_NV_cooperative_matrix2 supported by glslc")
|
| 62 |
+
|
| 63 |
set(GGML_VULKAN_COOPMAT2_GLSLC_SUPPORT ON CACHE INTERNAL "Whether coopmat2 is supported by glslc")
|
| 64 |
endif()
|
| 65 |
+
else()
|
| 66 |
+
message(STATUS "GL_NV_cooperative_matrix2 support already defined: ${GGML_VULKAN_COOPMAT2_GLSLC_SUPPORT}")
|
| 67 |
+
endif()
|
| 68 |
+
|
| 69 |
+
if(GGML_VULKAN_COOPMAT2_GLSLC_SUPPORT)
|
| 70 |
+
add_compile_definitions(GGML_VULKAN_COOPMAT2_GLSLC_SUPPORT)
|
| 71 |
endif()
|
| 72 |
|
| 73 |
target_link_libraries(ggml-vulkan PRIVATE Vulkan::Vulkan)
|