C Specification

To create tensors, call:

// Provided by VK_ARM_tensors
VkResult vkCreateTensorARM(
    VkDevice                                    device,
    const VkTensorCreateInfoARM*                pCreateInfo,
    const VkAllocationCallbacks*                pAllocator,
    VkTensorARM*                                pTensor);

Parameters

  • device is the logical device that creates the tensor.

  • pCreateInfo is a pointer to a VkTensorCreateInfoARM structure containing parameters to be used to create the tensor.

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

  • pTensor is a pointer to a VkTensorARM handle in which the resulting tensor object is returned.

Description

Valid Usage
  • VUID-vkCreateTensorARM-tensors-09832
    The tensors feature must be enabled

Valid Usage (Implicit)
  • VUID-vkCreateTensorARM-device-parameter
    device must be a valid VkDevice handle

  • VUID-vkCreateTensorARM-pCreateInfo-parameter
    pCreateInfo must be a valid pointer to a valid VkTensorCreateInfoARM structure

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

  • VUID-vkCreateTensorARM-pTensor-parameter
    pTensor must be a valid pointer to a VkTensorARM handle

  • VUID-vkCreateTensorARM-device-queuecount
    The device must have been created with at least 1 queue

Return Codes
On success, this command returns
  • VK_SUCCESS

On failure, this command returns
  • VK_ERROR_OUT_OF_HOST_MEMORY

  • VK_ERROR_OUT_OF_DEVICE_MEMORY

See Also

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 2014-2025 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0