title: How does a GPU group threads into warps/wavefronts?
body: <p>My understanding is that warp is a group of threads that defined at runtime through the task scheduler, one performance critical part of CUDA is the divergence of threads within a warp, is there a way to make a good guess of how the hardware will construct warps within a thread block? </p>
  
  <p>For instance I have start a kernel with 1024 threads in a thread block, how is the warps be arranged, can I tell that (or at least make a good guess) from the thread index?</p>
  
  <p>Since by doing this, one can minimize the divergence of threads within a given warp.</p>