ROCgdb
ROCgdb copied to clipboard
Which version of LLVm is required by ROCgdb to support "DWARF Extensions for Optimized SIMT/SIMD (GPU) Debugging"
Which version of LLVm is required by ROCgdb to support "DWARF Extensions for Optimized SIMT/SIMD (GPU) Debugging"?
According to the release notes ROCM 5.1 supposedly enabled this, but I can't make it work.
I did the following steps:
- Installed rocm-hip-runtime-dev and rocm-gdb 5.1.1 on ubuntu 20.04 (docker image)
- Compiled a simple program with the following command
/opt/rocm/llvm/bin/clang++ -L /opt/rocm/lib -lhipamd64 -g -O0 -x hip main.cpp
- Run with rocgdb
LD_LIBRARY_PATH=/opt/rocm/lib rocgdb ./a.out
- Try to add a breakpoint to the device code:
break hello
or breakmain.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!