Function: stream_get_id

Applicable Products

Product

Supported (√/x)

Ascend 950PR/Ascend 950DT

√

Atlas A3 training products/Atlas A3 inference products

√

Atlas A2 training products/Atlas A2 inference products

√

Atlas training products

√

Atlas inference products

√

Atlas 200I/500 A2 inference products

√

Description

Obtains the ID of a specified stream.

Prototype

  • C Prototype
    1
    aclError aclrtStreamGetId(aclrtStream stream, int32_t *streamId)
    
  • Python Function
    1
    stream_id, ret = acl.rt.stream_get_id(stream)
    

Parameters

Parameter

Description

stream

Int, pointer address of the specified stream. If 0 is passed, the default stream will be operated.

Return Values

Return Value

Description

stream_id

Int, stream ID.

ret

Int, 0 on success; else, failure.