C Specification
The VkCudaLaunchInfoNV structure is very close to the parameters of
the CUDA-Driver function
cuLaunchKernel
documented in section
6.19
Execution Control of CUDA Driver API.
The structure is defined as:
// Provided by VK_NV_cuda_kernel_launch
typedef struct VkCudaLaunchInfoNV {
VkStructureType sType;
const void* pNext;
VkCudaFunctionNV function;
uint32_t gridDimX;
uint32_t gridDimY;
uint32_t gridDimZ;
uint32_t blockDimX;
uint32_t blockDimY;
uint32_t blockDimZ;
uint32_t sharedMemBytes;
size_t paramCount;
const void* const * pParams;
size_t extraCount;
const void* const * pExtras;
} VkCudaLaunchInfoNV;
Members
-
sTypeis a VkStructureType value identifying this structure. -
pNextisNULLor a pointer to a structure extending this structure. -
functionis the CUDA-Driver handle to the function being launched. -
gridDimXis the number of local workgroups to dispatch in the X dimension. It must be less than or equal toVkPhysicalDeviceLimits::maxComputeWorkGroupCount[0] -
gridDimYis the number of local workgroups to dispatch in the Y dimension. It must be less than or equal toVkPhysicalDeviceLimits::maxComputeWorkGroupCount[1] -
gridDimZis the number of local workgroups to dispatch in the Z dimension. It must be less than or equal toVkPhysicalDeviceLimits::maxComputeWorkGroupCount[2] -
blockDimXis block size in the X dimension. -
blockDimYis block size in the Y dimension. -
blockDimZis block size in the Z dimension. -
sharedMemBytesis the dynamic shared-memory size per thread block in bytes. -
paramCountis the length of thepParamstable. -
pParamsis a pointer to an array ofparamCountpointers, corresponding to the arguments offunction. -
extraCountis reserved for future use. -
pExtrasis reserved for future use.
Description
Kernel parameters of function are specified via pParams, very
much the same way as described in
cuLaunchKernel
If function has N parameters, then pParams must be an array of
N pointers and paramCount must be N. Each of kernelParams[0]
through kernelParams[N-1] must point to a region of memory from which
the actual kernel parameter will be copied.
The number of kernel parameters and their offsets and sizes are not
specified here as that information is stored in the VkCudaFunctionNV
object.
The application-owned memory pointed to by pParams and
kernelParams[0] through kernelParams[N-1] are consumed
immediately, and may be altered or freed after
vkCmdCudaLaunchKernelNV has returned.
Document Notes
For more information, see the Vulkan Specification
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.