pytorch icon indicating copy to clipboard operation
pytorch copied to clipboard

torch.cuda.device() does not seem to have an effect

Open c0redumb opened this issue 10 months ago • 0 comments

🐛 Describe the bug

Using torch.cuda.device() to select the GPU, and it has no effect. GPU0 is always used, expecting GPU selected to be used. On the other hand, torch.cuda.set_device() works well. PyTorch documentation advice using torch.cuda.device() over set_device().

Versions

Found when using ROCm PyTorch 6.0.2 official docker container on node with MI-60 GPUs. Other systems not tested.

c0redumb avatar Apr 19 '24 16:04 c0redumb