aclmdlGetDescFromFile

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 model description based on the model file.

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

Prototype

1
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 application must have enough permission to access the directory.

The model file is an OM model file. For details about how to obtain the OM model file, see "Command-Line Options > Basic Options > General Options > --mode" in the Ascend Tensor Compiler (ATC).

Returns

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