aclmdlGetDescFromMem

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

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

Prototype

1
aclError aclmdlGetDescFromMem(aclmdlDesc *modelDesc, const void *model, size_t modelSize)

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.

model

Input

Pointer to the memory address for storing model data

modelSize

Input

Size of the model in the memory, in bytes

Returns

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

Restrictions

In Ascend EP form, allocate memory on the host for model.

In Ascend RC form, allocate memory on the device for model.

In Open Ctrl CPU form form, allocate memory on the device for model.