[Bugfix] Pass TP group to FlashInfer all-reduce fusion (#45917)
Signed-off-by: Daniel Serebrenik <daserebrenik@nvidia.com>
This commit is contained in:
+1
-8
@@ -129,13 +129,7 @@ def enable_act_fusion(cfg: "VllmConfig") -> bool:
|
|||||||
|
|
||||||
|
|
||||||
def enable_allreduce_rms_fusion(cfg: "VllmConfig") -> bool:
|
def enable_allreduce_rms_fusion(cfg: "VllmConfig") -> bool:
|
||||||
"""Enable if TP > 1, PP == 1, Hopper/Blackwell, and flashinfer installed.
|
"""Enable if TP > 1 and Hopper/Blackwell and flashinfer installed."""
|
||||||
|
|
||||||
Gated off for PP > 1: the fused op's GPU-side peer-signal spin-wait
|
|
||||||
assumes byte-identical kernel launches across TP peers, but concurrent
|
|
||||||
independent warmup of multiple TP subgroups lets ranks pick divergent
|
|
||||||
FlashInfer launch configs and deadlock.
|
|
||||||
"""
|
|
||||||
from vllm.platforms import current_platform
|
from vllm.platforms import current_platform
|
||||||
from vllm.utils.flashinfer import has_flashinfer
|
from vllm.utils.flashinfer import has_flashinfer
|
||||||
|
|
||||||
@@ -148,7 +142,6 @@ def enable_allreduce_rms_fusion(cfg: "VllmConfig") -> bool:
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
cfg.parallel_config.tensor_parallel_size > 1
|
cfg.parallel_config.tensor_parallel_size > 1
|
||||||
and cfg.parallel_config.pipeline_parallel_size == 1
|
|
||||||
and current_platform.is_cuda()
|
and current_platform.is_cuda()
|
||||||
and has_flashinfer()
|
and has_flashinfer()
|
||||||
and (
|
and (
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ def _create_workspace(
|
|||||||
hidden_dim=hidden_dim,
|
hidden_dim=hidden_dim,
|
||||||
dtype=dtype,
|
dtype=dtype,
|
||||||
comm_backend=comm_backend,
|
comm_backend=comm_backend,
|
||||||
|
group=group,
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if "multicast" in str(e).lower():
|
if "multicast" in str(e).lower():
|
||||||
|
|||||||
Reference in New Issue
Block a user