API Call Sequence (Multi-stream Scenario)

If task waiting of multiple streams is involved, your app must contain the related code logic. For details about the API call sequence, see API Call Sequence and this section.

Figure 1 Synchronization between streams

Synchronization between streams can be implemented by using an event. Call aclrtStreamWaitEvent to block the execution of a specified stream until the specified event is complete. Call aclrtRecordEvent before the aclrtStreamWaitEvent call. For the call example, see Inter-Stream Synchronization.

For details about the model loading and execution workflow, see Developing a Basic Inference App.

For details about the operator loading and execution workflow, see Single-Operator Execution.