From 5d32927be0a0bdb7a27728d70e44fd61bc4a7fcf Mon Sep 17 00:00:00 2001 From: zjy0516 Date: Sat, 6 Dec 2025 14:59:58 +0800 Subject: [PATCH 1/4] fix Signed-off-by: zjy0516 --- vllm/compilation/collective_fusion.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/vllm/compilation/collective_fusion.py b/vllm/compilation/collective_fusion.py index 2717738dd7c2..c4e482b2f53b 100644 --- a/vllm/compilation/collective_fusion.py +++ b/vllm/compilation/collective_fusion.py @@ -1188,6 +1188,18 @@ def register_patterns(self): self.disabled = False def is_applicable_for_range(self, compile_range: Range) -> bool: + if self.disabled: + logger.warning_once( + "AllReduce fusion pass is disabled for tensor parallel size %s; " + "skipping", + self.tp_size, + ) + return False + if not hasattr(self, "max_token_num"): + logger.warning_once( + "AllReduce fusion pass missing max token bound; skipping", + ) + return False return compile_range.end <= self.max_token_num @VllmInductorPass.time_and_log From d5e7599d2266de092873130fde8f8b5b7e260f63 Mon Sep 17 00:00:00 2001 From: zjy0516 Date: Sat, 6 Dec 2025 15:05:33 +0800 Subject: [PATCH 2/4] fix Signed-off-by: zjy0516 --- vllm/compilation/collective_fusion.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/vllm/compilation/collective_fusion.py b/vllm/compilation/collective_fusion.py index c4e482b2f53b..d2fdc11d803a 100644 --- a/vllm/compilation/collective_fusion.py +++ b/vllm/compilation/collective_fusion.py @@ -1195,11 +1195,6 @@ def is_applicable_for_range(self, compile_range: Range) -> bool: self.tp_size, ) return False - if not hasattr(self, "max_token_num"): - logger.warning_once( - "AllReduce fusion pass missing max token bound; skipping", - ) - return False return compile_range.end <= self.max_token_num @VllmInductorPass.time_and_log From 6149fa66a6de14a7c17797387b132ed7a28a2866 Mon Sep 17 00:00:00 2001 From: zjy0516 Date: Sun, 7 Dec 2025 23:49:18 +0800 Subject: [PATCH 3/4] update Signed-off-by: zjy0516 --- vllm/compilation/collective_fusion.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/vllm/compilation/collective_fusion.py b/vllm/compilation/collective_fusion.py index d2fdc11d803a..c88a3816c16c 100644 --- a/vllm/compilation/collective_fusion.py +++ b/vllm/compilation/collective_fusion.py @@ -1189,11 +1189,7 @@ def register_patterns(self): def is_applicable_for_range(self, compile_range: Range) -> bool: if self.disabled: - logger.warning_once( - "AllReduce fusion pass is disabled for tensor parallel size %s; " - "skipping", - self.tp_size, - ) + logger.warning_once("AllReduce fusion pass is disabled.") return False return compile_range.end <= self.max_token_num From 14714629f94ac09225a813c5a9eeb608886f14af Mon Sep 17 00:00:00 2001 From: zjy0516 Date: Mon, 8 Dec 2025 00:01:52 +0800 Subject: [PATCH 4/4] update Signed-off-by: zjy0516 --- vllm/compilation/collective_fusion.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vllm/compilation/collective_fusion.py b/vllm/compilation/collective_fusion.py index c88a3816c16c..57bd94c7e8ad 100644 --- a/vllm/compilation/collective_fusion.py +++ b/vllm/compilation/collective_fusion.py @@ -1076,11 +1076,15 @@ def __init__(self, config: VllmConfig): self.disabled = True self.tp_size = get_tensor_model_parallel_world_size() if self.tp_size <= 1: + logger.warning_once("AllReduce fusion pass is disabled for tp_size <= 1.") return self.patterns: PatternMatcherPass = PatternMatcherPass( pass_name="all_reduce_fusion_pass" ) if config.model_config is None: + logger.warning_once( + "AllReduce fusion pass is disabled for missing model_config." + ) return self.hidden_dim = config.model_config.get_hidden_size() self.group = get_tp_group().device_group