Skip to content

Commit 7413519

Browse files
committed
Temporary workaround for urEnqueueKernelLaunchWithArgsExp() in sanitizers
1 parent 49e4eb2 commit 7413519

File tree

3 files changed

+34
-8
lines changed

3 files changed

+34
-8
lines changed

unified-runtime/source/loader/layers/sanitizer/asan/asan_ddi.cpp

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1774,10 +1774,19 @@ __urdlllocal ur_result_t UR_APICALL urEnqueueKernelLaunchWithArgsExp(
17741774

17751775
UR_CALL(getAsanInterceptor()->preLaunchKernel(hKernel, hQueue, LaunchInfo));
17761776

1777-
UR_CALL(getContext()->urDdiTable.EnqueueExp.pfnKernelLaunchWithArgsExp(
1777+
/*
1778+
// TODO: revert to the correct call to pfnKernelLaunchWithArgsExp():
1779+
UR_CALL(getContext()->urDdiTable.EnqueueExp.pfnKernelLaunchWithArgsExp(
1780+
hQueue, hKernel, workDim, pGlobalWorkOffset, pGlobalWorkSize,
1781+
LaunchInfo.LocalWorkSize.data(), numArgs, pArgs,
1782+
numPropsInLaunchPropList, launchPropList, numEventsInWaitList,
1783+
phEventWaitList, phEvent));
1784+
*/
1785+
1786+
UR_CALL(getContext()->urDdiTable.Enqueue.pfnKernelLaunch(
17781787
hQueue, hKernel, workDim, pGlobalWorkOffset, pGlobalWorkSize,
1779-
LaunchInfo.LocalWorkSize.data(), 0, nullptr, numPropsInLaunchPropList,
1780-
launchPropList, numEventsInWaitList, phEventWaitList, phEvent));
1788+
LaunchInfo.LocalWorkSize.data(), numPropsInLaunchPropList, launchPropList,
1789+
numEventsInWaitList, phEventWaitList, phEvent));
17811790

17821791
UR_CALL(getAsanInterceptor()->postLaunchKernel(hKernel, hQueue, LaunchInfo));
17831792

unified-runtime/source/loader/layers/sanitizer/msan/msan_ddi.cpp

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1938,10 +1938,19 @@ ur_result_t urEnqueueKernelLaunchWithArgsExp(
19381938

19391939
UR_CALL(getMsanInterceptor()->preLaunchKernel(hKernel, hQueue, LaunchInfo));
19401940

1941-
UR_CALL(getContext()->urDdiTable.EnqueueExp.pfnKernelLaunchWithArgsExp(
1941+
/*
1942+
// TODO: revert to the correct call to pfnKernelLaunchWithArgsExp():
1943+
UR_CALL(getContext()->urDdiTable.EnqueueExp.pfnKernelLaunchWithArgsExp(
1944+
hQueue, hKernel, workDim, pGlobalWorkOffset, pGlobalWorkSize,
1945+
LaunchInfo.LocalWorkSize.data(), numArgs, pArgs,
1946+
numPropsInLaunchPropList, launchPropList, numEventsInWaitList,
1947+
phEventWaitList, phEvent));
1948+
*/
1949+
1950+
UR_CALL(getContext()->urDdiTable.Enqueue.pfnKernelLaunch(
19421951
hQueue, hKernel, workDim, pGlobalWorkOffset, pGlobalWorkSize,
1943-
LaunchInfo.LocalWorkSize.data(), 0, nullptr, numPropsInLaunchPropList,
1944-
launchPropList, numEventsInWaitList, phEventWaitList, phEvent));
1952+
LaunchInfo.LocalWorkSize.data(), numPropsInLaunchPropList, launchPropList,
1953+
numEventsInWaitList, phEventWaitList, phEvent));
19451954

19461955
UR_CALL(getMsanInterceptor()->postLaunchKernel(hKernel, hQueue, LaunchInfo));
19471956

unified-runtime/source/loader/layers/sanitizer/tsan/tsan_ddi.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1460,9 +1460,17 @@ ur_result_t urEnqueueKernelLaunchWithArgsExp(
14601460

14611461
UR_CALL(getTsanInterceptor()->preLaunchKernel(hKernel, hQueue, LaunchInfo));
14621462

1463-
UR_CALL(getContext()->urDdiTable.EnqueueExp.pfnKernelLaunchWithArgsExp(
1463+
/*
1464+
// TODO: revert to the correct call to pfnKernelLaunchWithArgsExp():
1465+
UR_CALL(getContext()->urDdiTable.EnqueueExp.pfnKernelLaunchWithArgsExp(
1466+
hQueue, hKernel, workDim, pGlobalWorkOffset, pGlobalWorkSize,
1467+
pLocalWorkSize, numArgs, pArgs, numPropsInLaunchPropList,
1468+
launchPropList, numEventsInWaitList, phEventWaitList, phEvent));
1469+
*/
1470+
1471+
UR_CALL(getContext()->urDdiTable.Enqueue.pfnKernelLaunch(
14641472
hQueue, hKernel, workDim, pGlobalWorkOffset, pGlobalWorkSize,
1465-
pLocalWorkSize, 0, nullptr, numPropsInLaunchPropList, launchPropList,
1473+
pLocalWorkSize, numPropsInLaunchPropList, launchPropList,
14661474
numEventsInWaitList, phEventWaitList, phEvent));
14671475

14681476
UR_CALL(getTsanInterceptor()->postLaunchKernel(hKernel, hQueue, LaunchInfo));

0 commit comments

Comments
 (0)