@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / cdeec2e606
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 12, 22:15 UTC

[BugFix] Ray with multiple nodes (#28873)

Signed-off-by: Julien Denize <julien.denize@mistral.ai>

Julien Denize committed Nov 19, 2025 at 22:20 UTC cdeec2e6067613c501f82463d54e420097f49750
1 file changed +8 -8
vllm/v1/worker/gpu_worker.py
+8 -8
@@ -205,14 +205,14 @@ class Worker(WorkerBase):
205 assert self.local_rank < torch.cuda.device_count(), (
206 f"DP adjusted local rank {self.local_rank} is out of bounds. "
207 )
208 - visible_device_count = (
209 - torch.cuda.device_count() if torch.cuda.is_available() else 0
210 - )
211 - assert self.parallel_config.local_world_size <= visible_device_count, (
212 - f"local_world_size ({self.parallel_config.local_world_size}) must be "
213 - f"less than or equal to the number of visible devices "
214 - f"({visible_device_count})."
215 - )
208 + visible_device_count = (
209 + torch.cuda.device_count() if torch.cuda.is_available() else 0
210 + )
211 + assert self.parallel_config.local_world_size <= visible_device_count, (
212 + f"local_world_size ({self.parallel_config.local_world_size}) must "
213 + f"be less than or equal to the number of visible devices "
214 + f"({visible_device_count})."
215 + )
216 self.device = torch.device(f"cuda:{self.local_rank}")
217 current_platform.set_device(self.device)
218