A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 11, 21:15 UTC
[Bugfix] fix fuse_allreduce_rms when tp =1 (#30178)
Signed-off-by: zjy0516 <riverclouds.zhu@qq.com>
Jiangyun Zhu committed
Dec 8, 2025 at 14:43 UTC
d143271234454026454c5ee6a55fc516dd298dac
1 file changed
+7
vllm/compilation/collective_fusion.py
+7
@@ -1076,11 +1076,15 @@ class AllReduceFusionPass(VllmPatternMatcherPass):
1076
self.disabled = True
1077
self.tp_size = get_tensor_model_parallel_world_size()
1078
if self.tp_size <= 1:
1079
+ logger.warning_once("AllReduce fusion pass is disabled for tp_size <= 1.")
1080
return
1081
self.patterns: PatternMatcherPass = PatternMatcherPass(
1082
pass_name="all_reduce_fusion_pass"
1083
)
1084
if config.model_config is None:
1085
+ logger.warning_once(
1086
+ "AllReduce fusion pass is disabled for missing model_config."
1087
+ )
1088
return
1089
self.hidden_dim = config.model_config.get_hidden_size()
1090
self.group = get_tp_group().device_group
@@ -1188,6 +1192,9 @@ class AllReduceFusionPass(VllmPatternMatcherPass):
1192
self.disabled = False
1193
1194
def is_applicable_for_range(self, compile_range: Range) -> bool:
1195
+ if self.disabled:
1196
+ logger.warning_once("AllReduce fusion pass is disabled.")
1197
+ return False
1198
return compile_range.end <= self.max_token_num
1199
1200
@VllmInductorPass.time_and_log