Function: get_stream_attribute
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 attribute values of a stream.
Prototype
-
C Prototype
aclError aclrtGetStreamAttribute(aclrtStream stream, aclrtStreamAttr stmAttrType, aclrtStreamAttrValue *value) -
Python Function
value, ret = acl.rt.get_stream_attribute(stream, stm_attr_type)
Parameters
| Parameter | Description |
|---|---|
| stream | Int, stream. |
| stm_attr_type | Int, attribute type. For details, see aclrtStreamAttr. |
Return Values
| Return Value | Description |
|---|---|
| value | Dict, attribute value. For details, see aclrtStreamAttrValue. |
| ret | Int. If 0 is returned, the operation is successful. If other values are returned, the operation fails. |
Constraints
- For Ascend 950PR&950DT, Atlas A3, and Atlas A2 products, the default stream can be specified (that is, the stream parameter is set to 0).
- For Atlas 200I/500 A2 inference products, Atlas inference products, and Atlas training products, the default stream cannot be specified (that is, the stream parameter cannot be set to 0).