Skip to content

Commit c66d008

Browse files
committed
Add environment variable GGML_VK_DISABLE_COOPMAT to disable VK_KHR_cooperative_matrix support
1 parent f54afb4 commit c66d008

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ggml/src/ggml-vulkan/ggml-vulkan.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1993,13 +1993,14 @@ static vk_device ggml_vk_get_device(size_t idx) {
19931993
amd_shader_core_properties2 = true;
19941994
} else if (strcmp("VK_EXT_pipeline_robustness", properties.extensionName) == 0) {
19951995
pipeline_robustness = true;
1996-
} else if (strcmp("VK_KHR_cooperative_matrix", properties.extensionName) == 0) {
1996+
} else if (strcmp("VK_KHR_cooperative_matrix", properties.extensionName) == 0 &&
1997+
!getenv("GGML_VK_DISABLE_COOPMAT")) {
19971998
device->coopmat_support = true;
19981999
device->coopmat_m = 0;
19992000
device->coopmat_n = 0;
20002001
device->coopmat_k = 0;
20012002
} else if (strcmp("VK_NV_cooperative_matrix2", properties.extensionName) == 0 &&
2002-
!getenv("GGML_VULKAN_DISABLE_COOPMAT2")) {
2003+
!getenv("GGML_VK_DISABLE_COOPMAT2")) {
20032004
coopmat2_support = true;
20042005
}
20052006
}
@@ -2062,8 +2063,7 @@ static vk_device ggml_vk_get_device(size_t idx) {
20622063
device->shader_core_count = 0;
20632064
}
20642065

2065-
const char* GGML_VK_DISABLE_F16 = getenv("GGML_VK_DISABLE_F16");
2066-
const bool force_disable_f16 = GGML_VK_DISABLE_F16 != nullptr;
2066+
const bool force_disable_f16 = getenv("GGML_VK_DISABLE_F16") != nullptr;
20672067

20682068
device->fp16 = !force_disable_f16 && fp16_storage && fp16_compute;
20692069

0 commit comments

Comments
 (0)