aclmdlGetInputDynamicGearCount

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product / Atlas A3 inference product

Atlas A2 training product / Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

Function Usage

Obtains the number of dynamic dimension profiles supported by a model based on the model description.

Prototype

1
aclError aclmdlGetInputDynamicGearCount(const aclmdlDesc *modelDesc, size_t index, size_t *gearCount)

Parameters

Parameter

Input/Output

Description

modelDesc

Input

Pointer to data of the aclmdlDesc type.

Call aclmdlCreateDesc to create data of the aclmdlDesc type in advance.

index

Input

Reserved. The value is fixed to –1.

gearCount

Output

Pointer to the number of dynamic dimension profiles.

For example, if the input tensor of a model is 4-dimensional and the dimension size profiles specified by the --dynamic_dims parameter for model conversion are 1,3,224,224;2,3,224,224;1,3,256,256, the number of dynamic dimension profiles obtained by this API call is 3.

Returns

0 on success; else, failure. For details, see aclError.

Restrictions

If no dynamic dimension profile is set during model build, this API call returns 0 dynamic dimension profiles. For details about model build, see Build the model.