ROCm / HIP

HIP: C++ Heterogeneous-Compute Interface for Portability
https://rocmdocs.amd.com/projects/HIP/
MIT License
3.73k stars 529 forks source link

install rocm by apt-get #2420

Closed MOLOjl closed 2 years ago

MOLOjl commented 2 years ago

hello, I'm having trouble installing rocm on my computer my system is ubuntu20.04, I try to install rocm-v4.3 following this guidance but things go not well when I finished, it seems like something is missing here are some check command outputs:

:~$ hipcc --version
sh: /opt/rocm/llvm/bin/clang: No such file or directory
Use of uninitialized value $HIP_CLANG_VERSION in concatenation (.) or string at /usr/bin/hipcc line 161.
Can't exec "/opt/rocm/bin/rocm_agent_enumerator": No such file or directory at /usr/bin/hipcc line 592.
Use of uninitialized value $targetsStr in substitution (s///) at /usr/bin/hipcc line 593.
Use of uninitialized value $targetsStr in split at /usr/bin/hipcc line 599.
Use of uninitialized value $HIP_CLANG_VERSION in concatenation (.) or string at /usr/bin/hipcc line 701.
HIP version: 4.3.21300-5bbc51d8
sh: /opt/rocm/llvm/bin/clang: No such file or directory

:~$ /opt/rocm/opencl/bin/clinfo
ERROR: clGetPlatformIDs(-1001)

:~$ /opt/rocm/bin/rocminfo
-bash: /opt/rocm/bin/rocminfo: No such file or directory

:~$ sudo apt install rocm-dkms
Reading package lists... Done
Building dependency tree       
Reading state information... Done
rocm-dkms is already the newest version (4.3.0.40300-52).
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

by the way, I notice a lot of things are missing in the /opt/rocm folder, like hsa please help me.

MOLOjl commented 2 years ago

I notice some important library is missing, like libamdhip64.so, libhsa_runtime.so, etc.

MOLOjl commented 2 years ago
  1. the reason for the underneath error is because I haven't installed HIP-clang and ROCm Device-Libs, which must be built manually. guidance can be found here, by the way, this guide seems not working well, there are some changes that need to be done.
    sh: /opt/rocm/llvm/bin/clang: No such file or directory
  2. the reason for the other error is because rocminfo is not installed correctly, I tried build it manually, and solved this warning.
    Can't exec "/opt/rocm/bin/rocm_agent_enumerator": No such file or directory at /usr/bin/hipcc line 592.

    I found a very helpful instruction of installing rocm on ubuntu system, here by the way, the installation guide in the rocm doc is not friendly (T _ T).