AMD GitLab runner: unable to compile hip application
I am trying to compile a really simple hip
application in a docker container with hipcc
: https://gitlab.com/hzdr/crp/gitlab-ci-test/-/tree/selectAMDGPU/select-AMD-GPU
On our dev system fwk388 it works well and compiles fast (about 2s). In the CI the hipcc
call is aborted after 1h because of the job timeout: https://gitlab.com/hzdr/crp/gitlab-ci-test/-/jobs/779556011
I found out that it might have something to do with hipconfig
(/opt/rocm/bin/hipconfig
) because hipcc
calls it to get information about the GPU architecture. On our development system I get the following output:
root@2fa1adce0399:/# /opt/rocm/bin/hipconfig
HIP version : 3.8.20371-d1886b0b
== hipconfig
HIP_PATH : /opt/rocm-3.8.0/hip
ROCM_PATH : /opt/rocm
HIP_COMPILER : clang
HIP_PLATFORM : hcc
HIP_RUNTIME : ROCclr
CPP_CONFIG : -D__HIP_PLATFORM_HCC__= -I/opt/rocm-3.8.0/hip/include -I/opt/rocm/llvm/bin/../lib/clang/11.0.0 -I/opt/rocm/hsa/include -D__HIP_ROCclr__
== hip-clang
HSA_PATH : /opt/rocm/hsa
HIP_CLANG_PATH : /opt/rocm/llvm/bin
clang version 11.0.0 (/src/external/llvm-project/clang b98349b12ffa706d0e863a3f1176b20d2a6c438b)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/rocm/llvm/bin
LLVM (http://llvm.org/):
LLVM version 11.0.0git
Optimized build.
Default target: x86_64-unknown-linux-gnu
Host CPU: znver1
Registered Targets:
amdgcn - AMD GCN GPUs
r600 - AMD GPUs HD2XXX-HD6XXX
x86 - 32-bit X86: Pentium-Pro and above
x86-64 - 64-bit X86: EM64T and AMD64
hip-clang-cxxflags : -D__HIP_ROCclr__ -std=c++11 -isystem /opt/rocm-3.8.0/llvm/lib/clang/11.0.0/include/.. -isystem /opt/rocm/hsa/include -D__HIP_ROCclr__ -isystem /opt/rocm-3.8.0/hip/include -D__HIP_ARCH_GFX906__=1 -D__HIP_ARCH_GFX906__=1 -O3
hip-clang-ldflags : -L/opt/rocm-3.8.0/hip/lib -O3 -lgcc_s -lgcc -lpthread -lm
=== Environment Variables
PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
== Linux Kernel
Hostname : 2fa1adce0399
Linux 2fa1adce0399 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 10:58:49 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic
In the CI it aborts after hip-clang-cxxflag
without result: https://gitlab.com/hzdr/crp/gitlab-ci-test/-/jobs/779817845
$ /opt/rocm/bin/hipconfig
HIP version : 3.7.20315-077bcfa0
== hipconfig
HIP_PATH : /opt/rocm-3.7.0/hip
ROCM_PATH : /opt/rocm
HIP_COMPILER : clang
HIP_PLATFORM : hcc
HIP_RUNTIME : ROCclr
CPP_CONFIG : -D__HIP_PLATFORM_HCC__= -I/opt/rocm-3.7.0/hip/include -I/opt/rocm/llvm/bin/../lib/clang/11.0.0 -I/opt/rocm/hsa/include -D__HIP_ROCclr__
== hip-clang
HSA_PATH : /opt/rocm/hsa
HIP_CLANG_PATH : /opt/rocm/llvm/bin
clang version 11.0.0 (/src/external/llvm-project/clang ee4e4ebbadcc8ea14ce99e34ed31ab31e94827ac)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/rocm/llvm/bin
LLVM (http://llvm.org/):
LLVM version 11.0.0git
Optimized build.
Default target: x86_64-unknown-linux-gnu
Host CPU: znver1
Registered Targets:
amdgcn - AMD GCN GPUs
r600 - AMD GPUs HD2XXX-HD6XXX
x86 - 32-bit X86: Pentium-Pro and above
x86-64 - 64-bit X86: EM64T and AMD64
hip-clang-cxxflags :