NVIDIA DriveOS Linux NSR SDK API Reference

7.0.3.0 Release
dwDNNTensorProperties Struct Reference

Detailed Description

Specifies DNNTensor properties.

Definition at line 79 of file Tensor.h.

Data Fields

dwTrivialDataType dataType
 Data type of elements of the tensor. More...
 
dwDNNTensorType tensorType
 Tensor type. More...
 
dwDNNTensorLayout tensorLayout
 Tensor layout. More...
 
bool isGPUMapped
 Indicates whether the memory allocation should be mapped to GPU. More...
 
uint32_t numDimensions
 Number of dimensions of the tensor. More...
 
uint32_t dimensionSize [DW_DNN_TENSOR_MAX_DIMENSIONS]
 Dimensions of the tensor to match the selected layout type. More...
 
dwDNNTensorColorSpace colorSpace
 Color space of the data in the tensor. More...
 
float32_t dynamicRange [2]
 Tensor scale value for reformatting fro m higher precision to lower precision. Values are min and max of dynamic range. More...
 

Field Documentation

◆ colorSpace

dwDNNTensorColorSpace dwDNNTensorProperties::colorSpace

Color space of the data in the tensor.

Definition at line 102 of file Tensor.h.

◆ dataType

dwTrivialDataType dwDNNTensorProperties::dataType

Data type of elements of the tensor.

Definition at line 82 of file Tensor.h.

◆ dimensionSize

uint32_t dwDNNTensorProperties::dimensionSize[DW_DNN_TENSOR_MAX_DIMENSIONS]

Dimensions of the tensor to match the selected layout type.

The order of dimensions is defined by the dwDNNTensorLayout by reading the last suffix of DW_DNN_TENSOR_LAYOUT_... in reverse order. For example given DW_DNN_TENSOR_LAYOUT_NCHW, dimensionSize should be set to: [0] = width, [1] = height, [2] = number of channels and [3] = batch size.

Note
Use dwDNNTensor_getLayoutView() to traverse the tensor in order to avoid having to compute the stride and offset for each dimension.

Definition at line 100 of file Tensor.h.

◆ dynamicRange

float32_t dwDNNTensorProperties::dynamicRange[2]

Tensor scale value for reformatting fro m higher precision to lower precision. Values are min and max of dynamic range.

Definition at line 104 of file Tensor.h.

◆ isGPUMapped

bool dwDNNTensorProperties::isGPUMapped

Indicates whether the memory allocation should be mapped to GPU.

This allocates memory using cudaHostAlloc with cudaHostAllocMapped flag. This argument is only valid if tensor type is DW_DNN_TENSOR_TYPE_CPU or DW_DNN_TENSOR_TYPE_CUDA.

Definition at line 90 of file Tensor.h.

◆ numDimensions

uint32_t dwDNNTensorProperties::numDimensions

Number of dimensions of the tensor.

Definition at line 92 of file Tensor.h.

◆ tensorLayout

dwDNNTensorLayout dwDNNTensorProperties::tensorLayout

Tensor layout.

Definition at line 86 of file Tensor.h.

◆ tensorType

dwDNNTensorType dwDNNTensorProperties::tensorType

Tensor type.

Definition at line 84 of file Tensor.h.


The documentation for this struct was generated from the following file: