title: OpenCL - Are work-group axes exchangeable?
body: <p>I was trying to find the best work-group size for a problem and I figured out something that I couldn't justify for myself.</p>
  
  <p>These are my results :</p>
  
  <ul>
  <li>GlobalWorkSize {6400 6400 1}, WorkGroupSize {64 4 1}, Time(Milliseconds) = 44.18</li>
  <li>GlobalWorkSize {6400 6400 1}, WorkGroupSize {4 64 1}, Time(Milliseconds) = 24.39</li>
  </ul>
  
  <p>Swapping axes caused a twice faster execution. Why !?</p>
  
  <p>By the way, I was using an AMD GPU.</p>
  
  <p>Thanks :-)</p>
  
  <p><strong>EDIT :</strong>
  This is the kernel (a Simple Matrix Transposition):</p>
  
  <pre><code>__kernel void transpose(__global float *input, __global float *output, const int size){
      int i = get_global_id(0);
      int j = get_global_id(1);
      output[i*size + j] = input[j*size + i];
  }
  </code></pre>