How to use PyTorch with AMD VEGA GPU

I have serious problems on this issue. I know, natively, it isn’t supporting yet. However I am observing some “movements” on the AMD side with the new ROCm platform. They have a fork of PyTorch on their github. I wonder if anyone tried to install that port? I would be grateful if someone guide me through the installation and getting it to work.


Pretty interested too

I’d also like to know how to do this.

I think the first step is to install Ubuntu 18.04. Then you can install this stuff.

And then IDK. GitHub says something.

Once [ROCm is] installed, then run the cuda->hip transpiler & build PyTorch.

  • python tools/amd_build/
  • USE_ROCM=1 python install

I’m guessing the two python commands build PyTorch, but not really sure what is meant by “run the cuda” transpiler. Don’t know where it is or how to run it.

Oh, also, I think python means python3. I tried with the python installed on 18.04 and the first Python command failed.

This other thread might also be useful.