# first test if it works without hip # hide all hip devices HIP_VISIBLE_DEVICES= python debug_pytorch_rocm.py # some programs don't work with multi gpu setups, to hide all other than first card HIP_VISIBLE_DEVICES=0 python debug_pytorch_rocm.py # find out the architecture of your card amdgpu-arch # architecture of my card, 6600 M (same for XT) is gfx1032 #export PYTORCH_ROCM_ARCH="gfx1032" #export HSA_OVERRIDE_GFX_VERSION=10.3.2 # pytorch was only compiled for certain supported archs though # https://rocm.docs.amd.com/projects/install-on-linux/en/latest/how-to/3rd-party/pytorch-install.html # so we tell it to use a compatible supported architecture # PLEASE MAKE SURE TO CHOOSE A COMPATIBLE ARCH export PYTORCH_ROCM_ARCH="gfx1030" export HSA_OVERRIDE_GFX_VERSION=10.3.0 # NOT NEEDED set compiler target, HSA_OVERRIDE_GFX_VERSION should set that too # export HCC_AMDGPU_TARGET=gfx1030 python debug_pytorch_rocm.py # this should work now :D # if not, increase log level from 1 to 3 AMD_LOG_LEVEL=3