Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions flashinfer/comm/allreduce.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ def allreduce_fusion(
workspace: AllReduceFusionWorkspace,
pattern: int,
launch_with_pdl: bool = False,
trigger_completion_at_end: bool = True,
# ===== OUTPUT tensors (pre-allocated, will be filled) =====
output: Optional[torch.Tensor] = None,
residual_out: Optional[torch.Tensor] = None,
Expand Down Expand Up @@ -494,7 +495,12 @@ def allreduce_fusion(
- kARResidualRMSNormOutFP8Quant = 4
- kARResidualRMSNormOutFP4Quant = 5
Note: MNNVL only supports patterns 0 and 1
launch_with_pdl: Use Persistent Dependency Launch
launch_with_pdl: Use Programmatic Dependent Launch
trigger_completion_at_end: [trtllm only] Controls when PDL completion is signaled.
True (default): signal completion after the kernel finishes (safe, no overlap).
False: signal completion early, allowing the next PDL-aware kernel
to overlap with this one. Only safe when the subsequent kernel also
uses cudaGridDependencySynchronize(). Ignored by MNNVL backend.

# ===== OUTPUT tensors (pre-allocated, filled by function) =====
output: AllReduce output [token_num, hidden_dim]
Expand Down Expand Up @@ -611,7 +617,7 @@ def _flatten_checked(t, name):
hidden_dim=hidden_dim,
workspace_ptrs=workspace.workspace_tensor,
launch_with_pdl=launch_with_pdl,
trigger_completion_at_end=launch_with_pdl, # Same meaning
trigger_completion_at_end=trigger_completion_at_end,
fp32_acc=fp32_acc,
pattern_code=pattern, # type: ignore[arg-type]
use_oneshot=use_oneshot,
Expand Down
Loading