@@ -180,26 +180,27 @@ void ReportInvalidKernelArgument(ur_kernel_handle_t Kernel, uint32_t ArgIndex,
180
180
break ;
181
181
case ValidateUSMResult::RELEASED_POINTER:
182
182
getContext ()->logger .always (
183
- " The {}th argument {} is a released USM pointer" , ArgIndex,
183
+ " The {}th argument {} is a released USM pointer" , ArgIndex + 1 ,
184
184
(void *)Addr);
185
185
PrintAllocateInfo (Addr, AI.get ());
186
186
break ;
187
187
case ValidateUSMResult::BAD_CONTEXT:
188
188
getContext ()->logger .always (
189
- " The {}th argument {} is allocated in other context" , ArgIndex,
189
+ " The {}th argument {} is allocated in other context" , ArgIndex + 1 ,
190
190
(void *)Addr);
191
191
PrintAllocateInfo (Addr, AI.get ());
192
192
break ;
193
193
case ValidateUSMResult::BAD_DEVICE:
194
194
getContext ()->logger .always (
195
- " The {}th argument {} is allocated in other device" , ArgIndex,
195
+ " The {}th argument {} is allocated in other device" , ArgIndex + 1 ,
196
196
(void *)Addr);
197
197
PrintAllocateInfo (Addr, AI.get ());
198
198
break ;
199
199
case ValidateUSMResult::OUT_OF_BOUNDS:
200
200
getContext ()->logger .always (
201
201
" The {}th argument {} is located outside of its region [{}, {})" ,
202
- ArgIndex, (void *)Addr, (void *)AI->UserBegin , (void *)AI->UserEnd );
202
+ ArgIndex + 1 , (void *)Addr, (void *)AI->UserBegin ,
203
+ (void *)AI->UserEnd );
203
204
getContext ()->logger .always (" allocated here:" );
204
205
AI->AllocStack .print ();
205
206
break ;
0 commit comments