[misc][distributed] add VLLM_SKIP_P2P_CHECK flag (#8911)

This commit is contained in:
youkaichao
2024-09-27 14:27:56 -07:00
committed by GitHub
parent c2ec430ab5
commit 18e60d7d13
2 changed files with 12 additions and 0 deletions
@@ -28,6 +28,10 @@ def _can_p2p(rank: int, world_size: int) -> bool:
for i in range(world_size):
if i == rank:
continue
if envs.VLLM_SKIP_P2P_CHECK:
logger.info(
"Skipping P2P check and trusting the driver's P2P report.")
return torch.cuda.can_device_access_peer(rank, i)
if not gpu_p2p_access_check(rank, i):
return False
return True