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:
@@ -917,7 +917,7 @@ int ggml_metal_op_glu(ggml_metal_op_t ctx, int idx) {
|
|||||||
|
|
||||||
const int64_t nrows = ggml_nrows(op->src[0]);
|
const int64_t nrows = ggml_nrows(op->src[0]);
|
||||||
|
|
||||||
const int32_t nth = std::min(ggml_metal_pipeline_max_theads_per_threadgroup(pipeline), ne00/2);
|
const int32_t nth = std::max(1, std::min(ggml_metal_pipeline_max_theads_per_threadgroup(pipeline), ne00/2));
|
||||||
|
|
||||||
ggml_metal_encoder_set_pipeline(enc, pipeline);
|
ggml_metal_encoder_set_pipeline(enc, pipeline);
|
||||||
ggml_metal_encoder_set_bytes (enc, &args, sizeof(args), 0);
|
ggml_metal_encoder_set_bytes (enc, &args, sizeof(args), 0);
|
||||||
|
|||||||
+10
-12
@@ -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.
|
// 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 }) {
|
// TODO: the max_nmse_err() for these cases is not estimated correctly causing sporadic false failures.
|
||||||
for (int64_t m_batch : { 2, 3, 4 }) {
|
//for (ggml_glu_op glu_op : { GGML_GLU_OP_SWIGLU, GGML_GLU_OP_GEGLU }) {
|
||||||
for (int64_t rows : { 1, 2, 3 }) {
|
// for (int64_t m_batch : { 2, 3, 4 }) {
|
||||||
test_cases.emplace_back(new test_mul_mat_vec_fusion(GGML_TYPE_Q4_K, glu_op, m_batch, rows, 256,
|
// for (int64_t rows : { 1, 2, 3 }) {
|
||||||
false, 16, 8, false, false, true, false, { 1, 1 }));
|
// 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.
|
// Both sides of the same row-count boundary as above, on the fused path.
|
||||||
for (int64_t rows : {6271, 6272, 6273}) {
|
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
|
// Q4_K multi-column mat-vec
|
||||||
// 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.
|
|
||||||
for (int64_t m : {4096, 6144, 6272, 14336}) {
|
for (int64_t m : {4096, 6144, 6272, 14336}) {
|
||||||
for (int bs : {1, 2, 3, 4, 8}) {
|
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}));
|
test_cases.emplace_back(new test_mul_mat(GGML_TYPE_Q4_K, GGML_TYPE_F32, m, bs, 4096, {1, 1}, {1, 1}));
|
||||||
|
|||||||
Reference in New Issue
Block a user