vulkan: fix rdna4 mat_vec tuning (llama/29934)

This commit is contained in:
Ruben Ortlam
2026-10-06 10:38:19 +03:00
committed by Georgi Gerganov
parent 51bfbd6170
commit 05d4d89a18
+6 -6
View File
@@ -2889,11 +2889,11 @@ void ggml_vk_load_shaders(vk_device& device, vk_pipeline requested) {
rm_stdq = 2;
rm_stdq_int = 2;
}
// RDNA3: above four columns, static 4 rows for all types bench faster than the default
const bool is_rdna3 = device->vendor_id == VK_VENDOR_ID_AMD && device->architecture == AMD_RDNA3;
auto const &rm_int_n = [&](uint32_t rows, uint32_t i) { return (is_rdna3 && i >= 4) ? 4u : rows; };
// RDNA3: Static 4 rows for all types bench faster than the default
auto const &rm_id = [&](uint32_t rows) { return is_rdna3 ? 4u : rows; };
// RDNA3/4: above four columns, static 4 rows for all types bench faster than the default
const bool is_rdna3_or_4 = device->vendor_id == VK_VENDOR_ID_AMD && (device->architecture == AMD_RDNA3 || device->architecture == AMD_RDNA4);
auto const &rm_int_n = [&](uint32_t rows, uint32_t i) { return (is_rdna3_or_4 && i >= 4) ? 4u : rows; };
// RDNA3/4: Static 4 rows for all types bench faster than the default
auto const &rm_id = [&](uint32_t rows) { return is_rdna3_or_4 ? 4u : rows; };
uint32_t rm_iq = 2 * rm_kq;
const bool use_subgroups = device->subgroup_arithmetic;
@@ -3081,7 +3081,7 @@ void ggml_vk_load_shaders(vk_device& device, vk_pipeline requested) {
#if !defined(GGML_VULKAN_INTEGER_DOT_GLSLC_SUPPORT)
GGML_UNUSED(rm_stdq_int);
GGML_UNUSED(rm_kq_int);
GGML_UNUSED(is_rdna3);
GGML_UNUSED(is_rdna3_or_4);
GGML_UNUSED(rm_int_n);
GGML_UNUSED(rm_id);
GGML_UNUSED(rm_iq_int);