aclmdlGetDatasetTensorDesc

The Atlas 200/300/500 Inference Product does not support this API.

Description

Obtains the tensor description of the specified input or output from the data of the aclmdlDataset type (used to describe the input and output data during model inference) after the model is executed if the input or output shape of a model is dynamic.

Typical scenario: If the input shape of a model is dynamic, call aclmdlSetDatasetTensorDesc to set the tensor description before the model is executed. After the model is executed, call aclmdlGetDatasetTensorDesc to obtain the tensor description of the dynamic output of the model.

Prototype

aclTensorDesc *aclmdlGetDatasetTensorDesc(const aclmdlDataset *dataset, size_t index)

Parameters

Parameter

Input/Output

Description

dataset

Input

Pointer to the input or output data for model execution.

index

Input

Input or output index.

When a model has multiple inputs and outputs, call aclmdlGetInputNameByIndex or aclmdlGetOutputNameByIndex to obtain the input or output names and set the index accordingly.

Returns

Tensor description of the specified input or output.

See Also

For the API call example, see Dynamic Shape Input (Setting the Shape Range).