Dealing with errors using ComputeCpp

This guide was created for versions: v0.1.0 - v0.3.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 notcurrently supported. -
7 No Yes Internal error. <extra string>
8 No No SYCL objects are still alivewhile the runtime is shuttingdown. <Count of alive objects>
9 No - The value ofCOMPUTECPP_TARGET isinvalid. -
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 theprogram information. -
104 Yes - Error while retrieving thekernel information. -
105 No - The requested target namecould not be found. [target name]
106 No - Device not found. -
107 Yes - Failed to create program frombinary -
108 Yes - - -
109 Yes - Failed build kernel. -
110 Yes - Failed to create program fromOpenCL Csource. -
111 Yes - Failed to set kernel argumentsfor OpenCL interoperabilitykernel. -
112 Yes - Failed to retain an OpenCLkernel object. -
113 Yes - Failed to release an OpenCLkernel object. -
114 No - Failed to create program froman invalid cl_program object. -
115 No - - -
116 No - Failed to create kernel frominvalid OpenCL cl_kernelobject -
117 No - Failed to compile program. -
118 No - Failed to find a suitable binaryfor program. -
200 No Yes Failed to construct implicitqueue. -
201 Yes - Error while waiting for anevent. -
202 Yes - Cannot retrieve eventinformation. -
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 hostcontext construction."
205 Yes - Failed to create user event. -
206 Yes - Error when finishing theOpenCL command queue. -
207 Yes - Error when flusing theOpenCL command queue. -
208 Yes - Failed to enqueue the OpenCLcommand (command name)
209 Yes - Failed to retain OpenCLcontext. -
210 Yes - Failed to release OpenCLcontext. -
211 Yes - This context has no associateddevices. -
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 commandgroup. <Reason>
217 No - Kernel failed duringexecution. -
218 No - Command group has alreadybeen processed. Invalid use ofaccessors or parallel_forinvocations. -
219 No - Cannot use explicit set_arg()for kernel arguments andaccessor syntaxsimultaneously. -
220 No Yes Maximum number of devicesper context has been reached. -
221 No - No command group availablein this functor -
222 No - Cannot contruct a non-hostaccessor outside of acommand group. -
223 No - Cannot construct a hostaccessor inside a commandgroup. -
300 Yes - Error trying to retrieve thework-group information fromthe OpenCL implementation -
301 No - Work-group size is invalid. -
400 No - Error in acquiringinformation. -
401 Yes - Cannot create sub-device. -
402 Yes - Cannot create device. -
403 Yes - Cannot release OpenCL device. -
404 Yes - Error acquiring informationform the OpenCL runtime forthe give cl_mem object. -
405 No - Cannot create a sycl bufferfrom a non-buffer cl_mem. -
407 Yes - Failed to create OpenCLcommand queue -
408 Yes - Error querying the number ofOpenCL platforms. -
409 Yes - Error obtaining OpenCLplatforms in the system. -
410 No Yes Error processing kernelarguments from integrationheader. -
411 No - Incorrect type of accessor (%s) <target>,<mode>for the given parameters (%s) -
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 -