# how to use cudaLaunch?

**URL:** <https://forums.developer.nvidia.com/t/how-to-use-cudalaunch/9576>\
**Category:** CUDA Programming and Performance\
**Created:** [May 19, 2009, 5:12pm UTC](https://forums.developer.nvidia.com/t/how-to-use-cudalaunch/9576 "2009-05-19T17:12:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_Tom](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@\_Tom](https://forums.developer.nvidia.com/u/_Tom)\
**Post date:** [May 19, 2009, 5:12pm UTC](https://forums.developer.nvidia.com/t/how-to-use-cudalaunch/9576/1 "2009-05-19T17:12:27Z")

</div>

Hi,  
short version first:  
cudaLaunch lacks any documentation, and i don’t have any clue of what to pass to it…

long version:  
i tried to wrap the cudalaunch interface into a C++ object, to allow high-level launches of kernels…  
my idea was to use strings as kernel names to have an higher flexibilty, but i couldn’t find any example of the string’s format…  
-passing name didn’t work  
-passing the name + “\_\_entry” didn’t work  
-passing the extended bin name didn’t work…

I found anyway many examples for cuLaunchGrid, but i don’t think it’s good habit to mix “high” and driver-level APIs…

Thanks in advance for any clues! [External Image](http://hqnveipbwb20/public/style_emoticons/<#EMO_DIR#>/thumbup.gif "Image hosted on another site. Click to open in a new tab.")

---

<div class="post-metadata">

**Author:** ![navier-stokes](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/navier-stokes/32/9814_2.png) [@navier-stokes](https://forums.developer.nvidia.com/u/navier-stokes)\
**Post date:** [May 20, 2009, 6:22am UTC](https://forums.developer.nvidia.com/t/how-to-use-cudalaunch/9576/2 "2009-05-20T06:22:58Z")

</div>

> [@](#):
>
> Hi,
> 
> short version first:
> 
> cudaLaunch lacks any documentation, and i don’t have any clue of what to pass to it…
> 
> long version:
> 
> i tried to wrap the cudalaunch interface into a C++ object, to allow high-level launches of kernels…
> 
> my idea was to use strings as kernel names to have an higher flexibilty, but i couldn’t find any example of the string’s format…
> 
> -passing name didn’t work
> 
> -passing the name + “\_\_entry” didn’t work
> 
> -passing the extended bin name didn’t work…
> 
> I found anyway many examples for cuLaunchGrid, but i don’t think it’s good habit to mix “high” and driver-level APIs…
> 
> Thanks in advance for any clues! [External Media](http://hqnveipbwb20/public/style_emoticons/<#EMO_DIR#>/thumbup.gif "Media hosted on another site. Click to open in a new tab.")

Hi,

what is the content of the cudaError\_t after the launch failed? It can be one of

```auto
cudaSuccess, cudaErrorInvalidDeviceFunction, cudaErrorInvalidConfiguration

```

Regards

Navier

---

<div class="post-metadata">

**Author:** ![\_Tom](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@\_Tom](https://forums.developer.nvidia.com/u/_Tom)\
**Post date:** [May 20, 2009, 8:59am UTC](https://forums.developer.nvidia.com/t/how-to-use-cudalaunch/9576/3 "2009-05-20T08:59:13Z")

</div>

> [@](#):
>
> Hi,
> 
> what is the content of the cudaError\_t after the launch failed? It can be one of
> 
> ```auto
> cudaSuccess, cudaErrorInvalidDeviceFunction, cudaErrorInvalidConfiguration
> 
> ```
> 
> Regards
> 
> Navier

Ah right i forgot to mention it… it is cudaErrorInvalidDeviceFunction.

The function works fine if called with the \<\<\<\>\>\> syntax.

---

<div class="post-metadata">

**Author:** ![\_Tom](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@\_Tom](https://forums.developer.nvidia.com/u/_Tom)\
**Post date:** [May 20, 2009, 9:14pm UTC](https://forums.developer.nvidia.com/t/how-to-use-cudalaunch/9576/4 "2009-05-20T21:14:09Z")

</div>

Any ideas? :blink:

---

<div class="post-metadata">

**Author:** ![tmurray](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@tmurray](https://forums.developer.nvidia.com/u/tmurray)\
**Post date:** [May 20, 2009, 10:21pm UTC](https://forums.developer.nvidia.com/t/how-to-use-cudalaunch/9576/5 "2009-05-20T22:21:22Z")

</div>

I bet it’s name mangling! Add extern “C” around your kernel prototype and watch it magically work…

---

<div class="post-metadata">

**Author:** ![\_Tom](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@\_Tom](https://forums.developer.nvidia.com/u/_Tom)\
**Post date:** [May 20, 2009, 10:40pm UTC](https://forums.developer.nvidia.com/t/how-to-use-cudalaunch/9576/6 "2009-05-20T22:40:56Z")

</div>

> [@](#):
>
> I bet it’s name mangling! Add extern “C” around your kernel prototype and watch it magically work…

It did magically work [External Media](http://hqnveipbwb20/public/style_emoticons/<#EMO_DIR#>/thumbup.gif "Media hosted on another site. Click to open in a new tab.")

I already got it to work without it, but looking in the .cubin and using names like “\_Z21rasterizePointsKernelP6uchar35uint2P6float3Pf” wasn’t the same thing.

Thanks!
