AMD may get across the CUDA moat
I was able to use ROCm recently with Pytorch and after pulling some hair it worked quite well. The Radeon GPU I had on hand was a bit old and underpowered (RDNA2) and it only supported matmul on fp64, but for the job I needed done I saw a 200x increase in it&#x2F;s over CPU despite the need to cast everywhere, and that made me super happy.<p>Best of all is that I simply set the device to `torch.device(&#x27;cuda&#x27;)` rather than openCL, which does wonders for compatibility and to keep code simple.<p>Protip: Use the official ROCM Pytorch base docker image [0]. The AMD setup is so finicky and dependent on specific versions of sdk&#x2F;drivers&#x2F;libraries and it will be much harder to make work if you try to install them separately.<p>[0]: <a href="https:&#x2F;&#x2F;rocm.docs.amd.com&#x2F;en&#x2F;latest&#x2F;how_to&#x2F;pytorch_install&#x2F;pytorch_install.html" rel="nofollow noreferrer">https:&#x2F;&#x2F;rocm.docs.amd.com&#x2F;en&#x2F;latest&#x2F;how_to&#x2F;pytorch_install&#x2F;p...</a>