Limited kernel size/number and atomics extension problems

Discussion created by purzel42 on Mar 23, 2010
Latest reply on Mar 24, 2010 by omkaranathan


I am currently working on a research project where we use OpenCL on ATI cards (Radeon HD 5770), currently with ATI Stream SDK 2.01.

I experienced two strange behaviours:

1. Trying to build a .cl file with 8 (or more) kernels resulted in an error from the OpenCL compiler (error code -2, CL_DEVICE_NOT_AVAILABLE) which doesn't make a lot of sense to me.

I solved this by splitting my .cl file to two with 4 kernels each and build each .cl file to a dedicated cl_program object.

Is there a limit to the number of kernels or the total size of a cl_program object?


2. We use local atomic operations (atom_add) and therefor included the appropriate pragma cl_khr_local_int32_base_atomics. However, this resulted in a compiler error (error: can't find an instance for opencl builtin ... atom_add).

This could be solved by changing the pragma to cl_khr_global_int32_base_atomics. Any ideas about this? Especially as the HD 5770 supports local atomics.


Thanks for answers in advance.