PyTorch with GPU-acceleration on Framework 13 AMD Ryzen 5 7640U $ wget https://repo.radeon.com/rocm/rocm.gpg.key -O - | gpg --dearmor | sudo tee /etc/apt/keyrings/rocm.gpg > /dev/null $ echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/6.1 jammy main" | sudo tee --append /etc/apt/sources.list.d/rocm.list $ echo -e 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' | sudo tee /etc/apt/preferences.d/rocm-pin-600 $ sudo apt update $ sudo apt install rocm $ sudo usermod -a -G render $USER $ rocminfo $ pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm5.4.2 $ export HSA_OVERRIDE_GFX_VERSION=11.0.0 import torch print("Is ROCm (HIP) available:", torch.cuda.is_available())