Closed Kelvin-Ng closed 2 weeks ago
@Kelvin-Ng Apologies for the lack of response. Do you still need assistance with this ticket? If not, please close the ticket. Thanks!
@Kelvin-Ng Closing ticket. Please feel free to re-open ticket if you still need assistance. Thanks!
I am trying to run OpenCL applications on the APU that comes with Ryzen 3400G (i.e., gfx902+xnack). Sometimes it will work and return me correct results, but sometimes it blocks forever. I traced it with gdb, and I find that the main thread is blocked at
clCreateCommandQueue()
waiting for events:It is waiting for updates from another thread, which is thread 2 in gdb. The trace of thread 2 is like this:
If I run with
HSA_ENABLE_INTERRUPT=0
, I get the following instead:Doing some
printf
tricks shows that the program is stuck at an infinite loop because it never receives the signal.Originally I thought it was a problem of ROCT and so I posted an issue here: https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface/issues/56. Following the suggestion, I run with
HSA_ENABLE_SDMA=0
but it does not change anything.I am quite sure that it is not directly related to OpenCL. I also tried to run HIP applications (compiled with an unofficial hipcc hacked by me) and a similar problem happens. The thread launching kernels gets blocked here:
Thread 2 in gdb shows the same trace as OpenCL.
When I run HIP applications, sometimes it can pass this part but get blocked at
hipDeviceSynchronize()
instead. Thread 2 shows the exact same trace. However, if the firsthipDeviceSynchronize()
can pass, otherhipDeviceSynchronize()
always pass.To conclude,
Any help in fixing the bug is appreciated. Thank you.