Before undrestanding the code, we need to understand some basic structure/architecture of GPU and how code is matched with that.

image.png

Grid = Collection of Blocks

grids : 1 2 or 3