Following are the errors encountered in OpenCL. For descriptions of errors as they pertain to specific functions, refer to the reference pages for those functions.
Error | Description |
---|---|
CL_BUILD_PROGRAM_FAILURE
|
Returned by clBuildProgram if there is a failure to build the program executable. This error will be returned if |
CL_COMPILER_NOT_AVAILABLE
|
Returned by clBuildProgram if the parameter |
CL_DEVICE_NOT_AVAILABLE
|
Returned by clCreateContext and clCreateContextFromType if the specified device is not currently available. |
CL_DEVICE_NOT_FOUND
|
Returned by clGetDeviceIDs and clCreateContextFromType if no OpenCL devices that match the specified devices were found. |
CL_IMAGE_FORMAT_MISMATCH
|
Returned by clEnqueueCopyImage if the specified source and destination images are not valid image objects. |
CL_IMAGE_FORMAT_NOT_SUPPORTED
|
Returned by clCreateImage2D and clCreateImage3D if the specified image format is not supported. |
CL_INVALID_ARG_INDEX
|
Returned by clSetKernelArg if an invalid argument index is specified. |
CL_INVALID_ARG_SIZE
|
Returned by clSetKernelArg if argument size specified ( |
CL_INVALID_ARG_VALUE
|
Returned by clSetKernelArg if the argument value specified is NULL for an argument that is not declared with the |
CL_INVALID_BINARY
|
Returned by clBuildProgram and clCreateProgramWithBinary if the program binary is not a valid binary for the specified device. |
CL_INVALID_BUFFER_SIZE
|
Returned by clCreateBuffer if the value of the parameter |
CL_INVALID_BUILD_OPTIONS
|
Returned by clBuildProgram if the specified build options are invalid. |
CL_INVALID_COMMAND_QUEUE
|
Returned by the functions listed below if the specified command-queue is not a valid command-queue. The exact condition that generates this error depends on the calling function. Refer to the function for more information. Returned by the following functions: clRetainCommandQueue, clReleaseCommandQueue, clGetCommandQueueInfo, clSetCommandQueueProperty, clEnqueueReadBuffer, clEnqueueWriteBuffer, clEnqueueCopyBuffer, clEnqueueReadImage, clEnqueueWriteImage, clEnqueueCopyImage, clEnqueueCopyImageToBuffer, clEnqueueCopyBufferToImage, clEnqueueMapBuffer, clEnqueueMapImage, clEnqueueUnmapMemObject, clEnqueueNDRangeKernel, clEnqueueTask, clEnqueueNativeKernel, clEnqueueMarker, clEnqueueWaitForEvents, clEnqueueBarrier, clFlush, clFinish, clEnqueueAcquireGLObjects, and clEnqueueReleaseGLObjects |
CL_INVALID_CONTEXT
|
Returned by the functions listed below if the specified context is not a valid OpenCL context, or the context associated with certain parameters are not the same. The exact condition that generates this error depends on the calling function. Refer to the function for more information. Returned by the following functions: clRetainContext, clReleaseContext, clGetContextInfo, clCreateCommandQueue, clCreateBuffer, clEnqueueReadBuffer, clEnqueueWriteBuffer, clEnqueueCopyBuffer, clCreateImage2D, clCreateImage3D, clGetSupportedImageFormats, clEnqueueReadImage, clEnqueueWriteImage, clEnqueueCopyImage, clEnqueueCopyImageToBuffer, clEnqueueCopyBufferToImage, clEnqueueMapBuffer, clEnqueueMapImage, clEnqueueUnmapMemObject, clCreateSampler, clCreateProgramWithSource, clCreateProgramWithBinary, clEnqueueNDRangeKernel, clEnqueueTask, clEnqueueNativeKernel, clWaitForEvents, clEnqueueWaitForEvents, clCreateFromGLBuffer, clCreateFromGLTexture2D, clCreateFromGLTexture3D, clCreateFromGLRenderbuffer, clEnqueueAcquireGLObjects, and clEnqueueReleaseGLObjects |
CL_INVALID_DEVICE
|
Returned by the functions listed below if the device or devices specified are not valid. The exact condition that generates this error depends on the calling function. Refer to the function for more information. Returned by the following functions: clGetDeviceIDs, clGetDeviceInfo, clCreateContext, clCreateContextFromType, clCreateCommandQueue, clCreateProgramWithBinary, clBuildProgram, clGetProgramBuildInfo, and clGetKernelWorkGroupInfo |
CL_INVALID_DEVICE_TYPE
|
Returned by clGetDeviceIDs and clCreateContextFromType if device type specified is not valid. |
CL_INVALID_EVENT
|
Returned by the functions listed below if the event objects specified are not valid. The exact condition that generates this error depends on the calling function. Refer to the function for more information. Returned by the following functions: clWaitForEvents, clGetEventInfo, clRetainEvent, clReleaseEvent, clEnqueueWaitForEvents, and clGetEventProfilingInfo |
CL_INVALID_EVENT_WAIT_LIST
|
Returned by the functions listed below if Returned by the following functions: clEnqueueReadBuffer, clEnqueueWriteBuffer, clEnqueueCopyBuffer, clEnqueueReadImage, clEnqueueWriteImage, clEnqueueCopyImage, clEnqueueCopyImageToBuffer, clEnqueueCopyBufferToImage, clEnqueueMapBuffer, clEnqueueMapImage, clEnqueueUnmapMemObject, clEnqueueNDRangeKernel, clEnqueueTask, clEnqueueCopyImage, clEnqueueCopyImageToBuffer, clEnqueueCopyBufferToImage, clEnqueueMapBuffer, clEnqueueMapImage, clEnqueueUnmapMemObject, clEnqueueNDRangeKernel, clEnqueueAcquireGLObjects, and clEnqueueReleaseGLObjects |
CL_INVALID_GL_OBJECT
|
Returned by clCreateFromGLBuffer if Returned by clCreateFromGLRenderbuffer if Returned by clCreateFromGLTexture2D and clCreateFromGLTexture3D if Returned by clGetGLObjectInfo and clGetGLTextureInfo if there is no GL object or texture associated with Returned by clEnqueueAcquireGLObjects and clEnqueueReleaseGLObjects if memory objects in |
CL_INVALID_GLOBAL_OFFSET
|
Returned by clEnqueueNDRangeKernel if |
CL_INVALID_HOST_PTR
|
Returned by the functions listed below if Returned by the functions clCreateBuffer, clCreateImage2D, and clCreateImage3D. |
CL_INVALID_IMAGE_FORMAT_DESCRIPTOR
|
Returned by clCreateImage2D and clCreateImage3D if the image format specified is not valid or is NULL. Returned byclCreateFromGLTexture2D and clCreateFromGLTexture3D Returned by clCreateFromGLRenderbuffer if the OpenGL renderbuffer internal format does not map to a supported OpenCL image format. |
CL_INVALID_IMAGE_SIZE
|
Returned by clCreateImage2D if the specified image width or height are 0 or if they exceed values specified in Returned by clCreateImage3D if the specified image width or height are 0 or if the image depth is <= 1, or if they exceed values specified in CL_DEVICE_IMAGE3D_MAX_WIDTH, |
CL_INVALID_KERNEL_NAME
|
Returned by clCreateKernel if the specified kernel name is not found in |
CL_INVALID_KERNEL
|
Returned by the functions listed below if the specified kernel is not a valid kernel object. The exact condition that generates this error depends on the calling function. Refer to the function for more information. Returned by the following functions: clReleaseKernel, clRetainKernel, clSetKernelArg, clGetKernelInfo, clGetKernelWorkGroupInfo, clEnqueueNDRangeKernel, and clEnqueueTask |
CL_INVALID_KERNEL_ARGS
|
Returned by clEnqueueNDRangeKernel and clEnqueueTask if the kernel argument values have not been specified. |
CL_INVALID_KERNEL_DEFINITION
|
Returned by clCreateKernel if the function definition for |
CL_INVALID_MEM_OBJECT
|
Returned by the functions listed below if a parameter is not a valid memory, image, or buffer object. The exact condition that generates this error depends on the calling function. Refer to the function for more information. Returned by the following functions: clEnqueueReadBuffer, clEnqueueWriteBuffer, clEnqueueCopyBuffer, clRetainMemObject, clReleaseMemObject, clEnqueueReadImage, clEnqueueWriteImage, clEnqueueCopyImage, clEnqueueCopyImageToBuffer, clEnqueueCopyBufferToImage, clEnqueueMapBuffer, clEnqueueMapImage, clEnqueueUnmapMemObject, clGetMemObjectInfo, clGetImageInfo, clSetKernelArg, clEnqueueNativeKernel, clGetGLObjectInfo, clGetGLTextureInfo, clEnqueueAcquireGLObjects, and clEnqueueReleaseGLObjects |
CL_INVALID_OPERATION
|
Returned by clCreateImage2D,
clCreateImage3D, and
clCreateSampler if there are no devices in Returned by clBuildProgram if the build of a program executable for any of the devices specified by a previous call to Returned by clEnqueueNativeKernel if the specified device cannot execute the native kernel. Returned by clCreateFromGLTexture2D if the miplevel is less than 0. Returned by clCreateFromGLTexture3D if 3D images are not supported by the OpenCL embedded profile. |
CL_INVALID_PLATFORM
|
Returned by clGetPlatformInfo and clGetDeviceIDs if the specified platform is not a valid platform. Returned by clCreateContext and
clCreateContextFromType if |
CL_INVALID_PROGRAM
|
Returned by the functions listed below if the specified program is not a valid program object. The exact condition that generates this error depends on the calling function. Refer to the function for more information. Returned by the following functions: clRetainProgram, clReleaseProgram, clBuildProgram, clGetProgramInfo, clGetProgramBuildInfo, clCreateKernel, and clCreateKernelsInProgram |
CL_INVALID_PROGRAM_EXECUTABLE
|
Returned by clCreateKernel if there is no successfully built executable for Returned by clEnqueueNDRangeKernel and clEnqueueTask if there is no successfully built program executable available for device associated with |
CL_INVALID_QUEUE_PROPERTIES
|
Returned by clCreateCommandQueue and clSetCommandQueueProperty if specified properties are valid but are not supported by the device. |
CL_INVALID_SAMPLER
|
Returned by clRetainSampler, clReleaseSampler, and clGetSamplerInfo if the specified sampler is not a valid sampler object. Returned by clSetKernelArg for an argument declared to be of type sampler_t when the specified |
CL_INVALID_VALUE
|
Returned by the functions listed below if a parameter is not an expected value. The exact condition that generates this error depends on the calling function. Refer to the function for more information. Returned by the following functions: clGetPlatformIDs, clGetPlatformInfo, clGetDeviceIDs, clGetDeviceInfo, clCreateContext, clCreateContextFromType, clGetContextInfo, clCreateCommandQueue, clGetCommandQueueInfo, clSetCommandQueueProperty, clCreateBuffer, clEnqueueReadBuffer, clEnqueueWriteBuffer, clEnqueueCopyBuffer, clCreateImage2D, clCreateImage3D, clGetSupportedImageFormats, clEnqueueReadImage, clEnqueueWriteImage, clEnqueueCopyImage, clEnqueueCopyImage, clEnqueueCopyImageToBuffer, clEnqueueCopyBufferToImage, clEnqueueMapBuffer, clEnqueueMapImage, clEnqueueUnmapMemObject, clGetMemObjectInfo, clGetImageInfo, clCreateSampler, clGetSamplerInfo, clCreateProgramWithSource, clCreateProgramWithBinary, clBuildProgram, clGetProgramInfo, clGetProgramBuildInfo, clCreateKernel, clCreateKernelsInProgram, clGetKernelInfo, clGetKernelWorkGroupInfo, clEnqueueNativeKernel, clWaitForEvents, clGetEventInfo, clEnqueueMarker, clEnqueueWaitForEvents, clGetEventProfilingInfo, clCreateFromGLBuffer, clCreateFromGLTexture2D, clCreateFromGLTexture3D, clCreateFromGLRenderbuffer, clGetGLTextureInfo, and clEnqueueAcquireGLObjects |
CL_INVALID_WORK_DIMENSION
|
Returned by clEnqueueNDRangeKernel if |
CL_INVALID_WORK_GROUP_SIZE
|
Returned by clEnqueueNDRangeKernel and clEnqueueTask if |
CL_INVALID_WORK_ITEM_SIZE
|
Returned by clEnqueueNDRangeKernel if the number of work-items specified in any of local_work_size... [0]... local_work_size[work_dim - 1] is greater than the corresponding values specified by CL_DEVICE_MAX_WORK_ITEM_SIZES[0],... CL_DEVICE_MAX_WORK_ITEM_SIZES[work_dim -1]. |
CL_MAP_FAILURE
|
Returned by clEnqueueMapBuffer and
clEnqueueMapImage if there is a failure to map the requested region into the host address space. This error cannot occur for buffer objects created with |
CL_MEM_OBJECT_ALLOCATION_FAILURE
|
Returned by the functions listed below if there is a failure to allocate memory for data store associated with image or buffer objects specified as arguments to Returned by the following functions: clCreateBuffer, clEnqueueReadBuffer, clEnqueueWriteBuffer, clEnqueueCopyBuffer, clCreateImage2D, clCreateImage3D, clEnqueueReadImage, clEnqueueWriteImage, clEnqueueCopyImage, clEnqueueCopyImageToBuffer, clEnqueueCopyBufferToImage, clEnqueueMapBuffer, clEnqueueMapImage, clEnqueueNDRangeKernel, clEnqueueTask, and clEnqueueNativeKernel |
CL_MEM_COPY_OVERLAP
|
Returned by clEnqueueCopyBuffer and clEnqueueCopyImage if the source and destination images are the same image (or the source and destination buffers are the same buffer), and the source and destination regions overlap. |
CL_OUT_OF_HOST_MEMORY
|
Returned by the functions listed below in the event of a failure to allocate resources required by the OpenCL implementation on the host. The exact condition that generates this error depends on the calling function. Refer to the function for more information. Returned by the following functions: clCreateContext, clCreateContextFromType, clCreateCommandQueue, clCreateBuffer, clEnqueueCopyBuffer, clCreateImage2D, clCreateImage3D, clEnqueueReadImage, clEnqueueWriteImage, clEnqueueCopyImage, clEnqueueCopyImageToBuffer, clEnqueueCopyBufferToImage, clEnqueueMapBuffer, clEnqueueMapImage, clEnqueueUnmapMemObject, clCreateSampler, clCreateProgramWithSource, clCreateProgramWithBinary, clBuildProgram, clCreateKernel, clCreateKernelsInProgram, clEnqueueNDRangeKernel, clEnqueueTask, clEnqueueNativeKernel, clEnqueueMarker, clEnqueueWaitForEvents, clEnqueueBarrier, clFlush, clFinish, clCreateFromGLBuffer, clCreateFromGLTexture2D, clCreateFromGLTexture3D, clCreateFromGLRenderbuffer, clEnqueueAcquireGLObjects, and clEnqueueReleaseGLObjects |
CL_OUT_OF_RESOURCES
|
Returned by clEnqueueNDRangeKernel,
clEnqueueTask, and
clEnqueueNativeKernel in the event of a failure to queue the execution instance of |
CL_PROFILING_INFO_NOT_AVAILABLE
|
Returned by clGetEventProfilingInfo if the |
CL_SUCCESS | Indicates that the function executed successfully. |