aclmdlGetDynamicHW

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 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.