kernel ends abruptly due to execution configuration

I have a kernel that i want to call, but for some reason it doesnt get called if i dim my thread config to greater than 15x15

This kernel works fine on a execution configuration of 10x10 threads and 10x10 blocks:

dim3 dimBlock(10,10);

dim3 dimGrid(10,10);

The problem happens when i try to use more threads:

dim3 dimBlock(30,30);

dim3 dimGrid(10,10);

I can dim as many blocks as i want, i just cant dim the threads past 15

The funny thing is that i can configure the kernel a different way, using only the x dimensions, e.g. i can do <<<300,300>>> with no worries, but i have to use the dim3 variables because my algorithm depends on two dimensional threads and two dimensional blocks.

Can anyone think as to why associating more threads to a kernel would make it cease executing?

Ive spent hours on this and have gotten no-where.

Your help would be much appreciated

A 30x30 block of threads means that each block contains 900 threads, which is greater than the maximum allowed number of threads per block.

Not sure why you can’t go past a 15x15 block of threads though, unless you are adding a third dimension in there. The max number of threads in any given block is 512, regardless of how your thread block is structured. By the way, there is a limit on the dimension of the grid as well: 65535x65535. You probably just haven’t experimented with numbers that large yet… just for future reference in case you run into this again.

oh man, do i feel silly!

thanks heaps for your help