Dealing with errors using ComputeCpp

This guide was created for versions: v0.3.1 - v0.4.0

The table below lists all the different error codes that can be reported by the runtime, alongside the error message reported and optional information. The columns of the table are:

  • Number: The identification number provided with the error message
  • OpenCL Error Available: Whether an OpenCL error can be queried from the exception
  • Should Report: Whether this error message should be reported to ComputeCpp Support as an internal error
  • Optional Information: Optional string that can be produced by the runtime alongside the error message

Number OpenCL Error Available Internal Error Error Message Optional Information
1 No Yes Unknown Error -
2 No No Out of host memory. -
3 Yes No Error retaining OpenCL object. - -
4 Yes No Error releasing OpenCL object. - -
5 No No Failed to allocate hostmemory. -
6 No Yes This functionality is not currently supported. -
7 No Yes Internal error. <extra string>
8 No No SYCL objects are still alive while the runtime is shutting down. <Count of alive objects>
9 No - The value of COMPUTECPP_TARGET is invalid. -
10 No Yes Invalid Target String Format. -
11 No No Null pointer passed. -
12 No Yes Filename set in COMPUTECPP_CONFIGURATION_FILE. -
100 No - Failed to build program. -
101 No - Failed to create a kernel. -
102 No - The requested kernel namecould not be found. [kernel_name]
103 Yes - Error while retrieving the program information. -
104 Yes - Error while retrieving the kernel information. -
105 No - The requested target name could not be found. [target name]
106 No - Device not found. -
107 Yes - Failed to create program from binary. -
108 Yes - - -
109 Yes - Failed build kernel. -
110 Yes - Failed to create program fromOpenCL Csource. -
111 Yes - Failed to set kernel arguments for OpenCL interoperability kernel. -
112 Yes - Failed to retain an OpenCL kernel object. -
113 Yes - Failed to release an OpenCL kernel object. -
114 No - Failed to create program from an invalid cl_program object. -
115 No - - -
116 No - Failed to create kernel from invalid OpenCL cl_kernel object -
117 No - Failed to compile program. -
118 No - Failed to find a suitable binary for program. -
200 No Yes Failed to construct implicit queue. -
201 Yes - Error while waiting for an event. -
202 Yes - Cannot retrieve event information. -
203 Yes Yes Failed to set user event status. -
204 Yes - Failed to create context. For host:"context::context(cl_context,...) constructor is not valid for SYCL host context construction."
205 Yes - Failed to create user event. -
206 Yes - Error when finishing theOpenCL command queue. -
207 Yes - Error when flushing the OpenCL command queue. -
208 Yes - Failed to enqueue the OpenCL command (command name)
209 Yes - Failed to retain OpenCL context. -
210 Yes - Failed to release OpenCL context. -
211 Yes - This context has no associated devices. -
212 Yes - Failed to retain OpenCL event. There was an error while trying to doa CLRetainEvent on the cl_event given. -
213 No - - -
214 Yes - Failed to release OpenCLevent. -
215 Yes Yes Error setting the callback ofan OpenCL object. -
216 Yes - Failed to submit command group. <Reason>
217 No - Kernel failed during execution. -
218 No - Command group has already been processed. Invalid use of accessors or parallel_for invocations. -
219 No - Cannot use explicit set_arg()for kernel arguments andaccessor syntax simultaneously. -
220 No Yes Maximum number of devices per context has been reached. -
221 No - No command group available in this functor -
222 No - Cannot contruct a non-host accessor outside of a command group. -
223 No - Cannot construct a host accessor inside a command group. -
300 Yes - Error trying to retrieve the work-group information from the OpenCL implementation -
301 No - Work-group size is invalid. -
400 No - Error in acquiring information. -
401 Yes - Cannot create sub-device. -
402 Yes - Cannot create device. -
403 Yes - Cannot release OpenCL device. -
404 Yes - Error acquiring information form the OpenCL runtime for the give cl_mem object. -
405 No - Cannot create a sycl buffer from a non-buffer cl_mem. -
407 Yes - Failed to create OpenCL command queue -
408 Yes - Error querying the number of OpenCL platforms. -
409 Yes - Error obtaining OpenCL platforms in the system. -
410 No Yes Error processing kernel arguments from integration header. -
411 No - Incorrect type of accessor (%s) for the given parameters (%s) <target>,<mode>
500 Yes - Failed to create buffer -
501 Yes - Failed to create sub-buffer. -
502 Yes - Failed to create image. -
503 Yes - Failed to create sampler. -
504 Yes - Failed to release memoryobject. -
505 Yes - Failed to retain memoryobject. -
506 No - Failed to obtain a cl_memobject for the given context -
507 No - Error constructing an NDRange < optional specific error >
508 No - The memory object requestedis not available in the queue -