Skip to content

[DevMSAN] Don't report error when write __MsanLaunchInfo failed #18129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -434,18 +434,6 @@ ur_result_t MsanInterceptor::prepareLaunch(
ur_kernel_handle_t Kernel, USMLaunchInfo &LaunchInfo) {
auto Program = GetProgram(Kernel);

auto EnqueueWriteGlobal = [&Queue, &Program](const char *Name,
const void *Value, size_t Size) {
auto Result = getContext()->urDdiTable.Enqueue.pfnDeviceGlobalVariableWrite(
Queue, Program, Name, false, Size, 0, Value, 0, nullptr, nullptr);
if (Result != UR_RESULT_SUCCESS) {
getContext()->logger.error("Failed to write device global \"{}\": {}",
Name, Result);
return Result;
}
return UR_RESULT_SUCCESS;
};

// Set membuffer arguments
auto &KernelInfo = getOrCreateKernelInfo(Kernel);
getContext()->logger.info("KernelInfo {} (Name=<{}>, IsInstrumented={}, "
Expand Down Expand Up @@ -578,8 +566,11 @@ ur_result_t MsanInterceptor::prepareLaunch(
(void *)LaunchInfo.Data.Host.LocalArgs, LaunchInfo.Data.Host.NumLocalArgs,
ToString(LaunchInfo.Data.Host.DeviceTy), LaunchInfo.Data.Host.Debug);

ur_result_t URes = EnqueueWriteGlobal(
"__MsanLaunchInfo", &LaunchInfo.Data.DevicePtr, sizeof(uptr));
ur_result_t URes =
getContext()->urDdiTable.Enqueue.pfnDeviceGlobalVariableWrite(
Queue, Program, "__MsanLaunchInfo", false,
sizeof(LaunchInfo.Data.DevicePtr), 0, &LaunchInfo.Data.DevicePtr, 0,
nullptr, nullptr);
if (URes != UR_RESULT_SUCCESS) {
getContext()->logger.info("EnqueueWriteGlobal(__MsanLaunchInfo) "
"failed, maybe empty kernel: {}",
Expand Down