[XPU] Enable rms_norm/act quant fusions (#43963)
Signed-off-by: zhenwei-intel <zhenwei.liu@intel.com> Co-authored-by: Kunshang Ji <kunshang.ji@intel.com>
This commit is contained in:
co-authored by
Kunshang Ji
parent
478b49ddec
commit
3f3e2702c2
+10
-9
@@ -197,24 +197,25 @@ class XPUPlatform(Platform):
|
||||
)
|
||||
|
||||
# Disable fusion passes not yet supported on XPU.
|
||||
from vllm.config.compilation import CompilationMode
|
||||
|
||||
pass_config = compilation_config.pass_config
|
||||
fusion_passes_to_disable = {
|
||||
"enable_sp": "Sequence parallelism",
|
||||
"fuse_gemm_comms": "Async TP",
|
||||
"fuse_allreduce_rms": "AllReduce + RMSNorm fusion",
|
||||
"fuse_norm_quant": "RMSNorm + quant fusion",
|
||||
"fuse_act_quant": "Activation + quant fusion",
|
||||
"fuse_attn_quant": "Attention + quant fusion",
|
||||
"fuse_act_padding": "Activation + padding fusion",
|
||||
"fuse_rope_kvcache": "RoPE + KV cache fusion",
|
||||
}
|
||||
for flag, feature_name in fusion_passes_to_disable.items():
|
||||
if getattr(pass_config, flag):
|
||||
logger.warning(
|
||||
"Feature %r is not yet supported on XPU and will be disabled.",
|
||||
feature_name,
|
||||
)
|
||||
setattr(pass_config, flag, False)
|
||||
if compilation_config.mode != CompilationMode.NONE:
|
||||
for flag, feature_name in fusion_passes_to_disable.items():
|
||||
if getattr(pass_config, flag):
|
||||
logger.warning(
|
||||
"Feature %r is not yet supported on XPU and will be disabled.",
|
||||
feature_name,
|
||||
)
|
||||
setattr(pass_config, flag, False)
|
||||
|
||||
# check and update parallel config
|
||||
parallel_config = vllm_config.parallel_config
|
||||
|
||||
Reference in New Issue
Block a user