SetStreamId

Applicability

Product

Supported or Not

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

Header File/Library File

  • Header file: #include <register/register_custom_pass.h>
  • Library file: libregister.so

Function Usage

Sets the stream ID of a node. Nodes with the same stream ID are executed in sequence on the same stream.

Prototype

1
graphStatus SetStreamId(const GNode &node, int64_t stream_id)

Parameters

Parameter

Input/Output

Description

node

Input

Node on the graph.

stream_id

Input

Stream ID to be set. If the stream ID has been applied for, set it directly. If a new stream ID needs to be applied for, call the AllocateNextStreamId API to apply for a new stream ID. Otherwise, if the stream ID exceeds the maximum stream ID on the current graph, a failure message is returned.

Returns

Parameter

Type

Description

-

Status

SUCCESS: The setting is successful.

FAILED: The setting fails.

Constraints

None