@@ -760,14 +760,14 @@ ur_result_t SanitizerInterceptor::prepareLaunch(
760
760
}
761
761
762
762
// Write global variable to program
763
- auto EnqueueWriteGlobal = [Queue, Program](const char *Name,
764
- const void *Value,
765
- size_t Size ) {
763
+ auto EnqueueWriteGlobal = [Queue, Program](
764
+ const char *Name, const void *Value,
765
+ size_t Size, bool ReportWarning = true ) {
766
766
auto Result =
767
767
getContext ()->urDdiTable .Enqueue .pfnDeviceGlobalVariableWrite (
768
768
Queue, Program, Name, false , Size, 0 , Value, 0 , nullptr ,
769
769
nullptr );
770
- if (Result != UR_RESULT_SUCCESS) {
770
+ if (ReportWarning && Result != UR_RESULT_SUCCESS) {
771
771
getContext ()->logger .warning (
772
772
" Failed to write device global \" {}\" : {}" , Name, Result);
773
773
return false ;
@@ -780,7 +780,7 @@ ur_result_t SanitizerInterceptor::prepareLaunch(
780
780
// Because EnqueueWriteGlobal is a async write, so
781
781
// we need to extend its lifetime
782
782
static uint64_t Debug = Options (logger).Debug ? 1 : 0 ;
783
- EnqueueWriteGlobal (kSPIR_AsanDebug , &Debug, sizeof (Debug));
783
+ EnqueueWriteGlobal (kSPIR_AsanDebug , &Debug, sizeof (Debug), false );
784
784
785
785
// Write shadow memory offset for global memory
786
786
EnqueueWriteGlobal (kSPIR_AsanShadowMemoryGlobalStart ,
0 commit comments