fixed some opencl bugs in image gradient on amd platform