mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-14 15:45:28 +08:00
[bugfix][distributed] improve p2p capability test (#5612)
[bugfix][distributed] do not error if two processes do not agree on p2p capability (#5612)
This commit is contained in:
parent
114d7270ff
commit
db5ec52ad7
@ -71,6 +71,7 @@ def consumer(batch_tgt: Sequence[int],
|
|||||||
if open_success:
|
if open_success:
|
||||||
# modify the memory
|
# modify the memory
|
||||||
lib.cudaMemset(pointer, 2, 1024)
|
lib.cudaMemset(pointer, 2, 1024)
|
||||||
|
lib.cudaDeviceSynchronize()
|
||||||
# use two queues to simulate barrier
|
# use two queues to simulate barrier
|
||||||
producer_queue.get()
|
producer_queue.get()
|
||||||
consumer_queue.put(0)
|
consumer_queue.put(0)
|
||||||
@ -142,8 +143,13 @@ def can_actually_p2p(
|
|||||||
for src, tgt in zip(batch_src, batch_tgt):
|
for src, tgt in zip(batch_src, batch_tgt):
|
||||||
a = result_queue.get()
|
a = result_queue.get()
|
||||||
b = result_queue.get()
|
b = result_queue.get()
|
||||||
assert a == b
|
if a != b:
|
||||||
result.append(a)
|
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
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user