Notes for CUDA

  1. Setting grid and block dimensions
    • Un-initialized dimension (.x, .y, .z) is set to 1 by default.
       dim3 grid (1024, 8);
       dim3 block (512, 1);
       myKernel<<<grid, block>>>(d_data);
      
  2. Don’t do this:
     dim3 grid = (1024, 8); // !!!! Wrongly initialised values!!!!