Cant't find amdgpu.ids when running in venv

Hey everyone. I recently swapped to arch and I’ve been running into this issue where torch is not capable of finding the amdgpu.ids file.

I installed python via pyenv (tried both 3.11.11 and 3.12.8), created a venv and then installed torch in that virtual environment, this throws the warning “amdgpu.ids: No such file or directory” two times in a row, I assume one for the integrated GPU and another one for the dedicated one.

But if instead I install torch directly on the global pyenv install this warning goes away and everything works as expected.

Some information about the machine:

  • CPU: Ryzen 7 7700X
  • GPU: Radeon RX 7800 XT
  • ROCm version: 6.2

I can see that when installing on the venv, the amdgpu.ids file is still present at:
/home/josef/CodeThings/PytorchThingsEnv/.venv/lib/python3.11/site-packages/torch/share/libdrm/amdgpu.ids

And when installed on the global install, it’s located at:
/home/josef/.pyenv/versions/3.11.11/lib/python3.11/site-packages/torch/share/libdrm/amdgpu.ids

Updated to the issue: I tried now installing torch in the global instance and then also in the venv and noticed that this got rid of the warnings when running in the venv. Turns out that torch in the venv still looks for the amdgpu.ids file in the location of the global install (/home/josef/.pyenv/versions/3.11.11/lib/python3.11/site-packages/torch/share/libdrm/amdgpu.ids) instead that on the venv location (/home/josef/CodeThings/PytorchThingsEnv/.venv/lib/python3.11/site-packages/torch/share/libdrm/amdgpu.ids) and if I remove the file from the global location, the warnings come back.