if you are using linux, install pytorch with rocm support
if you are on windows which I assume you are, you need to install torch_directml alongside pytorch and get your torch device from there and use it.
1 Like