[Kernel] Porting fuse_minimax_qk_norm to manual fusion (#43410)
Signed-off-by: Jee Jee Li <jeejeelee@inferact.ai>
This commit is contained in:
@@ -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:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user