ling32 sycl: expanded-form MLA prefill on by default for Battlemage (STRATA_L32_MLA_EXPANDED=0 turns it off)

SYCL-only block in ling32_main.cpp next to the CUDA / HIP defaults: every prefill chunk above kda_seq_max_n tokens (mla_exp_min_n 32) takes the expanded form when the device has XMX; --mla-prefill still wins.
This commit is contained in:
Niko1221 committed 2026-12-03 03:00:57 +01:00
1 parent 6787e11a78
commit efff44d494
1 file changed
+6
+6
View File
@@ -1734,6 +1734,12 @@ int main(int argc, char** argv) {
const char* ev = std::getenv("STRATA_L32_MLA_EXPANDED"); // =0: back to the absorbed form without a rebuild
if (!(ev && ev[0] == '0')) { o.mla_expanded = true; o.mla_exp_min_n = 1024; }
}
#if defined(STRATA_USE_SYCL)
if (!o.mla_prefill_set && !o.mla_expanded) { // Intel Battlemage (XMX): the expanded-form MLA prefill (joint_matrix, hi/lo fp16 splits, about fp32) for every prefill chunk; the absorbed original kernel is far slower there
const char* ev = std::getenv("STRATA_L32_MLA_EXPANDED"); // =0: back to the absorbed form without a rebuild
if (!(ev && ev[0] == '0') && gpu::mla_exp_ok(128, 64, 128, 512)) { o.mla_expanded = true; o.mla_exp_min_n = 32; }
}
#endif
#if defined(STRATA_USE_HIP)
{ // gfx12: the expanded-form WMMA MLA for prefill chunks is the default (owner decision 2026-12-02, after the R9700 goldens); gfx11 and the other AMD cards keep the absorbed kernel
cudaDeviceProp dpx{};