In my kernel code I am trying to declare a constant array of float2 vectors like this:
Code :
__constant float2 grads[2] = {(float2)(1.0f,0.0f), (float2)(0.0f,1.0f)};

But this gives a rather obscure error when attempting to build the kernel:

ptxas application ptx input, line 11; fatal : Parsing error near ',': syntax error
ptxas fatal : Ptx assembly aborted due to errors
error : Ptx compilation failed: gpu='sm_20', device code='cuModuleLoadDataEx_4'
: Considering profile 'compute_20' for gpu='sm_20' in 'cuModuleLoadDataEx_4'
: Retrieving binary for 'cuModuleLoadDataEx_4', for gpu='sm_20', usage mode=' '
: Considering profile 'compute_20' for gpu='sm_20' in 'cuModuleLoadDataEx_4'
: Control flags for 'cuModuleLoadDataEx_4' disable search path
: Ptx binary found for 'cuModuleLoadDataEx_4', architecture='compute_20'
: Ptx compilation for 'cuModuleLoadDataEx_4', for gpu='sm_20', ocg options=' '

Any suggestions for the correct way to do this?

I'm using the Linux Nvidia OpenCL implementation.
This code did previously work ok on Mac, so I was thinking it was correct syntax...

Thanks!