Kernal not starting silently

I’m having some difficulty figuring out why my Kernal isn’t starting. It doesn’t seem to be throwing up any errors overtly. Is there a way to get it to output why the kernal may not be starting? Or force it to not fail silently? The call look something like this and it just jumps to otherStuff without any kind of message or failure.

simplified example of what it looks like
type(dim3) :: blocks3D, threads3D
blocks3D = dim3(1, 1, 1)
threads3D = dim3(50,50,1)
call DoStuff<<<blocks3d, threads3D>>>(blah)
call otherStuff

As a CUDA programmer you are responsible for checking on the status of kernels. For a quick check, run your application under the control of cuda-memcheck.

There are at least 2 approaches. You could:

  1. Run your code with cuda-memcheck (or, similarly, with compute-sanitizer)
  2. Add proper CUDA error checking

I know the status of it, it’s just not saying anything. Regardless I found the tool I was looking for, it was cudaGetLastError, I had forgotten what it was called.

cudaGetLastError is only part of the story if you want it to “say anything”. A kernel can fail in two ways: (1) An error is detected, synchronously, pre-launch. (2) An error occurs, asynchronously, post-launch, while the kernel is executing on the device.