Skip to content

Commit 70dc457

Browse files
committed
fix build
1 parent d2e4949 commit 70dc457

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

source/loader/layers/sanitizer/asan_interceptor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -601,8 +601,8 @@ SanitizerInterceptor::insertDevice(ur_device_handle_t Device,
601601
Device, UR_DEVICE_INFO_MEM_BASE_ADDR_ALIGN, sizeof(DI->Alignment),
602602
&DI->Alignment, nullptr));
603603

604-
context.logger.info("DeviceInfo {} (IsSupportSharedSystemUSM={})",
605-
(void *)Device, DI->IsSupportSharedSystemUSM);
604+
getContext()->logger.info("DeviceInfo {} (IsSupportSharedSystemUSM={})",
605+
(void *)Device, DI->IsSupportSharedSystemUSM);
606606

607607
// Don't move DI, since it's a return value as well
608608
m_DeviceMap.emplace(Device, DI);

source/loader/layers/sanitizer/asan_validator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ ValidateUSMResult ValidateUSMPointer(ur_context_handle_t Context,
3838
ur_device_handle_t Device, uptr Ptr) {
3939
assert(Ptr != 0 && "Don't validate nullptr here");
4040

41-
auto AllocInfoItOp = context.interceptor->findAllocInfoByAddress(Ptr);
41+
auto AllocInfoItOp = getContext()->interceptor->findAllocInfoByAddress(Ptr);
4242
if (!AllocInfoItOp) {
43-
auto DI = context.interceptor->getDeviceInfo(Device);
43+
auto DI = getContext()->interceptor->getDeviceInfo(Device);
4444
bool IsSupportSharedSystemUSM = DI->IsSupportSharedSystemUSM;
4545
if (IsSupportSharedSystemUSM) {
4646
// maybe it's host pointer

source/loader/layers/sanitizer/ur_sanddi.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,18 +1290,18 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetArgPointer(
12901290
pArgValue ///< [in][optional] Pointer obtained by USM allocation or virtual memory
12911291
///< mapping operation. If null then argument value is considered null.
12921292
) {
1293-
auto pfnSetArgPointer = context.urDdiTable.Kernel.pfnSetArgPointer;
1293+
auto pfnSetArgPointer = getContext()->urDdiTable.Kernel.pfnSetArgPointer;
12941294

12951295
if (nullptr == pfnSetArgPointer) {
12961296
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
12971297
}
12981298

1299-
context.logger.debug(
1299+
getContext()->logger.debug(
13001300
"==== urKernelSetArgPointer (argIndex={}, pArgValue={})", argIndex,
13011301
pArgValue);
13021302

13031303
{
1304-
auto KI = context.interceptor->getKernelInfo(hKernel);
1304+
auto KI = getContext()->interceptor->getKernelInfo(hKernel);
13051305
std::scoped_lock<ur_shared_mutex> Guard(KI->Mutex);
13061306
KI->PointerArgs[argIndex] = {pArgValue, GetCurrentBacktrace()};
13071307
}

source/loader/layers/sanitizer/ur_sanitizer_utils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ DeviceType GetDeviceType(ur_device_handle_t Device) {
136136

137137
ur_device_handle_t GetParentDevice(ur_device_handle_t Device) {
138138
ur_device_handle_t ParentDevice{};
139-
[[maybe_unused]] auto Result = context.urDdiTable.Device.pfnGetInfo(
139+
[[maybe_unused]] auto Result = getContext()->urDdiTable.Device.pfnGetInfo(
140140
Device, UR_DEVICE_INFO_PARENT_DEVICE, sizeof(ur_device_handle_t),
141141
&ParentDevice, nullptr);
142142
assert(Result == UR_RESULT_SUCCESS && "getParentDevice() failed");
@@ -146,7 +146,7 @@ ur_device_handle_t GetParentDevice(ur_device_handle_t Device) {
146146
bool GetDeviceUSMCapability(ur_device_handle_t Device,
147147
ur_device_info_t USMInfo) {
148148
ur_device_usm_access_capability_flags_t Flag;
149-
[[maybe_unused]] auto Result = context.urDdiTable.Device.pfnGetInfo(
149+
[[maybe_unused]] auto Result = getContext()->urDdiTable.Device.pfnGetInfo(
150150
Device, USMInfo, sizeof(Flag), &Flag, nullptr);
151151
return (bool)Flag;
152152
}

0 commit comments

Comments
 (0)