File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
source/adapters/level_zero Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -130,8 +130,10 @@ ur_result_t ur_queue_handle_legacy_t_::enqueueKernelLaunch(
130130 *OutEvent // /< [in,out][optional] return an event object that identifies
131131 // /< this particular kernel execution instance.
132132) {
133- auto Queue = this ;
133+ UR_ASSERT (WorkDim > 0 , UR_RESULT_ERROR_INVALID_WORK_DIMENSION);
134+ UR_ASSERT (WorkDim < 4 , UR_RESULT_ERROR_INVALID_WORK_DIMENSION);
134135
136+ auto Queue = this ;
135137 ze_kernel_handle_t ZeKernel{};
136138 UR_CALL (getZeKernel (Queue, Kernel, &ZeKernel));
137139
@@ -337,6 +339,9 @@ ur_result_t ur_queue_handle_legacy_t_::enqueueCooperativeKernelLaunchExp(
337339 *OutEvent // /< [in,out][optional] return an event object that identifies
338340 // /< this particular kernel execution instance.
339341) {
342+ UR_ASSERT (WorkDim > 0 , UR_RESULT_ERROR_INVALID_WORK_DIMENSION);
343+ UR_ASSERT (WorkDim < 4 , UR_RESULT_ERROR_INVALID_WORK_DIMENSION);
344+
340345 auto Queue = this ;
341346 auto ZeDevice = Queue->Device ->ZeDevice ;
342347
You can’t perform that action at this time.
0 commit comments