# vkCreateCudaModuleNV(3) Manual Page

## Name

vkCreateCudaModuleNV - Creates a new CUDA module object

Loading… please wait.

## C Specification

To create a CUDA module, call:

    // Provided by VK_NV_cuda_kernel_launch
    VkResult vkCreateCudaModuleNV(
        VkDevice                                    device,
        const VkCudaModuleCreateInfoNV*             pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkCudaModuleNV*                             pModule);

## Parameters

- `device` is the logical device that creates the shader module.

- `pCreateInfo` is a pointer to a VkCudaModuleCreateInfoNV structure.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pModule` is a pointer to a VkCudaModuleNV handle in which the resulting CUDA module object is returned.

## Description

Once a CUDA module has been created, the application may create the function entry point, which must refer to one function in the module.

Valid Usage (Implicit)

- VUID-vkCreateCudaModuleNV-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateCudaModuleNV-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkCudaModuleCreateInfoNV structure

- VUID-vkCreateCudaModuleNV-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateCudaModuleNV-pModule-parameter
  `pModule` must be a valid pointer to a VkCudaModuleNV handle

Return Codes

On success, this command returns

  - `VK_SUCCESS`

On failure, this command returns

  - `VK_ERROR_INITIALIZATION_FAILED`

  - `VK_ERROR_OUT_OF_HOST_MEMORY`

## See Also

VK_NV_cuda_kernel_launch, VkAllocationCallbacks, VkCudaModuleCreateInfoNV, VkCudaModuleNV, VkDevice

## 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.

## Copyright

Copyright 2014-2024 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0