 <p>A couple of random suggestions to experiment:</p> <ul> <li><p>early return should be used with caution when there is a barrier later: <strong>all</strong> work items in a work group should execute the barrier, and your kernel will hang if some work items already returned.</p></li> <li><p>texture cache in this context is usually at least as fast as local memory. Try replacing s0,...,s8 initialization with simple read_imagef calls. Then experiment with different work group dimensions.</p></li> </ul> <p>On what hardware are you running?</p>