aclmdlGetDescFromMem

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

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

Prototype

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.

In Ascend EP form, allocate memory on the host.

In Ascend RC form, allocate memory on the device.

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

For details about the memory allocation APIs, see Memory Management.

modelSize

Input

Size of the model in the memory, in bytes.

Returns

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