@@ -748,14 +748,14 @@ ur_result_t SanitizerInterceptor::prepareLaunch(
748
748
}
749
749
750
750
// Write global variable to program
751
- auto EnqueueWriteGlobal = [Queue, Program](const char *Name,
752
- const void *Value,
753
- size_t Size ) {
751
+ auto EnqueueWriteGlobal = [Queue, Program](
752
+ const char *Name, const void *Value,
753
+ size_t Size, bool ReportWarning = true ) {
754
754
auto Result =
755
755
getContext ()->urDdiTable .Enqueue .pfnDeviceGlobalVariableWrite (
756
756
Queue, Program, Name, false , Size, 0 , Value, 0 , nullptr ,
757
757
nullptr );
758
- if (Result != UR_RESULT_SUCCESS) {
758
+ if (ReportWarning && Result != UR_RESULT_SUCCESS) {
759
759
getContext ()->logger .warning (
760
760
" Failed to write device global \" {}\" : {}" , Name, Result);
761
761
return false ;
@@ -768,7 +768,7 @@ ur_result_t SanitizerInterceptor::prepareLaunch(
768
768
// Because EnqueueWriteGlobal is a async write, so
769
769
// we need to extend its lifetime
770
770
static uint64_t Debug = Options (logger).Debug ? 1 : 0 ;
771
- EnqueueWriteGlobal (kSPIR_AsanDebug , &Debug, sizeof (Debug));
771
+ EnqueueWriteGlobal (kSPIR_AsanDebug , &Debug, sizeof (Debug), false );
772
772
773
773
// Write shadow memory offset for global memory
774
774
EnqueueWriteGlobal (kSPIR_AsanShadowMemoryGlobalStart ,
0 commit comments