aclmdlGetAttribute

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 model attribute value.

Prototype

1
aclError aclmdlGetAttribute(uint32_t modelId, aclmdlAttr attr, aclmdlAttrValue_t *attrValue)

Parameters

Parameter

Input/Output

Description

modelId

Input

Model ID.

After a model loading API (such as aclmdlLoadFromFile or aclmdlLoadFromMem.) is successfully called, the model ID is returned. This ID is used as the input of this API.

attr

Input

Attribute to set. For details about the type definition, see aclmdlAttr.

attrValue

Output

Pointer to the attr value to set. For details about the type definition, see aclmdlAttrValue_t.

Returns

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