Skip to content

Commit 3a58a01

Browse files
committed
Disable coopmat support on AMD proprietary driver
1 parent 13a068e commit 3a58a01

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2008,12 +2008,14 @@ static vk_device ggml_vk_get_device(size_t idx) {
20082008
vk::PhysicalDeviceMaintenance3Properties props3;
20092009
vk::PhysicalDeviceMaintenance4Properties props4;
20102010
vk::PhysicalDeviceSubgroupProperties subgroup_props;
2011+
vk::PhysicalDeviceDriverProperties driver_props;
20112012
vk::PhysicalDeviceShaderSMBuiltinsPropertiesNV sm_props;
20122013
vk::PhysicalDeviceShaderCoreProperties2AMD amd_shader_core_properties2_props;
20132014
props2.pNext = &props3;
20142015
props3.pNext = &subgroup_props;
2016+
subgroup_props.pNext = &driver_props;
20152017

2016-
VkBaseOutStructure * last_struct = (VkBaseOutStructure *)&subgroup_props;
2018+
VkBaseOutStructure * last_struct = (VkBaseOutStructure *)&driver_props;
20172019

20182020
if (maintenance4_support) {
20192021
last_struct->pNext = (VkBaseOutStructure *)&props4;
@@ -2065,8 +2067,9 @@ static vk_device ggml_vk_get_device(size_t idx) {
20652067

20662068
device->fp16 = !force_disable_f16 && fp16_storage && fp16_compute;
20672069

2068-
if (device->vendor_id == VK_VENDOR_ID_INTEL) {
2070+
if (device->vendor_id == VK_VENDOR_ID_INTEL || (props2.properties.vendorID == VK_VENDOR_ID_AMD && driver_props.driverID == vk::DriverId::eAmdProprietary)) {
20692071
// Intel drivers don't support coopmat properly yet
2072+
// Only RADV supports coopmat properly on AMD
20702073
device->coopmat_support = false;
20712074
}
20722075

@@ -2422,8 +2425,9 @@ static void ggml_vk_print_gpu_info(size_t idx) {
24222425
}
24232426
}
24242427

2425-
if (props2.properties.vendorID == VK_VENDOR_ID_INTEL) {
2428+
if (props2.properties.vendorID == VK_VENDOR_ID_INTEL || (props2.properties.vendorID == VK_VENDOR_ID_AMD && driver_props.driverID == vk::DriverId::eAmdProprietary)) {
24262429
// Intel drivers don't support coopmat properly yet
2430+
// Only RADV supports coopmat properly on AMD
24272431
coopmat_support = false;
24282432
}
24292433

0 commit comments

Comments
 (0)