I have this configuration:
Dev: Tahiti Pro
OS: RHEL 6.3
APP SDK: 2.7
OpenCL 1.2 AMD-APP (938.2)
And i've found that this kernel
test2 (global float *in, global float *out)
int x = get_global_id(0);
int xx = get_local_id(0);
local float a[32*32];
local float b[32*32*8];
float4 input = vload4(x, in);
float4 res = sin(input);
vstore4(res, x, out);
fails to compile with the message:
calclCompile failedError: Creating kernel test2 failed!
Now, if i change the locals to:
local float a[32*32*4];
local float b[32*32*4];
Then it works, which suggests the build fails b/c local mem limit of 32kb.
Yes, you can get build log
CL_PROGRAM_BUILD_LOG , it often has exciting information even if the kernel compiles, for example register spilling etc.
Also you can replace the error code with a more meaningful text. There is a list of error codes in CL/cl.h, You could perhaps copy the getOpenCLErrorCodeStr function from SDKCommon.cpp from the SDK.