Skip to content

Commit 916a77b

Browse files
author
ilmarkov
committed
Upd
Signed-off-by: ilmarkov <imarkov@redhat.com>
1 parent c9cc3a1 commit 916a77b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

vllm/distributed/device_communicators/symm_mem.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from torch.distributed import ProcessGroup
88

99
from vllm.logger import init_logger
10+
from vllm.platforms import current_platform
1011

1112
try:
1213
import torch.distributed._symmetric_memory as torch_symm_mem
@@ -34,6 +35,11 @@ def __init__(self, group: ProcessGroup, device: Union[int, str,
3435

3536
if not symm_mem_available:
3637
return
38+
39+
if not current_platform.is_cuda():
40+
logger.warning("SymmMemCommunicator: symmetric "
41+
"memory is not available.")
42+
return
3743
if isinstance(device, int):
3844
device = torch.device(f"cuda:{device}")
3945
elif isinstance(device, str):

0 commit comments

Comments
 (0)