aclmdlBundleLoadModel

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product / Atlas A3 inference product

Atlas A2 training product / Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

Function Usage

Loads a graph from the model based on the graph index. The memory is managed by the system.

Prototype

1
aclError aclmdlBundleLoadModel(uint32_t bundleId, size_t index, uint32_t *modelId)

Parameters

Parameter

Input/Output

Description

bundleId

Input

Bundle ID returned after the model is successfully initialized by calling aclmdlBundleInitFromFile or aclmdlBundleInitFromMem.

index

Input

Index.

After aclmdlBundleGetQueryModelNum is called to obtain the total number of graphs, the value range of the index is [0, total_number_of_graphs – 1].

modelId

Output

ID of the executable graph.

Returns

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

Example

For details about the API call sequence and sample code, see Weight update (user-managed memory).