ambiguously fails to build due to error: call to 'hipGetStreamDeviceId' is ambiguous
Closed this issue · 1 comments
waheedi commented
given this make stdout:
[ 66%] Building CXX object src/CMakeFiles/roctracer.dir/roctracer/roctracer.cpp.o
In file included from /home/bargo/projects/rocm-setup/roctracer/src/roctracer/roctracer.cpp:45:
/home/bargo/projects/rocm-setup/roctracer/src/roctracer/loader.h:110:60: error: call to 'hipGetStreamDeviceId' is ambiguous
110 | int GetStreamDeviceId(hipStream_t stream) const { return hipGetStreamDeviceId(stream); }
| ^~~~~~~~~~~~~~~~~~~~
/opt/rocm/include/hip/hip_runtime_api.h:6823:5: note: candidate function
6823 | int hipGetStreamDeviceId(hipStream_t stream);
| ^
/home/bargo/projects/rocm-setup/roctracer/src/roctracer/loader.h:96:27: note: candidate function
96 | __attribute__((weak)) int hipGetStreamDeviceId(hipStream_t stream) { return 0; }
system:
HIP version: 6.3.24295-4c763e45a
==hipconfig
HIP_PATH :/opt/rocm6.2
ROCM_PATH :/opt/rocm
HIP_COMPILER :clang
HIP_PLATFORM :amd
HIP_RUNTIME :rocclr
CPP_CONFIG : -D__HIP_PLATFORM_HCC__= -D__HIP_PLATFORM_AMD__= -I/opt/rocm6.2/include -I/include
==hip-clang
HIP_CLANG_PATH :/opt/rocm/bin
clang version 19.0.0git (https://github.com/ROCm/llvm-project.git 6895d20c26d0756205bcd0a84b37a78b618cff0e)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/rocm6.2/bin
AOMP-18.0-12 (http://github.com/ROCm-Developer-Tools/aomp):
Source ID:18.0-12-ce1873ac686bb90ddec72bb99889a4e80e2de382
LLVM version 19.0.0git
Optimized build.
Default target: x86_64-unknown-linux-gnu
Host CPU: znver3
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 :
-O3
hip-clang-ldflags :
--driver-mode=g++ -O3 --hip-link
== Environment Variables
PATH =/opt/rocm/bin:/home/bargo/projects/rocm-setup/llvm-project/build/bin:/home/bargo/projects/rocm-setup/llvm-project/amd/device-libs/build:/home/bargo/projects/rocm-setup/llvm-project/amd/comgr/build:/home/bargo/projects/rocm-setup/llvm-project/amd/hipcc/build:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
HIP_CLANG_PATH=/opt/rocm/bin
LD_LIBRARY_PATH=/opt/rocm/lib:/opt/rocm/llvm/lib:
HIP_ROCCLR_HOME=/home/bargo/projects/rocm-setup/clr/
HIP_PLATFORM=amd
== Linux Kernel
Hostname :
beta
Linux beta 6.8.0-38-generic #38-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 7 15:25:01 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04 LTS
Release: 24.04
Codename: noble
the failure is indeed ambiguous for me, as I can see the correct candidate function, I had to fix it by a fixed namespaced reference. Is this something I can submit the fix for?
waheedi commented
this might be due to my environment, nothing to worry about, I will close it