]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
vulkan: disable large mmv subgroups on older Nvidia GPUs (#15717)
authorRuben Ortlam <redacted>
Mon, 1 Sep 2025 18:58:35 +0000 (20:58 +0200)
committerGitHub <redacted>
Mon, 1 Sep 2025 18:58:35 +0000 (20:58 +0200)
ggml/src/ggml-vulkan/ggml-vulkan.cpp

index 4057ce8556f23494b7f91f68b742755499399704..3ac459bc4f65f83577802a1a07a949788d286b5f 100644 (file)
@@ -4662,7 +4662,7 @@ static vk_pipeline ggml_vk_get_dequantize_mul_mat_vec(ggml_backend_vk_context *
 
     // heuristic to choose workgroup size
     uint32_t dmmv_wg = DMMV_WG_SIZE_SUBGROUP;
-    if (ctx->device->vendor_id == VK_VENDOR_ID_NVIDIA || ctx->device->vendor_id == VK_VENDOR_ID_INTEL) {
+    if ((ctx->device->vendor_id == VK_VENDOR_ID_NVIDIA && ctx->device->architecture != vk_device_architecture::NVIDIA_PRE_TURING) || ctx->device->vendor_id == VK_VENDOR_ID_INTEL) {
         // Prefer larger workgroups when M is small, to spread the work out more
         // and keep more SMs busy.
         // q6_k seems to prefer small workgroup size even for "medium" values of M.