[rocm][ray] Fix: Unify Ray device visibility handling across CUDA and ROCm (#33308)

Signed-off-by: Kourosh Hakhamaneshi <kourosh@anyscale.com>
This commit is contained in:
kourosh hakhamaneshi
2026-02-04 10:09:14 -08:00
committed by GitHub
parent 192ad4648b
commit 2f6d17cb2f
8 changed files with 43 additions and 8 deletions

View File

@@ -209,6 +209,7 @@ class Worker(WorkerBase):
f"be less than or equal to the number of visible devices "
f"({visible_device_count})."
)
self.device = torch.device(f"cuda:{self.local_rank}")
current_platform.set_device(self.device)