Skip to content

Commit adad03c

Browse files
committed
Disable coopmat support on AMD proprietary driver
1 parent 7002d6c commit adad03c

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
@@ -1718,12 +1718,14 @@ static vk_device ggml_vk_get_device(size_t idx) {
17181718
vk::PhysicalDeviceMaintenance3Properties props3;
17191719
vk::PhysicalDeviceMaintenance4Properties props4;
17201720
vk::PhysicalDeviceSubgroupProperties subgroup_props;
1721+
vk::PhysicalDeviceDriverProperties driver_props;
17211722
vk::PhysicalDeviceShaderSMBuiltinsPropertiesNV sm_props;
17221723
vk::PhysicalDeviceShaderCoreProperties2AMD amd_shader_core_properties2_props;
17231724
props2.pNext = &props3;
17241725
props3.pNext = &subgroup_props;
1726+
subgroup_props.pNext = &driver_props;
17251727

1726-
VkBaseOutStructure * last_struct = (VkBaseOutStructure *)&subgroup_props;
1728+
VkBaseOutStructure * last_struct = (VkBaseOutStructure *)&driver_props;
17271729

17281730
if (maintenance4_support) {
17291731
last_struct->pNext = (VkBaseOutStructure *)&props4;
@@ -1789,8 +1791,9 @@ static vk_device ggml_vk_get_device(size_t idx) {
17891791

17901792
device->fp16 = !force_disable_f16 && fp16_storage && fp16_compute;
17911793

1792-
if (device->vendor_id == VK_VENDOR_ID_INTEL) {
1794+
if (device->vendor_id == VK_VENDOR_ID_INTEL || (props2.properties.vendorID == VK_VENDOR_ID_AMD && driver_props.driverID == vk::DriverId::eAmdProprietary)) {
17931795
// Intel drivers don't support coopmat properly yet
1796+
// Only RADV supports coopmat properly on AMD
17941797
device->coopmat_support = false;
17951798
}
17961799

@@ -2060,8 +2063,9 @@ static void ggml_vk_print_gpu_info(size_t idx) {
20602063
}
20612064
}
20622065

2063-
if (props2.properties.vendorID == VK_VENDOR_ID_INTEL) {
2066+
if (props2.properties.vendorID == VK_VENDOR_ID_INTEL || (props2.properties.vendorID == VK_VENDOR_ID_AMD && driver_props.driverID == vk::DriverId::eAmdProprietary)) {
20642067
// Intel drivers don't support coopmat properly yet
2068+
// Only RADV supports coopmat properly on AMD
20652069
coopmat_support = false;
20662070
}
20672071

0 commit comments

Comments
 (0)