I'm trying to launch a kernel using the CUDA driver API. Specifically I'm calling
CUresult CUDAAPI cuLaunchKernel(
CUfunction f,
unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ,
unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ,
unsigned int sharedMemBytes,
CUstream hStream,
void **kernelParams,
void **extra);
I'm only using kernelParams
, and passing nullptr
for extra
. Now, for one of my kernels, I get CUDA_ERROR_INVALID_VALUE
.
The documentation says:
The error
CUDA_ERROR_INVALID_VALUE
will be returned if kernel parameters are specified with bothkernelParams
andextra
(i.e. bothkernelParams
andextra
are non-NULL
).
well, I'm not doing that, and am still getting CUDA_ERROR_INVALID_VALUE
. To be extra-safe, I synch'ed the stream right before launching the kernel - but to no avail.
What are the other reasons for getting CUDA_ERROR_INVALID_VALUE
when trying to launch?