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.

  
      
      GitHub
  
  
    

RadeonOpenCompute/ROCm 134

ROCm -  Open Source Platform for HPC and Ultrascale GPU Computing  - RadeonOpenCompute/ROCm


  
  
    
    
  
  


And then IDK. GitHub says something.

  
      github.com/pytorch/pytorch
  
  
    



Issue: AMD GPU support in PyTorch 121


	
	opened by hpigula
	on 2018-08-18
	
	
	


PyTorch version: 0.4.1.post2
Is debug build: No
CUDA used to build PyTorch: None
OS: Arch Linux
GCC version: (GCC) 8.2.0
CMake version: version 3.11.4
Python version: 3.7
Is...




  
  
    
    
  
  



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

python tools/amd_build/build_pytorch_amd.py
USE_ROCM=1 python setup.py 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.