# Error when using dynamic parallelism with six or more arguments

**URL:** <https://discourse.julialang.org/t/error-when-using-dynamic-parallelism-with-six-or-more-arguments/44931>\
**Category:** GPU\
**Created:** [August 14, 2020, 1:22pm UTC](https://discourse.julialang.org/t/error-when-using-dynamic-parallelism-with-six-or-more-arguments/44931 "2020-08-14T13:22:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![emiwar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/emiwar/32/215517_2.png) [@emiwar](https://discourse.julialang.org/u/emiwar)\
**Post date:** [August 14, 2020, 1:22pm UTC](https://discourse.julialang.org/t/error-when-using-dynamic-parallelism-with-six-or-more-arguments/44931/1 "2020-08-14T13:22:50Z")

</div>

Hi,

I’m getting an error (`unsupported dynamic function invocation`) when I run

```julia
manyArgs(a, b, c, d, e, f) = nothing
caller() = (@CUDA.cuda dynamic=true manyArgs(1,2,3,4,5,6); nothing)
@CUDA.cuda caller()

```

while

```julia
manyArgs(a, b, c, d, e) = nothing
caller() = (@CUDA.cuda dynamic=true manyArgs(1,2,3,4,5); nothing)
@CUDA.cuda caller()

```

runs fine. Is there a limitation on the number of arguments I can pass when starting child kernels?

Thanks

---

<div class="post-metadata">

**Author:** ![maleadt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maleadt/32/10097_2.png) [@maleadt](https://discourse.julialang.org/u/maleadt)\
**Post date:** [August 14, 2020, 7:50pm UTC](https://discourse.julialang.org/t/error-when-using-dynamic-parallelism-with-six-or-more-arguments/44931/2 "2020-08-14T19:50:34Z")

</div>

Apparently that code doesn’t get inferred completely, causing it to fail to compile. You can open an issue, but with the current Julia compiler it might be hard to fix.
