@@ -97,17 +97,17 @@ ur_result_t enqueueMemSetShadow(ur_context_handle_t Context,
97
97
}
98
98
}
99
99
100
- // context.logger.debug("urVirtualMemMap: {} ~ {}",
101
- // (void *)MappedPtr,
102
- // (void *)(MappedPtr + PageSize - 1));
100
+ context.logger .debug (" urVirtualMemMap: {} ~ {}" ,
101
+ (void *)MappedPtr,
102
+ (void *)(MappedPtr + PageSize - 1 ));
103
103
104
104
// FIXME: No flag to check the failed reason is VA is already mapped
105
105
auto URes = context.urDdiTable .VirtualMem .pfnMap (
106
106
Context, (void *)MappedPtr, PageSize, PhysicalMem, 0 ,
107
107
UR_VIRTUAL_MEM_ACCESS_FLAG_READ_WRITE);
108
- // if (URes != UR_RESULT_SUCCESS) {
109
- // context.logger.debug("urVirtualMemMap(): {}", URes);
110
- // }
108
+ if (URes != UR_RESULT_SUCCESS) {
109
+ context.logger .debug (" urVirtualMemMap(): {}" , URes);
110
+ }
111
111
112
112
// Initialize to zero
113
113
if (URes == UR_RESULT_SUCCESS) {
@@ -173,7 +173,7 @@ SanitizerInterceptor::SanitizerInterceptor() {
173
173
KV = Options->find (" detect_locals" );
174
174
if (KV != Options->end ()) {
175
175
auto Value = KV->second .front ();
176
- cl_DetectLocals = Value == " 1" || Value == " true" ? 1 : 0 ;
176
+ cl_DetectLocals = Value == " 1" || Value == " true" ? true : false ;
177
177
}
178
178
}
179
179
@@ -576,7 +576,7 @@ SanitizerInterceptor::insertContext(ur_context_handle_t Context,
576
576
577
577
CI = std::make_shared<ContextInfo>(Context);
578
578
579
- m_ContextMap.emplace (Context, CI );
579
+ m_ContextMap.emplace (Context, std::move (CI) );
580
580
581
581
return UR_RESULT_SUCCESS;
582
582
}
@@ -612,7 +612,7 @@ SanitizerInterceptor::insertDevice(ur_device_handle_t Device,
612
612
Device, UR_DEVICE_INFO_MEM_BASE_ADDR_ALIGN, sizeof (DI->Alignment ),
613
613
&DI->Alignment , nullptr ));
614
614
615
- m_DeviceMap.emplace (Device, DI );
615
+ m_DeviceMap.emplace (Device, std::move (DI) );
616
616
617
617
return UR_RESULT_SUCCESS;
618
618
}
0 commit comments