Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
[bugfix][distributed] improve p2p capability test (vllm-project#5612)
Browse files Browse the repository at this point in the history
[bugfix][distributed] do not error if two processes do not agree on p2p capability (vllm-project#5612)
  • Loading branch information
youkaichao authored and robertgshaw2-neuralmagic committed Jun 23, 2024
1 parent 5abb0c8 commit f355997
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions vllm/distributed/device_communicators/custom_all_reduce_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def consumer(batch_tgt: Sequence[int],
if open_success:
# modify the memory
lib.cudaMemset(pointer, 2, 1024)
lib.cudaDeviceSynchronize()
# use two queues to simulate barrier
producer_queue.get()
consumer_queue.put(0)
Expand Down Expand Up @@ -142,8 +143,13 @@ def can_actually_p2p(
for src, tgt in zip(batch_src, batch_tgt):
a = result_queue.get()
b = result_queue.get()
assert a == b
result.append(a)
if a != b:
logger.warning(
"Two processes do not agree on the P2P access"
" status on %d -> %d, treat as disabled.", src, tgt)
result.append(False)
else:
result.append(a)
return result


Expand Down

0 comments on commit f355997

Please sign in to comment.