ONNX Runtime
Loading...
Searching...
No Matches
OrtExternalTensorDescriptor Struct Reference

Descriptor for creating a tensor from imported external memory. More...

#include <onnxruntime_c_api.h>

Public Attributes

uint32_t version
 
ONNXTensorElementDataType element_type
 
const int64_t * shape
 
size_t rank
 
size_t offset_bytes
 

Detailed Description

Descriptor for creating a tensor from imported external memory.

Note
The version field must be set to ORT_API_VERSION. This ensures forward compatibility as fields may be added in future versions.
Since
Version 1.24.

Member Data Documentation

◆ element_type

ONNXTensorElementDataType OrtExternalTensorDescriptor::element_type

Data type of tensor elements

◆ offset_bytes

size_t OrtExternalTensorDescriptor::offset_bytes

Additional offset within imported memory (default 0). Applied relative to OrtExternalMemoryDescriptor::offset_bytes. Enables multiple tensors from the same imported memory handle.

◆ rank

size_t OrtExternalTensorDescriptor::rank

Number of dimensions

◆ shape

const int64_t* OrtExternalTensorDescriptor::shape

Array of dimension sizes

◆ version

uint32_t OrtExternalTensorDescriptor::version

Must be ORT_API_VERSION