SetExecuteStreamId

Description

Sets the stream ID used by the operation. The stream ID is the sequence number in streams passed when the SetExecuteStreams API of the context is called. (For example, if op1 needs to run on stream2 (streams = {stream1, stream2, stream3}), the SetExecuteStreamId(op1, 1) API is called.)

Definition

Status SetExecuteStreamId(Operation *operation, uint32_t streamId);

Parameters

Parameter

Input/Output

Description

operation

Input

Operation pointer that is set.

streamId

Input

Stream ID to be set.

Returns

Type

Input/Output

Description

Status

Output

Status value. NO_ERROR indicates success; another value returned indicates a failure.

Restrictions

If the custom plugin operator (PluginOperation) needs to use this function, PluginOperation needs to inherit the base class of the OperationInfra API.

The setting behavior of this API for a single operator is slightly different from that for a graph operator. When this API is called by a single operator, the stream ID of the single operator is changed. When this API is called by a graph operator, all operations whose stream IDs are 0 in the graph are modified. The default stream ID is 0.