Skip to content

Commit fea2cf9

Browse files
committed
Apply comments
Signed-off-by: amochalo <[email protected]>
1 parent 6d4819f commit fea2cf9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

sycl/source/detail/error_handling/enqueue_kernel.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ bool oclHandleInvalidWorkGroupSize(const device_impl &DeviceImpl,
161161
}
162162

163163
// TODO: required number of sub-groups, OpenCL 2.1:
164-
// CL_INVALID_WORK_GROUP_SIZE if local_work_size is specified and is not
164+
// PI_INVALID_WORK_GROUP_SIZE if local_work_size is specified and is not
165165
// consistent with the required number of sub-groups for kernel in the
166166
// program source.
167167

@@ -224,12 +224,12 @@ bool handleInvalidWorkItemSize(const device_impl &DeviceImpl,
224224
nullptr);
225225
for (int i = 0; i < NDRDesc.Dims; i++) {
226226
if (NDRDesc.LocalSize[i] > MaxWISize[i])
227-
throw sycl::nd_range_error("Number of local work group number " +
228-
std::to_string(i) +
229-
" greater then corresponding values"
230-
"PI_DEVISE_MAX_WORK_SIZE",
231-
PI_INVALID_WORK_ITEM_SIZE);
227+
throw sycl::nd_range_error(
228+
"Number of work-items in a work-group exceed limit for dimension "
229+
"{i}: {NDRDesc.LocalSize[i]} > {MaxWISize[i]}",
230+
PI_INVALID_WORK_ITEM_SIZE);
232231
}
232+
return 0;
233233
}
234234

235235
bool handleError(pi_result Error, const device_impl &DeviceImpl,

0 commit comments

Comments
 (0)