I definitelly can't understand why is rowsPerWI not a compiler definition. Compiler contant definition will help OpenCL compiler to generate more optmized code.