aclmdlGetFirstAippInfo

Description

Obtains the AIPP (static or dynamic) configuration of a model.

AIPP provides the following functions and they are executed in the exact sequence: Cropping -> CSC -> Resizing (not supported currently) -> Mean subtraction/Normalization -> Padding

Restrictions

To obtain the dynamic AIPP configuration, this API call returns the values of only the following parameters in the aclAippInfo struct: srcFormat, srcDatatype, srcDimNum, shapeCount, and outDims.

Prototype

aclError aclmdlGetFirstAippInfo(uint32_t modelId, size_t index, aclAippInfo *aippInfo)

Parameters

Parameter

Input/Output

Description

modelId

Input

Model ID.

A successful aclmdlLoadFromFile, aclmdlLoadFromMem, aclmdlLoadFromFileWithMem, or aclmdlLoadFromMemWithMem call returns a model ID.

index

Input

Index of the model input.

aippInfo

Output

Pointer to AIPP configuration.

For details, see AIPP Enable in ATC Instructions.

Returns

The value 0 indicates success, and other values indicate failure. For details, see aclError.