From ca016f230d5fab76a43a632354cbd03e27d7d0fd Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Wed, 7 Oct 2026 16:13:28 +0200 Subject: [PATCH] sycl mtp: the same n_expert == 512 and k == 10 guard on the per-token native router call Reported-by: rwkeyes (#1357) --- sycl/src/core/mtp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/src/core/mtp.cpp b/sycl/src/core/mtp.cpp index 3c021574..373bcf05 100644 --- a/sycl/src/core/mtp.cpp +++ b/sycl/src/core/mtp.cpp @@ -1051,7 +1051,7 @@ bool MtpDrafter::record_rest(int step_row, dpct::queue_ptr cs, } else { for (int t = 0; t < T; ++t) { bf16_gemv_fp32_mmvf(mixed_ + t * N, bf16("mlp.gate.weight"), logits_ + t * g.n_expert, (int) N, (int) g.n_expert, cs); - if (native_router_enabled()) native_router_top10(logits_ + t * g.n_expert, ids_ + t * K, w_ + t * K, cs); + if (native_router_enabled() && g.n_expert == 512 && K == 10) native_router_top10(logits_ + t * g.n_expert, ids_ + t * K, w_ + t * K, cs); else router_top10(logits_ + t * g.n_expert, 1, (int) g.n_expert, (int) K, ids_ + t * K, w_ + t * K, cs); } }