본문 바로가기

IT/Parallel Computing

[OpenCL] Error Code

이번 포스팅에서는 OpenCL 사용 시, 발생하는 Error Code에 대한 내용을 포스팅 하겠다.


OpenCL의 Error code에 대한 내용은  "OpenCL error codes (1.x and 2.x)"에서 발췌하였다.


Code 

 OpenCL Error Flag 

 Functions(s)

 Description

 0

 CL_SUCCESS

 

 The sweet spot.

 -1

 CL_DEVICE_NOT_FOUND

 clGetDeviceIDs

 if no OpenCL devices that matched device_type were found.

 -2

 CL_DEVICE_NOT_AVAILABLE

 clCreateContext

 if a device in devices is currently not available even though the device was returned by clGetDeviceIDs.

 -3

 CL_COMPILER_NOT

 _AVAILABLE

 clBuildProgram

 if program is created with clCreateProgramWithSource and a compiler is not available i.e. CL_DEVICE_COMPILER_AVAILABLE specified in the table of OpenCL Device Queries for clGetDeviceInfo is set to CL_FALSE.

 -4

 CL_MEM_OBJECT

 _ALLOCATION_FAILURE

 

 if there is a failure to allocate memory for buffer object.

 -5

 CL_OUT_OF_RESOURCES

 

 if there is a failure to allocate resources required by the OpenCL implementation on the device.

 -6

 CL_OUT_OF_HOST_MEMORY 

 

 if there is a failure to allocate resources required by the OpenCL implementation on the host.

 -7

 CL_PROFILING_INFO_NOT

 _AVAILABLE

 clGetEventProfilingInfo

 if the CL_QUEUE_PROFILING_ENABLE flag is not set for the command-queue, if the execution status of the command identified by event is not CL_COMPLETE or if event is a user event object.

 -8

 CL_MEM_COPY_OVERLAP

 clEnqueueCopyBuffer

 clEnqueueCopyBufferRect

 clEnqueueCopyImage

 if src_buffer and dst_buffer are the same buffer or subbuffer object and the source and destination regions overlap or if src_buffer and dst_buffer are different sub-buffers of the same associated buffer object and they overlap. The regions overlap if src_offset ≤ to dst_offset ≤ to src_offset + size – 1, or if dst_offset ≤ to src_offset ≤ to dst_offset + size – 1.

 -9

 CL_IMAGE_FORMAT

 _MISMATCH

 clEnqueueCopyImage

 if src_image and dst_image do not use the same image format.

 -10

 CL_IMAGE_FORMAT_NOT

 _SUPPORTED

 clCreateImage

 if the image_format is not supported.

 -11

 CL_BUILD_PROGRAM

 _FAILURE

 clBuildProgram

 if there is a failure to build the program executable. This error will be returned if clBuildProgram does not return until the build has completed.

 -12

 CL_MAP_FAILURE

 clEnqueueMapBuffer

 clEnqueueMapImage

  if there is a failure to map the requested region into the host address space. This error cannot occur for image objects created with CL_MEM_USE_HOST_PTR or CL_MEM_ALLOC_HOST_PTR.

 -13

 CL_MISALIGNED_SUB

 _BUFFER_OFFSET

 

 if a sub-buffer object is specified as the value for an argument that is a buffer object and the offset specified when the sub-buffer object is created is not aligned to CL_DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue.

 -14

 CL_EXEC_STATUS_ERROR_

 FOR_EVENTS_IN_WAIT_LIST

 

 if the execution status of any of the events in event_list is a negative integer value.

 -15

 CL_COMPILE_PROGRAM

 _FAILURE

 clCompileProgram

 if there is a failure to compile the program source. This error will be returned if clCompileProgram does not return until the compile has completed.

 -16

 CL_LINKER_NOT_AVAILABLE

 clLinkProgram

 if a linker is not available i.e. CL_DEVICE_LINKER_AVAILABLE specified in the table of allowed values for param_name for clGetDeviceInfo is set to CL_FALSE.

 -17

 CL_LINK_PROGRAM_FAILURE

 clLinkProgram

 if there is a failure to link the compiled binaries and/or libraries.

 -18

 CL_DEVICE_PARTITION

 _FAILED

 clCreateSubDevices if the partition name is supported by the implementation but in_device could not be further partitioned.

 -19

 CL_KERNEL_ARG_INFO

 _NOT_AVAILABLE

 clGetKernelArgInfo

 if the argument information is not available for kernel.


-16 ~ -19까지의 에러코드는 OpenCL 1.2.에서 새로 추가된 내용이다

'IT > Parallel Computing' 카테고리의 다른 글

[OpenCL] Glossary - 용어  (0) 2017.04.19
[OpenCL] 시작, 예제 실행하기  (0) 2017.04.18