opencl: debugging and fixing along the way