Formal parameter list size limit?


I’ve written a fairly simple kernel - but it takes a rather large set of parameters, to be precise - it takes 272 bytes of parameters.

Upon calling cuParamSetSize, it throws a CUDA_ERROR_INVALID_VALUE error - with a valid function handle…

Of course - the documentation is once again lacking, and doesn’t identify under what conditions the error codes will present themselves, nor a size limit on the formal parameter list…

So, my question is - ‘is’ there a size limit on the format parameter list?
If so, can it be documented.
If not, is this a bug?


Windows XP, 181.20, CUDA 2.0/2.1

Yes and it’s 256 bytes. It is documented on page 29:

Actually, it does.

If you need to pass 272 bytes to a kernel, I would wrap them up in a structure and store them in a constant variable with cudaMemcpyToSymbol(). There won’t be any significant performance penalty vs what the standard parameter passing method would have done.

Hmm, why is the documentation under type qualification? anyway, I seem to have missed it because I was searching for ‘formal parameter’…

Thanks for the advice. :)