@@ -522,8 +522,8 @@ SanitizerInterceptor::registerDeviceGlobals(ur_context_handle_t Context,
522
522
for (auto Device : Devices) {
523
523
ManagedQueue Queue (Context, Device);
524
524
525
- [[maybe_unused]] size_t MetadataSize;
526
- [[maybe_unused]] void *MetadataPtr;
525
+ size_t MetadataSize;
526
+ void *MetadataPtr;
527
527
auto Result = context.urDdiTable .Program .pfnGetGlobalVariablePointer (
528
528
Device, Program, kSPIR_AsanDeviceGlobalMetadata , &MetadataSize,
529
529
&MetadataPtr);
@@ -535,10 +535,9 @@ SanitizerInterceptor::registerDeviceGlobals(ur_context_handle_t Context,
535
535
const uint64_t NumOfDeviceGlobal =
536
536
MetadataSize / sizeof (DeviceGlobalInfo);
537
537
std::vector<DeviceGlobalInfo> GVInfos (NumOfDeviceGlobal);
538
- Result = context.urDdiTable .Enqueue .pfnDeviceGlobalVariableRead (
539
- Queue, Program, kSPIR_AsanDeviceGlobalMetadata , true ,
540
- sizeof (DeviceGlobalInfo) * NumOfDeviceGlobal, 0 , &GVInfos[0 ], 0 ,
541
- nullptr , nullptr );
538
+ Result = context.urDdiTable .Enqueue .pfnUSMMemcpy (
539
+ Queue, true , &GVInfos[0 ], MetadataPtr,
540
+ sizeof (DeviceGlobalInfo) * NumOfDeviceGlobal, 0 , nullptr , nullptr );
542
541
if (Result != UR_RESULT_SUCCESS) {
543
542
context.logger .error (" Device Global[{}] Read Failed: {}" ,
544
543
kSPIR_AsanDeviceGlobalMetadata , Result);
0 commit comments