atom_xchg and atom_cmpxchg won't compile

Discussion created by lexknuther on Feb 23, 2011
Latest reply on Feb 24, 2011 by himanshu.gautam


There appears to be a serious bug in the AMD OpenCL compiler.  It simply fails to compile any kernel involving atom_xchg, atom_cmpxchg, atomic_xchg, or atomic_cmpxchg.  Other atomic functions work fine.  Can anyone shed some light on this?

#pragma OPENCL EXTENSION cl_khr_global_int32_base_atomics : enable __kernel void Test(volatile __global int *output) { atom_xchg(output, 0); }