mirror of
https://github.com/ggml-org/whisper.cpp.git
synced 2026-10-22 03:48:19 +02:00
vulkan: fix rdna4 mat_vec tuning (llama/29934)
This commit is contained in:
@@ -2889,11 +2889,11 @@ void ggml_vk_load_shaders(vk_device& device, vk_pipeline requested) {
|
|||||||
rm_stdq = 2;
|
rm_stdq = 2;
|
||||||
rm_stdq_int = 2;
|
rm_stdq_int = 2;
|
||||||
}
|
}
|
||||||
// RDNA3: above four columns, static 4 rows for all types bench faster than the default
|
// RDNA3/4: 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;
|
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 && i >= 4) ? 4u : rows; };
|
auto const &rm_int_n = [&](uint32_t rows, uint32_t i) { return (is_rdna3_or_4 && i >= 4) ? 4u : rows; };
|
||||||
// RDNA3: Static 4 rows for all types bench faster than the default
|
// RDNA3/4: Static 4 rows for all types bench faster than the default
|
||||||
auto const &rm_id = [&](uint32_t rows) { return is_rdna3 ? 4u : rows; };
|
auto const &rm_id = [&](uint32_t rows) { return is_rdna3_or_4 ? 4u : rows; };
|
||||||
uint32_t rm_iq = 2 * rm_kq;
|
uint32_t rm_iq = 2 * rm_kq;
|
||||||
|
|
||||||
const bool use_subgroups = device->subgroup_arithmetic;
|
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)
|
#if !defined(GGML_VULKAN_INTEGER_DOT_GLSLC_SUPPORT)
|
||||||
GGML_UNUSED(rm_stdq_int);
|
GGML_UNUSED(rm_stdq_int);
|
||||||
GGML_UNUSED(rm_kq_int);
|
GGML_UNUSED(rm_kq_int);
|
||||||
GGML_UNUSED(is_rdna3);
|
GGML_UNUSED(is_rdna3_or_4);
|
||||||
GGML_UNUSED(rm_int_n);
|
GGML_UNUSED(rm_int_n);
|
||||||
GGML_UNUSED(rm_id);
|
GGML_UNUSED(rm_id);
|
||||||
GGML_UNUSED(rm_iq_int);
|
GGML_UNUSED(rm_iq_int);
|
||||||
|
|||||||
Reference in New Issue
Block a user