Skip to content

vllm.distributed.device_communicators.flashinfer_all_reduce

Classes:

Functions:

FlashInferAllReduce

_ensure_workspace(hidden_dim, dtype)

Ensure the all reduce workspace is initialized.

_create_workspace(backend, world_size, rank, max_token_num, hidden_dim, dtype, group)

Create a flashinfer allreduce workspace, returning None on failure.

_mnnvl_group_supported(world_size, comm_backend, group)

Collectively check cross-node fabric support before allocating a workspace.

_resolve_fi_ar_backend(group)

Resolve the flashinfer allreduce backend for the current setup.

Returns:

  • str | None –

    A (backend, allow_trtllm_fallback) tuple. backend is None

  • bool –

    when automatic selection has no supported backend for the process

  • tuple[str | None, bool] –

    group.

get_fi_ar_quant_workspace(world_size, rank, max_token_num, hidden_dim, dtype, group)

Return the allreduce workspace for quant patterns, initializing if needed.

Backend is controlled by VLLM_FLASHINFER_ALLREDUCE_BACKEND env var, matching non-quant fusion. With auto this prefers mnnvl and falls back to trtllm only on single-node topologies where mnnvl multicast is unavailable.

get_fi_ar_workspace(world_size, rank, max_token_num, hidden_dim, dtype, group)

Return the allreduce workspace for non-quant patterns, initializing if needed.

Used by AllReduceFusionPass (non-quant patterns) and FlashInferAllReduce for standalone allreduce. Backend is controlled by VLLM_FLASHINFER_ALLREDUCE_BACKEND env var.