OS: Ubuntu 20.04
$ rocm-smi
======================= ROCm System Management Interface =======================
================================= Concise Info =================================
GPU Temp AvgPwr SCLK MCLK Fan Perf PwrCap VRAM% GPU%
0 46.0c 8.0W 800Mhz 100Mhz 0% auto 180.0W 2% 0%
================================================================================
============================= End of ROCm SMI Log ==============================
$ rocminfo | grep 'Name:'
Name: Intel(R) Core(TM) i3-10100 CPU @ 3.60GHz
Marketing Name: Intel(R) Core(TM) i3-10100 CPU @ 3.60GHz
Vendor Name: CPU
Name: gfx1010
Marketing Name: AMD Radeon RX 5700 XT
Vendor Name: AMD
Name: amdgcn-amd-amdhsa--gfx1010:xnack-
However, Pytorch is not able to detect GPU:
$ python3
Python 3.9.16 (main, Mar 8 2023, 14:00:05)
[GCC 11.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> print("GPU available:", torch.cuda.is_available())
GPU available: False
What’s going wrong here?