Revert "[Misc] Remove use of CUDA_VISIBLE_DEVICES for device selectio… (#27502)

This commit is contained in:
Zhuohan Li
2025-10-24 22:31:43 -07:00
committed by GitHub
parent 29c9cb8007
commit 56ed7609a9
4 changed files with 7 additions and 35 deletions

View File

@@ -134,12 +134,9 @@ class CoreEngineProcManager:
data_parallel = vllm_config.parallel_config.data_parallel_size > 1
try:
for proc, local_dp_rank in zip(self.processes, local_dp_ranks):
# Adjust device control in DP for non-CUDA platforms
# For CUDA platforms, setting same device id for different DP
# processes affects NCCL init performance.
with (
set_device_control_env_var(vllm_config, local_dp_rank)
if (data_parallel and not current_platform.is_cuda_alike())
if (data_parallel)
else contextlib.nullcontext()
):
proc.start()