According to the official docs, now PyTorch supports AMD GPUs. ROCm 4.2 can be installed through pip. But I can not find in Google nor the offical docs how to force my DL training to use the gpu. What is the AMD equivalent to the following command?
torch.device('cuda' if torch.cuda.is_available() else 'cpu')