aclmdlRIBuildBegin

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

Starts building a model running instance.

After aclmdlRIBuildBegin is called, call aclmdlRIBindStream to bind the model running instance to a specified stream, and then deliver tasks to the stream. After all tasks are delivered, call aclmdlRIEndTask to mark the end of task delivery on the stream, and then call aclmdlRIBuildEnd to end model building. In this case, all tasks delivered to the specified stream are not executed immediately. They are executed only when aclmdlRIExecute or aclmdlRIExecuteAsync is called to run model inference.

After all tasks are executed, if the model runtime instance is no longer used, call aclmdlRIUnbindStream to unbind it from the stream. If necessary, call aclmdlRIDestroy to destroy the resource.

Prototype

aclError aclmdlRIBuildBegin(aclmdlRI *modelRI, uint32_t flag)

Parameters

Parameter

Input/Output

Description

modelRI

Input

Running instance of the model that is used to temporarily store the compiled tasks.

flag

Input

Reserved. The value is fixed at 0.

Returns

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