TL;DR;
pip install --index-url https://repo.amd.com/rocm/whl/gfx1151/ "rocm[libraries,devel]"
hipinfo
pip install --index-url https://repo.amd.com/rocm/whl/gfx1151/ torch torchvision torchaudio
python -c "import torch; print(torch.cuda.is_available())"
Be sure to uninstall torch and torchvision if you had CPU-only versions installed.If you have a different GPU/APU refer to the first link
minGPT: https://github.com/karpathy/minGPT