aclmdlRIBuildBegin
Applicable Products
Product |
Supported |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function
Starts building a model running instance.
After aclmdlRIBuildBegin is called, call aclmdlRIBindStream to bind the model running instance to a 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 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 running instance is no longer used, call aclmdlRIUnbindStream to unbind it from the stream. If necessary, call aclmdlRIDestroy to destroy the resource.
Prototype
1 | aclError aclmdlRIBuildBegin(aclmdlRI *modelRI, uint32_t flag) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
modelRI |
Input |
Model running instance, whose model is used to temporarily store the built tasks. For details about the type definition, see aclmdlRI. |
flag |
Input |
Reserved. The value is fixed at 0. |
Returns
0 on success; otherwise, failure. For details, see aclError.