I am trying to use cuda-dbg under wsl2, my driver version is 536.40 and cuda version is 12.2, V12.2.91. GPU card is RTX 3060.
when I use cuda-gdb to debug my program, It reports “Error: Failed to read the ELF image (dev=0, handle=93825003156928, relocated=1), error=CUDBG_ERROR_INVALID_ARGS(0x4), error message=.” after excuting the first cuda function,and also after starting new threads.
Log as follows:
1491 CUDA_SAFE_CALL(cudaMalloc((void**)&pmid_data, sizeof(uint32_t) * n_particle * DIM));
[New Thread 0x7fffccebb000 (LWP 3132)]
[Detaching after fork from child process 3133]
[New Thread 0x7fffc1fff000 (LWP 3139)]
Error: Failed to read the ELF image (dev=0, handle=93825003156928, relocated=1), error=CUDBG_ERROR_INVALID_ARGS(0x4), error message=.