[Kernel] Porting fuse_minimax_qk_norm to manual fusion (#43410)

Signed-off-by: Jee Jee Li <jeejeelee@inferact.ai>
This commit is contained in:
Jee Jee Li
2026-05-26 13:16:03 -07:00
committed by GitHub
parent 49b4882779
commit 6e503868ca
12 changed files with 262 additions and 490 deletions
+10 -1
View File
@@ -135,7 +135,9 @@ class PassConfig:
fuse_allreduce_rms: bool = None # type: ignore[assignment]
"""Enable flashinfer allreduce fusion."""
fuse_minimax_qk_norm: bool = None # type: ignore[assignment]
"""Enable fused allreduce+RMSNorm for MiniMax QK norm."""
"""Deprecated. The MiniMax QK norm fusion is now applied automatically at
runtime (see `MiniMaxText01RMSNormTP.forward_qkv`). This flag is kept for
backward compatibility and has no effect; it will be removed in v0.23."""
enable_qk_norm_rope_fusion: bool = None # type: ignore[assignment]
"""Enable fused Q/K RMSNorm + RoPE pass."""
fuse_rope_kvcache_cat_mla: bool = None # type: ignore[assignment]
@@ -294,6 +296,13 @@ class PassConfig:
"current platform is not CUDA or ROCm. The fusion will be disabled."
)
self.fuse_rope_kvcache_cat_mla = False
if self.fuse_minimax_qk_norm is not None:
logger.warning_once(
"`fuse_minimax_qk_norm` is deprecated and has no effect; "
"the MiniMax QK norm fusion is now applied automatically at "
"runtime when its conditions are met. This flag will be "
"removed in v0.23."
)
def log_enabled_passes(self) -> None:
"""