aclmdlGetDescFromFile

Applicability

Product

Supported

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

√

Description

Obtains model description based on the model file.

The model description obtained using this API cannot be applied to the aclmdlGetOpAttr or aclmdlGetCurOutputDims API.

Prototype

aclError aclmdlGetDescFromFile(aclmdlDesc *modelDesc, const char *modelPath)

Parameters

Parameter

Input/Output

Description

modelDesc

Output

Pointer to data of the aclmdlDesc type.

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

modelPath

Input

Pointer to the model file path, which contains the file name. The user who runs the app must have enough permission to access the directory.

The .om file is an offline model adapted to the Ascend AI Processor. For details about how to obtain the .om file, see "Command-Line Options" > "Basic Options" > "General Options" > "--mode" in ATC Instructions.

Returns

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