Notes CUDA
Notes for CUDA
- 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);
- Un-initialized dimension (.x, .y, .z) is set to 1 by default.
- Don’t do this:
dim3 grid = (1024, 8); // !!!! Wrongly initialised values!!!!