Function: set_stream_attribute

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

Sets attributes of a stream.

Prototype

Parameters

Parameter

Description

stream

Int, stream.

The support for the default stream (that is, this parameter is set to 0) varies according to product models.

Ascend 950PR/Ascend 950DT: supported

Atlas A3 training products/Atlas A3 inference products: supported

Atlas A2 training products/Atlas A2 inference products: supported

Atlas 200I/500 A2 inference products: not supported

Atlas inference products: not supported

Atlas training products: not supported

stm_attr_type

Int, attribute type. For details, see aclrtStreamAttr.

value

Dict, attribute value. For details, see aclrtStreamAttrValue.

Return Values

Return Value

Description

ret

Int, 0 on success; else, failure.

Restrictions