Skip to content

Improve error handling in enqueue_kernel_launch::handleError #935

Closed
@AlexeySachkov

Description

@AlexeySachkov

// TODO: Handle other error codes

#860 introduced additional error handling which converts OpenCL error codes from clEnqueueNDRange to verbose SYCL exceptions to improve user experience.

However, current handling covers only CL_INVALID_WORK_GROUP_SIZE error code and need to be improved to handle the rest (from OpenCL 1.2 API spec):

  • CL_INVALID_KERNEL_ARGS
  • CL_INVALID_GLOBAL_WORK_SIZE
  • CL_INVALID_GLOBAL_OFFSET
  • CL_INVALID_WORK_ITEM_SIZE
  • CL_MISALIGNED_SUB_BUFFER_OFFSET
  • CL_INVALID_IMAGE_SIZE
  • CL_IMAGE_FORMAT_NOT_SUPPORTED
  • CL_OUT_OF_RESOURCES
  • CL_MEM_OBJECT_ALLOCATION_FAILURE

The rest of error codes are less important: if I understand correctly, related OpenCL objects are not explicitly passed by user to clEnqueueNDRange, but handled by runtime somewhere. So, most likely we will emit corresponding errors directly from runtime prior calling OpenCL (this needs to be confirmed)

  • CL_INVALID_PROGRAM_EXECUTABLE
  • CL_INVALID_COMMAND_QUEUE
  • CL_INVALID_KERNEL
  • CL_INVALID_CONTEXT
  • CL_INVALID_WORK_DIMENSIONS
  • CL_INVALID_EVENT_WAIT_LIST
  • CL_OUT_OF_HOST_MEMORY

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions