File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
unified-runtime/source/adapters/level_zero Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -279,15 +279,11 @@ ur_result_t urEnqueueCooperativeKernelLaunchExp(
279
279
280
280
if (LocalWorkSize) {
281
281
// L0
282
- UR_ASSERT (LocalWorkSize[0 ] < (std::numeric_limits<uint32_t >::max)(),
283
- UR_RESULT_ERROR_INVALID_VALUE);
284
- UR_ASSERT (LocalWorkSize[1 ] < (std::numeric_limits<uint32_t >::max)(),
285
- UR_RESULT_ERROR_INVALID_VALUE);
286
- UR_ASSERT (LocalWorkSize[2 ] < (std::numeric_limits<uint32_t >::max)(),
287
- UR_RESULT_ERROR_INVALID_VALUE);
288
- WG[0 ] = static_cast <uint32_t >(LocalWorkSize[0 ]);
289
- WG[1 ] = static_cast <uint32_t >(LocalWorkSize[1 ]);
290
- WG[2 ] = static_cast <uint32_t >(LocalWorkSize[2 ]);
282
+ for (int I = 0 ; I < WorkDim; I++) {
283
+ UR_ASSERT (LocalWorkSize[I] < (std::numeric_limits<uint32_t >::max)(),
284
+ UR_RESULT_ERROR_INVALID_VALUE);
285
+ WG[I] = static_cast <uint32_t >(LocalWorkSize[I]);
286
+ }
291
287
} else {
292
288
// We can't call to zeKernelSuggestGroupSize if 64-bit GlobalWorkSize
293
289
// values do not fit to 32-bit that the API only supports currently.
You can’t perform that action at this time.
0 commit comments