Skip to content

Commit 34d1a9a

Browse files
committed
clean code
1 parent b54b988 commit 34d1a9a

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

source/loader/layers/sanitizer/asan_interceptor.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ constexpr int kMemBufferRedzoneMagic = (char)0x84;
2828
constexpr auto kSPIR_AsanShadowMemoryGlobalStart =
2929
"__AsanShadowMemoryGlobalStart";
3030
constexpr auto kSPIR_AsanShadowMemoryGlobalEnd = "__AsanShadowMemoryGlobalEnd";
31-
constexpr auto kSPIR_AsanShadowMemoryLocalStart = "__AsanShadowMemoryLocalStart";
31+
constexpr auto kSPIR_AsanShadowMemoryLocalStart =
32+
"__AsanShadowMemoryLocalStart";
3233
constexpr auto kSPIR_AsanShadowMemoryLocalEnd = "__AsanShadowMemoryLocalEnd";
3334

3435
constexpr auto kSPIR_DeviceType = "__DeviceType";
@@ -262,7 +263,7 @@ void SanitizerInterceptor::postLaunchKernel(ur_kernel_handle_t Kernel,
262263

263264
// If kernel has defined SPIR_DeviceSanitizerReportMem, then we try to read it
264265
// to host, but it's okay that it isn't defined
265-
// FIXME: We must use block operation here
266+
// FIXME: We must use block operation here, until we support urEventSetCallback
266267
auto Result = context.urDdiTable.Enqueue.pfnDeviceGlobalVariableRead(
267268
Queue, Program, kSPIR_DeviceSanitizerReportMem, true,
268269
sizeof(LaunchInfo.SPIR_DeviceSanitizerReportMem), 0,
@@ -319,7 +320,8 @@ ur_result_t SanitizerInterceptor::allocShadowMemory(
319320
/// ? : 0x1000_0000_0000 ~ 0x1fff_ffff_ffff
320321
/// Device USM : 0x2000_0000_0000 ~ 0x3fff_ffff_ffff
321322
constexpr size_t SHADOW_SIZE = 1ULL << 46;
322-
// FIXME: Currently, level-zero doesn't create independent VAs for each contexts
323+
// FIXME: Currently, Level-Zero doesn't create independent VAs for each contexts,
324+
// which will cause out-of-resource error when users use multiple contexts
323325
static uptr ShadowOffset, ShadowOffsetEnd;
324326

325327
if (!ShadowOffset) {

source/loader/ur_ldrddi.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8988,4 +8988,4 @@ UR_DLLEXPORT ur_result_t UR_APICALL urGetDeviceProcAddrTable(
89888988

89898989
#if defined(__cplusplus)
89908990
}
8991-
#endif
8991+
#endif

0 commit comments

Comments
 (0)