cuOccupancyMaxPotentialBlockSize for 2/3D calculations.

Hello,

does cuOccupancyMaxPotentialBlockSize also support 2- or 3-dimensional calculations? Since most of our tasks is 2/3D it would be very helpful to extend cuOccupancyMaxPotentialBlockSize to also have 2/3D options.

Thanks
Martin

For occupancy purposes, I don’t think it’s going to matter. The value returned in *blockSize can be used to predict a useful threadblock size whether in 1, 2, or 3D. Likewise, minGridSize suggests a number of blocks. For the purposes that this function is intended, it should not matter whether those blocks are launched in a 1D, 2D, or 3D grid.

Hi txbob,

that’s for sure right. I was only hoping that I can hand over a dimension to the function (e.g. width and height of an image) and get the appropriate block and grid back. Since for each function it really matters how much threads can run in each block this is really hard to calculate, even if it’s going further into the 3rd dimension where it is not always sure that the card supports the Z-dimension.

I have currently made my own function for this, but I would prefer some solution from the nvidia side, because they might know much better how I have to align my grid.