Hello forum,
Is there any difference between tile and block concept ?
I am following the book “Programming massively parallel processors” and in section 4.2 the block size is assumed to be TILE_WIDTH.
But when i go through the cuda fluid example, they did something different.
Could someone in the forum put more light into this idea ? - block width and tile width.
Thanks
Sajjad
This is confusing. What is a tile? There is no mentioned of tiles in the CUDA Programming Guide. The size of a block is chosen based on problems.
Let me put down the snippet from the book and please explain it for me - TILE_WIDTH specially.
Does this basically mean width of the block?
__global__ void matrixmult(float *Md, float *Nd, float *Pd,int width)
{
int row = blockIdx.y * TILE_WIDTH + threadIdx.y;
int column = blockIdx.x * TILE_WIDTH + threadIdx.x;
......................
.....................
}
Regards
Sajjad
The TILE_WIDTH is a variable he defined for a specific problem. It is not a CUDA variable. For the blocks you have the intrinsec variables: threadIdx.x, blockIdx.x,BlockDim.x, GridDim.x. No TILE_WIDTH. For each problem you define the the number of threads per block as it suits you.