If you have a system with ROCm installed, support for compiling PyTorch on AMD has already been upstreamed. The PyTorch source code ships with a script for building a version using HIP (basically the script converts PyTorch's CUDA code to HIP and adjusts some build settings). So, if you're running a system with ROCm installed and are willing to compile PyTorch from source you can run PyTorch on AMD (admittedly that's several caveats and you're also limited to Linux in order to use ROCm).