}
nth = std::min(nth, ggml_metal_pipeline_max_theads_per_threadgroup(pipeline));
- nth = std::min(nth, args.ne00_t);
+ nth = std::min(nth, (args.ne00_t + 31)/32*32);
const size_t smem = pipeline.smem;
test_cases.emplace_back(new test_l2_norm(GGML_TYPE_F32, { n, 5, 4, 3 }, eps, true));
test_cases.emplace_back(new test_l2_norm(GGML_TYPE_F32, { n, 5, 4, 3 }, eps, false, true));
}
+ // row lengths that are not a multiple of 32, for the scalar (33) and float4 (132, 260) paths
+ for (uint32_t n : { 33, 132, 260 }) {
+ for (bool v : { false, true }) {
+ test_cases.emplace_back(new test_norm(GGML_TYPE_F32, { n, 5, 4, 3 }, v, eps));
+ test_cases.emplace_back(new test_rms_norm(GGML_TYPE_F32, { n, 5, 4, 3 }, v, eps));
+ }
+ }
}
// in-place tests