Skip to content

Commit

Permalink
rm_kq=2 by default
Browse files Browse the repository at this point in the history
  • Loading branch information
netrunnereve authored Dec 22, 2024
1 parent fa70739 commit a3aea08
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions ggml/src/ggml-vulkan/ggml-vulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1857,17 +1857,14 @@ static void ggml_vk_load_shaders(vk_device& device) {

// the number of rows computed per shader depends on GPU model and quant
uint32_t rm_stdq = 1;
uint32_t rm_kq = 1;
uint32_t rm_kq = 2;
if (device->vendor_id == VK_VENDOR_ID_AMD) {
if (device->subgroup_min_size == 64 && device->subgroup_max_size == 64) { // GCN
rm_stdq = 2;
rm_kq = 4;
} else // RDNA
rm_kq = 2;
} else if (device->vendor_id == VK_VENDOR_ID_INTEL) {
}
} else if (device->vendor_id == VK_VENDOR_ID_INTEL)
rm_stdq = 2;
rm_kq = 2;
}

ggml_vk_create_pipeline(device, device->pipeline_dequant_mul_mat_vec_f32_f32[GGML_TYPE_F32 ], "mul_mat_vec_f32_f32_f32", mul_mat_vec_f32_f32_f32_len, mul_mat_vec_f32_f32_f32_data, "main", 3, sizeof(vk_mat_vec_push_constants), {2, 1, 1}, {device->subgroup_size, 2}, 1);
ggml_vk_create_pipeline(device, device->pipeline_dequant_mul_mat_vec_f32_f32[GGML_TYPE_F16 ], "mul_mat_vec_f16_f32_f32", mul_mat_vec_f16_f32_f32_len, mul_mat_vec_f16_f32_f32_data, "main", 3, sizeof(vk_mat_vec_push_constants), {2, 1, 1}, {device->subgroup_size, 2}, 1);
Expand Down

0 comments on commit a3aea08

Please sign in to comment.