I am simply trying to run a simple code in PyTorch and I have tried installing/uninstalling the right package multiple times.
System: Ubuntu 22.04 | GPU: Radeon 5450 | Environment: Anaconda-2023.09 | Python: 3.11.5
a = torch.randn((100, 100))
a = a.to(device)
Traceback (most recent call last):
File “/u/hys4qm/rocm-stress-test/script.py”, line 43, in
a = a.to(device)
^^^^^^^^^^^^
File “/u/hys4qm/.local/lib/python3.11/site-packages/torch/cuda/init.py”, line 319, in _lazy_init
torch._C._cuda_init()
RuntimeError: No HIP GPUs are available
What could be the issue? The drivers are installed correctly, I install pytorch with rocm using pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm6.2/
.