While loop in cuda kernel

Hello guyz,

Now, I am struggling with several cuda usage issue but I’ve solved some of them well. However, I am using a while loop inside a 3D (x,y,z) kernel and whenever this loop is added into it, i see that my BlockIdx.y is limited up to 5 instead of 44. Is there a limitation of while loop usage inside a cuda kernel?

gridDim.x = 30,
gridDim.x = 44,
gridDim.x = 2,

BlockDim.x = 1,
BlockDim.y = 1,
BlockDim.z = 32,

Never mind ! I solved it now. There is no issue correlation between the while loop usage and the threads. My code was designed with a while which does not allow all threads to perform through the kernel. I was not aware about the limited number of simultaneous threads which can be launched.

Thanks you :)