You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
OpenCL: clSetEventCallback errors abort instead of returning a HIP error #2008
On the OpenCL backend a failing clSetEventCallback in CHIPQueueOpenCL::launchImpl aborts the process instead of returning a HIP error, because clSetEventCallback has no entry in the error conversion table in src/backend/OpenCL/clHipErrorConversion.hh, so hip_convert_error hits the unmapped path and calls std::abort():
Error: Unmapped API or API Error Code encountered at CHIPBackendOpenCL.cc:1879
API call: clSetEventCallback
Error code: CL_OUT_OF_RESOURCES
The OpenCL API spec (api/opencl_runtime_layer.asciidoc, clSetEventCallback errors) allows this error:
{CL_OUT_OF_RESOURCES} if there is a failure to allocate resources required by the OpenCL implementation on the device.
This is the same class as #1604 (clFlush was missing from the table). The fix is to add clSetEventCallback to the table so the error is mapped and returned.
Seen with zeroRK (CHIP-SPV/zero-rk hip-chipStar at a0783ad1) on an Intel Arc A770 under CHIP_BE=opencl, in the CVODE, Seulex and Radau constant volume GPU cases added in #1945. The same cases pass on Level Zero. The failure is intermittent; other runs instead segfault at address 0x8 inside libigdrcl.so under launchImpl. Why the driver runs out of resources, and whether the segfault has the same cause, is not established: NEO returns this error from clSetEventCallback when flushing earlier queued work fails, so the last launched kernel (sundials::nvector_hip::linearSumKernel) is not necessarily the culprit. Possibly related: #1384 (cross queue markers leak a cl_event) and #1438 (same error from other calls). No upstream compute-runtime report has been filed.
Activity
OpenCL: free callback data when clSetEventCallback fails
tests: fail TestFix2008 if the injected error is swallowed
tests: link the TestFix2008 interposer into the test executable
tests: clear the TestFix2008 injection marker first
tests: skip TestFix2008 by exit code, not output
tests: drop forwarding from the TestFix2008 interposer
OpenCL: map clSetEventCallback errors
OpenCL: free callback data when clSetEventCallback fails
tests: fail TestFix2008 if the injected error is swallowed
tests: link the TestFix2008 interposer into the test executable
tests: clear the TestFix2008 injection marker first
tests: skip TestFix2008 by exit code, not output
tests: drop forwarding from the TestFix2008 interposer