Spaces:
Running
Running
Commit
·
69679f5
1
Parent(s):
6975ec2
vulkan: Disable coopmat/coopmat2/bfloat extensions if glslc doesn't support it (llama/13696)
Browse files
ggml/src/ggml-vulkan/ggml-vulkan.cpp
CHANGED
|
@@ -2804,23 +2804,29 @@ static vk_device ggml_vk_get_device(size_t idx) {
|
|
| 2804 |
pipeline_robustness = true;
|
| 2805 |
} else if (strcmp("VK_EXT_subgroup_size_control", properties.extensionName) == 0) {
|
| 2806 |
device->subgroup_size_control = true;
|
|
|
|
| 2807 |
} else if (strcmp("VK_KHR_cooperative_matrix", properties.extensionName) == 0 &&
|
| 2808 |
!getenv("GGML_VK_DISABLE_COOPMAT")) {
|
| 2809 |
device->coopmat_support = true;
|
| 2810 |
device->coopmat_m = 0;
|
| 2811 |
device->coopmat_n = 0;
|
| 2812 |
device->coopmat_k = 0;
|
|
|
|
|
|
|
| 2813 |
} else if (strcmp("VK_NV_cooperative_matrix2", properties.extensionName) == 0 &&
|
| 2814 |
!getenv("GGML_VK_DISABLE_COOPMAT2")) {
|
| 2815 |
coopmat2_support = true;
|
|
|
|
| 2816 |
#if defined(GGML_VULKAN_INTEGER_DOT_GLSLC_SUPPORT)
|
| 2817 |
} else if (strcmp("VK_KHR_shader_integer_dot_product", properties.extensionName) == 0 &&
|
| 2818 |
!getenv("GGML_VK_DISABLE_INTEGER_DOT_PRODUCT")) {
|
| 2819 |
device->integer_dot_product = true;
|
| 2820 |
#endif
|
|
|
|
| 2821 |
} else if (strcmp("VK_KHR_shader_bfloat16", properties.extensionName) == 0 &&
|
| 2822 |
!getenv("GGML_VK_DISABLE_BFLOAT16")) {
|
| 2823 |
bfloat16_support = true;
|
|
|
|
| 2824 |
}
|
| 2825 |
}
|
| 2826 |
|
|
|
|
| 2804 |
pipeline_robustness = true;
|
| 2805 |
} else if (strcmp("VK_EXT_subgroup_size_control", properties.extensionName) == 0) {
|
| 2806 |
device->subgroup_size_control = true;
|
| 2807 |
+
#if defined(GGML_VULKAN_COOPMAT_GLSLC_SUPPORT)
|
| 2808 |
} else if (strcmp("VK_KHR_cooperative_matrix", properties.extensionName) == 0 &&
|
| 2809 |
!getenv("GGML_VK_DISABLE_COOPMAT")) {
|
| 2810 |
device->coopmat_support = true;
|
| 2811 |
device->coopmat_m = 0;
|
| 2812 |
device->coopmat_n = 0;
|
| 2813 |
device->coopmat_k = 0;
|
| 2814 |
+
#endif
|
| 2815 |
+
#if defined(GGML_VULKAN_COOPMAT2_GLSLC_SUPPORT)
|
| 2816 |
} else if (strcmp("VK_NV_cooperative_matrix2", properties.extensionName) == 0 &&
|
| 2817 |
!getenv("GGML_VK_DISABLE_COOPMAT2")) {
|
| 2818 |
coopmat2_support = true;
|
| 2819 |
+
#endif
|
| 2820 |
#if defined(GGML_VULKAN_INTEGER_DOT_GLSLC_SUPPORT)
|
| 2821 |
} else if (strcmp("VK_KHR_shader_integer_dot_product", properties.extensionName) == 0 &&
|
| 2822 |
!getenv("GGML_VK_DISABLE_INTEGER_DOT_PRODUCT")) {
|
| 2823 |
device->integer_dot_product = true;
|
| 2824 |
#endif
|
| 2825 |
+
#if defined(GGML_VULKAN_BFLOAT16_GLSLC_SUPPORT)
|
| 2826 |
} else if (strcmp("VK_KHR_shader_bfloat16", properties.extensionName) == 0 &&
|
| 2827 |
!getenv("GGML_VK_DISABLE_BFLOAT16")) {
|
| 2828 |
bfloat16_support = true;
|
| 2829 |
+
#endif
|
| 2830 |
}
|
| 2831 |
}
|
| 2832 |
|