简体   繁体   English

PyTorch ROCm 已出 - 如何将 select Radeon GPU 作为设备

[英]PyTorch ROCm is out - How to select Radeon GPU as device

since Pytorch released the ROCm version, which enables me to use other gpus than nvidias, how can I select my radeon gpu as device in python? since Pytorch released the ROCm version, which enables me to use other gpus than nvidias, how can I select my radeon gpu as device in python? Obviously, code like device = torch.cuda.is_available or device = torch.device("cuda") is not working.显然,像 device = torch.cuda.is_available 或 device = torch.device("cuda") 这样的代码不起作用。 Thanks for any help.谢谢你的帮助。 :) :)

This took me forever to figure out.这让我花了很长时间才弄清楚。 I'm still having some configuration issues with my AMD GPU, so I haven't been able to test that this works, but, according to this github pytorch thread, the Rocm integration is written so you can just call torch.device('cuda') and no actual porting is required!我的 AMD GPU 仍然存在一些配置问题,所以我无法测试它是否有效,但是,根据这个 github pytorch 线程,设备 Rocm 集成是编写的,所以你可以cuda') 并且不需要实际的移植!

See the thread here: https://github.com/pytorch/pytorch/issues/10670请参阅此处的线程: https://github.com/pytorch/pytorch/issues/10670

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM