AMD really dropped the ball on this. Nobody even thinks of them or Intel for training or experimenting
pip3 install --pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/rocm5.3
Kudos to Torch for achieving what Tensorflow did not want to do officially.
I've been working with oneAPI and OpenVINO and using the new extensions for pytorch and tensorflow on an Arc GPU lately, and it's kind of amazing how fast things are moving.
apt install rocm-smi rocm-cmake rocminfo rocm-device-libs
I don't work with ML & co, so YMMV.