currently I’m trying to implement a spin lock to manage access on local memory. As far as I understand the whole thing the following code should just do that:
#pragma OPENCL EXTENSION cl_khr_local_int32_base_atomics : enable
function()
{
local_lock_p[0] is initialized to 0 and is located in local memory
//try to aquire a spin lock
while(atom_xchg(local_lock_p,1,1) ) {};
[...do something]
//return lock
atom_xchg(local_lock_p,1,0);
}
But now I’m getting the following error:
sm_11 does not support intrinsic %llvm.ptx.atom.cmpxchg.l.ii
How else am I supposed to implement the spin lock (or any other lock) if I can’t use atomic operations?
Driver is 197.59, GPU is Quadro FX 3700. Is this solved with a newer driver version, I’d prefer to keep the old one atm since I’m sharing the workstation with others.