[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>

Yejing Lai committed Jun 30, 2026 at 12:13 UTC ae2c4f3db713242b173548bc46f1b74b4dbb4c08
2 files changed +7 -3
tests/test_config.py
+3 -1
@@ -1292,7 +1292,9 @@ def test_vllm_config_explicit_overrides():
1292 compilation_config=compilation_config,
1293 )
1294 assert config.compilation_config.cudagraph_mode == CUDAGraphMode.NONE
1295 - assert config.compilation_config.pass_config.enable_qk_norm_rope_fusion is True
1295 + assert config.compilation_config.pass_config.enable_qk_norm_rope_fusion is (
1296 + current_platform.is_cuda_alike() or current_platform.is_xpu()
1297 + )
1298 # Mode should still use default for O2
1299 assert config.compilation_config.mode == CompilationMode.VLLM_COMPILE
1300
vllm/config/compilation.py
+4 -2
@@ -262,10 +262,12 @@ class PassConfig:
262 "Fusion enabled but reshape elimination disabled. "
263 "RMSNorm + padding fusion might not work"
264 )
265 - if self.enable_qk_norm_rope_fusion and not current_platform.is_cuda_alike():
265 + if self.enable_qk_norm_rope_fusion and not (
266 + current_platform.is_cuda_alike() or current_platform.is_xpu()
267 + ):
268 logger.warning_once(
269 "QK Norm + RoPE fusion enabled but the current platform is not "
268 - "CUDA or ROCm. The fusion will be disabled."
270 + "CUDA, ROCm or XPU. The fusion will be disabled."
271 )
272 self.enable_qk_norm_rope_fusion = False
273 if self.fuse_act_padding and not current_platform.is_rocm():