aclmdlGetDynamicHW

Applicable Products

Product

Supported

Ascend 950PR/Ascend 950DT

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

Function Usage

Obtains the dynamic image size information supported by a model based on the model description.

Prototype

1
aclError aclmdlGetDynamicHW(const aclmdlDesc *modelDesc, size_t index, aclmdlHW *hw)

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.

hw

Output

const int ACL_MAX_HW_NUM = 128;
typedef struct aclmdlHW {
    size_t hwCount; /**Number of image size profiles supported by the model*/
    uint64_t hw[ACL_MAX_HW_NUM][2]; /**Image size profiles. In each profile, element 0 indicates the height, and element 1 indicates the width.*/
} aclmdlHW;

If hwCount is 0, dynamic image size is not supported. The image size defined in the model applies.

Returns

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