Open Chunming-Zhou opened 2 years ago
According to the release notes ROCM 5.1 supposedly enabled this, but I can't make it work.
I did the following steps:
/opt/rocm/llvm/bin/clang++ -L /opt/rocm/lib -lhipamd64 -g -O0 -x hip main.cpp
LD_LIBRARY_PATH=/opt/rocm/lib rocgdb ./a.out
break hello
or break main.cpp:5
Expected: gdb adds the breakpoint, breaks when it is hit on the device. The values of variables etc can be inspected.
Actual result: gdb fails to add the breakpoint with this message: No compiled code for line 5 in file "main.cpp".
#include <hip/hip_runtime.h>
__global__
void hello(int a) {
printf("Hello World: %d\n", a);
}
int main() {
hipLaunchKernelGGL(hello, dim3(1), dim3(1), 0, 0, 10);
hipDeviceSynchronize();
}
Note with previous versions (pre 5.1) adding the breakpoint worked, but no values where displayed in device code.
Can you help me what is needed to make this work?
@Chunming-Zhou @Maetveis Apologies for the lack of response. Do you still need assistance with this issue? Thanks!
Which version of LLVm is required by ROCgdb to support "DWARF Extensions for Optimized SIMT/SIMD (GPU) Debugging"?