Skip to content

Commit 288b494

Browse files
committed
enable aiter customer all reduce
1 parent 659880b commit 288b494

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

vllm/distributed/device_communicators/cuda_communicator.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,14 @@ def __init__(self,
2929
self.use_custom_allreduce = use_custom_allreduce
3030

3131
# lazy import to avoid documentation build error
32-
from vllm.distributed.device_communicators.custom_all_reduce import (
33-
CustomAllreduce)
32+
from vllm.platforms import current_platform
33+
34+
if current_platform.is_rocm():
35+
from aiter.dist.custom_all_reduce import CustomAllreduce
36+
else:
37+
from vllm.distributed.device_communicators.custom_all_reduce import (
38+
CustomAllreduce,
39+
)
3440
from vllm.distributed.device_communicators.pynccl import (
3541
PyNcclCommunicator)
3642

0 commit comments

Comments
 (0)