From: 0cc4m Date: Mon, 5 Aug 2024 05:52:55 +0000 (+0200) Subject: vulkan : fix Qantized Mat-Vec Mul on AMD GPUs for ncols < 64 (llama/8855) X-Git-Tag: upstream/0.0.1642~467 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=a3b2059cacacd97985b4d814f464779d6e1545f2;p=pkg%2Fggml%2Fsources%2Fggml vulkan : fix Qantized Mat-Vec Mul on AMD GPUs for ncols < 64 (llama/8855) * Fix Vulkan mul mat vec invalid results when ncols < warp size * Only run backend ops mul mat vec block size test if block size not already covered --- diff --git a/tests/test-backend-ops.cpp b/tests/test-backend-ops.cpp index f5065f14..54cef05c 100644 --- a/tests/test-backend-ops.cpp +++ b/tests/test-backend-ops.cpp @@ -2271,9 +2271,10 @@ static bool test_backend(ggml_backend_t backend, test_mode mode, const char * op for (ggml_type type_a : other_types) { for (ggml_type type_b : {GGML_TYPE_F32}) { - - test_cases.emplace_back(new test_mul_mat(type_a, type_b, 16, 1, ggml_blck_size(type_a), { 1, 1}, {1, 1})); - test_cases.emplace_back(new test_mul_mat(type_a, type_b, 16, 1, 256, { 1, 1}, {1, 1})); + if (ggml_blck_size(type_a) != 256) { + test_cases.emplace_back(new test_mul_mat(type_a, type_b, 16, 1, ggml_blck_size(type_a), {1, 1}, {1, 1})); + } + test_cases.emplace_back(new test_mul_mat(type_a, type_b, 16, 1, 256, {1, 1}, {1, 1})); } }