Skip to content

Commit 53127fa

Browse files
authored
Merge pull request #2508 from AllanZyne/review/yang/fix_msan_empty_kernel
[DeviceMSAN] Fix empty kernel
2 parents 490a011 + d6a99d0 commit 53127fa

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

source/loader/layers/sanitizer/msan/msan_interceptor.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,13 @@ ur_result_t MsanInterceptor::prepareLaunch(
401401
(void *)LaunchInfo.Data, LaunchInfo.Data->GlobalShadowOffset,
402402
ToString(LaunchInfo.Data->DeviceTy), LaunchInfo.Data->Debug);
403403

404-
UR_CALL(
405-
EnqueueWriteGlobal("__MsanLaunchInfo", &LaunchInfo.Data, sizeof(uptr)));
404+
ur_result_t URes =
405+
EnqueueWriteGlobal("__MsanLaunchInfo", &LaunchInfo.Data, sizeof(uptr));
406+
if (URes != UR_RESULT_SUCCESS) {
407+
getContext()->logger.info("EnqueueWriteGlobal(__MsanLaunchInfo) "
408+
"failed, maybe empty kernel: {}",
409+
URes);
410+
}
406411

407412
return UR_RESULT_SUCCESS;
408413
}

0 commit comments

Comments
 (0)