Skip to content

Commit 98842ec

Browse files
committed
Apply comments
Signed-off-by: amochalo <[email protected]>
1 parent aaf766a commit 98842ec

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

sycl/include/CL/sycl/detail/pi.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ typedef enum {
8585
PI_DEVICE_NOT_FOUND = CL_DEVICE_NOT_FOUND,
8686
PI_INVALID_WORK_ITEM_SIZE = CL_INVALID_WORK_ITEM_SIZE,
8787
PI_INVALID_KERNEL_ARGS = CL_INVALID_KERNEL_ARGS,
88+
PI_INVALID_IMAGE_SIZE = CL_INVALID_IMAGE_SIZE,
8889
PI_IMAGE_FORMAT_NOT_SUPPORTED = CL_IMAGE_FORMAT_NOT_SUPPORTED,
8990
PI_MEM_OBJECT_ALLOCATION_FAILURE = CL_MEM_OBJECT_ALLOCATION_FAILURE,
9091
PI_ERROR_UNKNOWN = -999

sycl/source/detail/error_handling/enqueue_kernel.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,7 @@ bool handleError(pi_result Error, const device_impl &DeviceImpl,
244244
throw sycl::nd_range_error(
245245
"The kernel argument values have not been specified "
246246
" OR "
247-
"a kernel argument declared to be a pointer to a type"
248-
" does not point to a named address space",
247+
"a kernel argument declared to be a pointer to a type.",
249248
PI_INVALID_KERNEL_ARGS);
250249

251250
case PI_INVALID_WORK_ITEM_SIZE:
@@ -270,10 +269,16 @@ bool handleError(pi_result Error, const device_impl &DeviceImpl,
270269
case PI_MEM_OBJECT_ALLOCATION_FAILURE:
271270
throw sycl::nd_range_error(
272271
"failure to allocate memory for data store associated with image"
273-
" or "
274-
"buffer objects specified as arguments to kernel",
272+
" or buffer objects specified as arguments to kernel",
275273
PI_MEM_OBJECT_ALLOCATION_FAILURE);
276274

275+
case PI_INVALID_IMAGE_SIZE:
276+
throw sycl::nd_range_error(
277+
"image object is specified as an argument value and the image "
278+
"dimensions (image width, height, specified or compute row and/or "
279+
"slice pitch) are not supported by device associated with queue",
280+
PI_INVALID_IMAGE_SIZE);
281+
277282
// TODO: Handle other error codes
278283

279284
default:

0 commit comments

Comments
 (0)