CL_INVALID_COMMAND_QUEUE error on clFinish command - a lot of operations in each kernel driver crash

My guess is that the kernel execution for all work items takes so much time (by the way, local worksize 1 is really bad one) that the system resets video driver.