Skip to content

vllm.distributed.device_communicators.quick_all_reduce

Classes:

QuickAllReduce

Methods:

__init__(group, device)

Custom allreduce provides non-destructive acceleration and is available for CUDA and ROCm MI300 series.

Custom quick allreduce leverages quantization for further acceleration on ROCm. It currently supports Q8, Q6, Q4, and Q3 quantization formats and FP(float16, bfloat16). Q3 (INT3) is restricted to TP2 (world_size == 2) due to poor performance on larger world sizes.

Quick allreduce is designed as a complement to custom allreduce. Its initialization requires even stricter conditions.

Only the ROCm MI300 series is supported for quick allreduce at this time.

Parameters:

  • group

    (ProcessGroup) –

    the process group to work on. If None, it will use the default process group.

  • device

    (int | str | device) –

    the device to bind the CustomAllreduce to. If None, it will be bound to f"cuda:{local_rank}".

It is the caller's responsibility to make sure each communicator is bind to a unique device, and all communicators in this group are in the same node.

create_shared_buffer()

Creates a shared buffer for quickreduce. Has to be called after init_custom_qr

quick_all_reduce(inp, *, out=None)

Performs an out-of-place custom quick all reduce.

should_quick_allreduce(inp)

Check if quickreduce is available.

uses_flydsl_int4(inp)

Whether all_reduce runs inp through FlyDSL QuickReduce.