Enable cooperative matrix support for Intel Arrow Lake H GPUs

This commit is contained in:
Merecki, Mariusz 2025-12-03 14:11:38 +01:00
parent ec98e20021
commit bbcbeba282
1 changed files with 12 additions and 3 deletions

View File

@ -2843,6 +2843,14 @@ static void ggml_vk_load_shaders(vk_device& device) {
m_warptile_mmq = m_warptile_mmq_int = { 256, 64, 64, 32, 16, 16, 2, 2, 2, 1, 16 };
m_warptile_mmqid = m_warptile_mmqid_int = { 256, 64, 64, 32, 16, 16, 2, 2, 2, 1, 16 };
}
#if defined(VK_KHR_cooperative_matrix) && defined(GGML_VULKAN_COOPMAT_GLSLC_SUPPORT)
else if ((device->vendor_id == VK_VENDOR_ID_INTEL) &&
(device->architecture != INTEL_XE2) &&
(device->driver_id == vk::DriverId::eIntelProprietaryWindows) &&
device->coopmat_support) {
m_warptile_mmq = { 256, 64, 64, 32, 16, 32, 2, tm_m, tn_m, tk_m, 32 };
}
#endif
l_mmq_wg_denoms = l_wg_denoms = {128, 128, 1 };
m_mmq_wg_denoms = m_wg_denoms = { 64, 64, 1 };
@ -14446,9 +14454,10 @@ static bool ggml_vk_device_is_supported(const vk::PhysicalDevice & vkdev) {
static bool ggml_vk_khr_cooperative_matrix_support(const vk::PhysicalDeviceProperties& props, const vk::PhysicalDeviceDriverProperties& driver_props, vk_device_architecture arch) {
switch (props.vendorID) {
case VK_VENDOR_ID_INTEL:
// Only allowing Xe2 GPU at the moment since Xe2 GPU can gain significant performance boost,
// while some older hardware (ex. Arc A770) has performance regressions
return arch == vk_device_architecture::INTEL_XE2;
// Only allowing Xe2 GPU and integrated Xe GPUs at the moment since older hardware (ex. Arc A770) has performance regressions.
return arch == vk_device_architecture::INTEL_XE2 ||
(driver_props.driverID == vk::DriverId::eIntelProprietaryWindows &&
props.deviceType == vk::PhysicalDeviceType::eIntegratedGpu);
case VK_VENDOR_ID_AMD:
if (driver_props.driverID == vk::DriverId::eAmdProprietary || driver_props.driverID == vk::DriverId::eAmdOpenSource) {
// Workaround for AMD proprietary driver reporting support on all GPUs