metal : fix glu dispatch with ne00 = 1 (#28306)

* metal : fix glu dispatch with ne00 = 1

* tests : disable ill-defined tests
This commit is contained in:
Georgi Gerganov
2026-09-03 13:25:41 +03:00
committed by GitHub
parent f45576aa86
commit 0df017d6dd
2 changed files with 11 additions and 13 deletions
+10 -12
View File
@@ -10380,14 +10380,15 @@ static std::vector<std::unique_ptr<test_case>> make_test_cases_eval() {
}
// Fused row-pair coverage: minimum rows, an even pair, and an odd tail.
for (ggml_glu_op glu_op : { GGML_GLU_OP_SWIGLU, GGML_GLU_OP_GEGLU }) {
for (int64_t m_batch : { 2, 3, 4 }) {
for (int64_t rows : { 1, 2, 3 }) {
test_cases.emplace_back(new test_mul_mat_vec_fusion(GGML_TYPE_Q4_K, glu_op, m_batch, rows, 256,
false, 16, 8, false, false, true, false, { 1, 1 }));
}
}
}
// TODO: the max_nmse_err() for these cases is not estimated correctly causing sporadic false failures.
//for (ggml_glu_op glu_op : { GGML_GLU_OP_SWIGLU, GGML_GLU_OP_GEGLU }) {
// for (int64_t m_batch : { 2, 3, 4 }) {
// for (int64_t rows : { 1, 2, 3 }) {
// test_cases.emplace_back(new test_mul_mat_vec_fusion(GGML_TYPE_Q4_K, glu_op, m_batch, rows, 256,
// false, 16, 8, false, false, true, false, { 1, 1 }));
// }
// }
//}
// Both sides of the same row-count boundary as above, on the fused path.
for (int64_t rows : {6271, 6272, 6273}) {
@@ -10682,10 +10683,7 @@ static std::vector<std::unique_ptr<test_case>> make_test_cases_perf() {
}
}
// Q4_K multi-column mat-vec, at ffn_up/ffn_gate geometry (k = n_embd, m = n_ff): n sweeps the
// per-column specializations used for short prompts and speculative/MTP verify, and m brackets
// the row count at which the SYCL backend switches to two output rows per subgroup
// (Q4_K_MMVQ_ROW_PAIR_MIN_NROWS in ggml-sycl/mmvq.cpp), so both sides of it can be measured.
// Q4_K multi-column mat-vec
for (int64_t m : {4096, 6144, 6272, 14336}) {
for (int bs : {1, 2, 3, 4, 8}) {
test_cases.emplace_back(new test_mul_mat(GGML_TYPE_Q4_K, GGML_TYPE_F32, m, bs, 4096, {1, 1}, {1, 1}));