]> git.djapps.eu Git - pkg/ggml/sources/ggml/commitdiff
vulkan : fix Qantized Mat-Vec Mul on AMD GPUs for ncols < 64 (llama/8855)
author0cc4m <redacted>
Mon, 5 Aug 2024 05:52:55 +0000 (07:52 +0200)
committerGeorgi Gerganov <redacted>
Thu, 8 Aug 2024 10:45:29 +0000 (13:45 +0300)
* 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

tests/test-backend-ops.cpp

index f5065f14515628d54633301ab30bf8f0a135a0d1..54cef05c3de3d376ce548dc4264498f325e5f561 100644 (file)
@@ -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}));
         }
     }