# Size limit of parameter list

**URL:** <https://forums.developer.nvidia.com/t/size-limit-of-parameter-list/3872>\
**Category:** CUDA Programming and Performance\
**Created:** [May 28, 2008, 2:05pm UTC](https://forums.developer.nvidia.com/t/size-limit-of-parameter-list/3872 "2008-05-28T14:05:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mu-Chi\_Sung](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Mu-Chi\_Sung](https://forums.developer.nvidia.com/u/Mu-Chi_Sung)\
**Post date:** [May 28, 2008, 2:05pm UTC](https://forums.developer.nvidia.com/t/size-limit-of-parameter-list/3872/1 "2008-05-28T14:05:28Z")

</div>

Hi,

I ran into a weird situation/limit that a cuda global function does not get executed if too many parameters passed to the function. This is reasonable, since it’s not possible to have infinite space for parameter list. But I didn’t expect it to be so small and also it does not return any error message (just success) to help me idenify the problem. Furthermore, the not-runnable code is still generated by nvcc without any warning. It takes me several hours to find out, and honestly it’s pretty depressing to see such bug or limit.

In my experiment, I found that the size limit of parameter list is only 256 bytes. As each device pointer takes 8bytes, I can only have 32 device pointers passed to a global function, which is very limited. I didn’t find such info on the programming guide, so I would like to suggest you to include that info.

On the other hand, since device functions are inlined, or said assembled in the same ptx program, I think the limit does not exist, is that right?

The limit is observed on CUDA 2.0 beta on a 64bit ubuntu.

---

<div class="post-metadata">

**Author:** ![eirik](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@eirik](https://forums.developer.nvidia.com/u/eirik)\
**Post date:** [May 28, 2008, 4:26pm UTC](https://forums.developer.nvidia.com/t/size-limit-of-parameter-list/3872/2 "2008-05-28T16:26:45Z")

</div>

In the programming guide (version 1.1, page 33) the following is stated:  
**global** function parameters are currently passed via shared memory to the device and limited to 256 bytes.

---

<div class="post-metadata">

**Author:** ![Mu-Chi\_Sung](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Mu-Chi\_Sung](https://forums.developer.nvidia.com/u/Mu-Chi_Sung)\
**Post date:** [May 28, 2008, 11:34pm UTC](https://forums.developer.nvidia.com/t/size-limit-of-parameter-list/3872/3 "2008-05-28T23:34:34Z")

</div>

> [@](#):
>
> In the programming guide (version 1.1, page 33) the following is stated:
> 
> **global** function parameters are currently passed via shared memory to the device and limited to 256 bytes.
> 
> [snapback]384801[/snapback]

I see. Sorry I didn’t read it very carefully. But I think it’s still needed to provide some warning or error message while compiling the code.

Thanks!

---

<div class="post-metadata">

**Author:** ![eirik](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@eirik](https://forums.developer.nvidia.com/u/eirik)\
**Post date:** [May 29, 2008, 5:05pm UTC](https://forums.developer.nvidia.com/t/size-limit-of-parameter-list/3872/4 "2008-05-29T17:05:42Z")

</div>

> [@](#):
>
> But I think it’s still needed to provide some warning or error message while compiling the code.
> 
> [snapback]385108[/snapback]

I totally agree!
