[XPU][UT]Fix xpu pass_config.fuse_norm_quant assert issue (#46804)
Signed-off-by: Lai, Yejing <yejing.lai@intel.com> Co-authored-by: Kunshang Ji <kunshang.ji@intel.com>
This commit is contained in:
co-authored by
Kunshang Ji
parent
fca432e60a
commit
ae2c4f3db7
@@ -1292,7 +1292,9 @@ def test_vllm_config_explicit_overrides():
|
||||
compilation_config=compilation_config,
|
||||
)
|
||||
assert config.compilation_config.cudagraph_mode == CUDAGraphMode.NONE
|
||||
assert config.compilation_config.pass_config.enable_qk_norm_rope_fusion is True
|
||||
assert config.compilation_config.pass_config.enable_qk_norm_rope_fusion is (
|
||||
current_platform.is_cuda_alike() or current_platform.is_xpu()
|
||||
)
|
||||
# Mode should still use default for O2
|
||||
assert config.compilation_config.mode == CompilationMode.VLLM_COMPILE
|
||||
|
||||
|
||||
@@ -262,10 +262,12 @@ class PassConfig:
|
||||
"Fusion enabled but reshape elimination disabled. "
|
||||
"RMSNorm + padding fusion might not work"
|
||||
)
|
||||
if self.enable_qk_norm_rope_fusion and not current_platform.is_cuda_alike():
|
||||
if self.enable_qk_norm_rope_fusion and not (
|
||||
current_platform.is_cuda_alike() or current_platform.is_xpu()
|
||||
):
|
||||
logger.warning_once(
|
||||
"QK Norm + RoPE fusion enabled but the current platform is not "
|
||||
"CUDA or ROCm. The fusion will be disabled."
|
||||
"CUDA, ROCm or XPU. The fusion will be disabled."
|
||||
)
|
||||
self.enable_qk_norm_rope_fusion = False
|
||||
if self.fuse_act_padding and not current_platform.is_rocm():
|
||||
|
||||
Reference in New Issue
Block a user