[Bugfix] DSv4 MXFP4 selector: stop narrowing explicit aliases to their BF16 variant (#53586)

Signed-off-by: Zihua Wu <zihuaw@nvidia.com>
Signed-off-by: Zihua Wu <13583761+lucifer1004@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Jee Jee Li <pandaleefree@gmail.com>
Co-authored-by: Yongye Zhu <zyy1102000@gmail.com>
This commit is contained in:
Gabriel Wu
2026-09-07 07:19:13 +00:00
committed by GitHub
co-authored by mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Jee Jee Li Yongye Zhu
parent 34b1e9f7a6
commit 5893426b88
2 changed files with 36 additions and 1 deletions
@@ -670,7 +670,13 @@ def select_deepseek_v4_mxfp4_moe_backend(
# falling back to the auto priority list.
runner_backend = config.moe_backend
if runner_backend != "auto":
requested_backends = _get_requested_backends(runner_backend, None)
if runner_backend == "b12x":
requested_backends = _get_requested_backends(runner_backend, None)
else:
# Try every variant of the alias in priority order. Narrowing to
# the BF16 variant would drop SM100+ W4A8 variants on devices where
# the BF16 variant is gated to SM90.
requested_backends = map_mxfp4_backend(runner_backend)
if activation_format == mk.FusedMoEActivationFormat.BatchedExperts:
requested_backends = [
Mxfp4MoeBackend.BATCHED_MARLIN if b == Mxfp4MoeBackend.MARLIN else b