@@ -1749,10 +1749,26 @@ __urdlllocal ur_result_t UR_APICALL urEnqueueKernelLaunchWithArgsExp(
17491749
17501750 UR_CALL (getAsanInterceptor ()->preLaunchKernel (hKernel, hQueue, LaunchInfo));
17511751
1752- UR_CALL (getContext ()->urDdiTable .EnqueueExp .pfnKernelLaunchWithArgsExp (
1752+ /*
1753+ UR_CALL(getContext()->urDdiTable.EnqueueExp.pfnKernelLaunchWithArgsExp(
1754+ hQueue, hKernel, workDim, pGlobalWorkOffset, pGlobalWorkSize,
1755+ LaunchInfo.LocalWorkSize.data(), 0, nullptr, numPropsInLaunchPropList,
1756+ launchPropList, numEventsInWaitList, phEventWaitList, phEvent));
1757+ */
1758+
1759+ ur_result_t UrRes = getContext ()->urDdiTable .Enqueue .pfnKernelLaunch (
17531760 hQueue, hKernel, workDim, pGlobalWorkOffset, pGlobalWorkSize,
1754- LaunchInfo.LocalWorkSize .data (), 0 , nullptr , numPropsInLaunchPropList,
1755- launchPropList, numEventsInWaitList, phEventWaitList, phEvent));
1761+ LaunchInfo.LocalWorkSize .data (), numPropsInLaunchPropList, launchPropList,
1762+ numEventsInWaitList, phEventWaitList, phEvent);
1763+ if (UrRes != UR_RESULT_SUCCESS) {
1764+ if (UrRes == UR_RESULT_ERROR_OUT_OF_DEVICE_MEMORY) {
1765+ UR_LOG_L (
1766+ getContext ()->logger , ERR,
1767+ " urEnqueueKernelLaunch failed due to out of device memory, maybe "
1768+ " SLM is fully used." );
1769+ }
1770+ return UrRes;
1771+ }
17561772
17571773 UR_CALL (getAsanInterceptor ()->postLaunchKernel (hKernel, hQueue, LaunchInfo));
17581774
0 commit comments