Profile collective dispatch across tensor sizes

This commit is contained in:
2026-07-16 21:57:44 +08:00
parent 4bf9bdf28f
commit 3121e35b0e
3 changed files with 42 additions and 5 deletions

View File

@@ -113,10 +113,7 @@ def main() -> None:
f"FlashInfer all-reduce was not selected at TP={world_size}, "
f"tokens={num_tokens}"
)
if not fi_comm.should_use_fi_ar(input_tensor):
raise SystemExit(
f"FlashInfer rejected serving tensor shape {tuple(input_tensor.shape)}"
)
uses_flashinfer = fi_comm.should_use_fi_ar(input_tensor)
samples: list[float] = []
for _ in range(args.repeats):
@@ -142,7 +139,9 @@ def main() -> None:
* torch.tensor([], dtype=torch.bfloat16).element_size(),
"dtype": "bfloat16",
"communicator": "vllm.tensor_model_parallel_all_reduce",
"selected_backend": "flashinfer_trtllm",
"selected_backend": (
"flashinfer_trtllm" if uses_flashinfer else "nccl_fallback"
),
"per_rank_time_ms": per_rank,
"critical_path_median_ms": max(
rank_stats["median"] for rank_stats in per_rank