Function: stream_get_id

Applicable Products

  • Ascend 950PR&950DT products: Supported
  • Atlas A3 products: Supported
  • Atlas A2 products: Supported
  • Atlas 200I/500 A2 inference products: Supported
  • Atlas inference products: Supported
  • Atlas training products: Supported

Function

Obtains the ID of a specified stream.

Prototype

  • C Prototype

    aclError aclrtStreamGetId(aclrtStream stream, int32_t *streamId)
    
  • Python Function

    stream_id, ret = acl.rt.stream_get_id(stream)
    

Parameters

Parameter Description
stream Int, pointer address of the stream to be queried. If the value is 0, the default stream is used.

Return Values

Return Value Description
stream_id Int, stream ID.
ret Int. If 0 is returned, the operation is successful. If other values are returned, the operation fails.