How to make pytorch recognize AMD GPU

I am using an AMD R9 390.
I Installed pytorch given the instructions from the following suggestions:

However in python torch.cuda.is_availible() returns false. As I understood, this ROCm version is meant to use the amd gpu as cuda.

If there are additional steps I need to take to utilize the GPU, please let me know. Thank you.

It’s not the most intuitive but .device("cuda") on a AMD GPU actually translates to ROCM to keep semantics for old code. https://github.com/pytorch/pytorch/issues/10670#issuecomment-726420223