aclrtSetStreamAttribute
Applicable Products
|
Product |
Supported |
|---|---|
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
Function
Sets attributes of a stream.
Prototype
1
|
aclError aclrtSetStreamAttribute(aclrtStream stream, aclrtStreamAttr stmAttrType, aclrtStreamAttrValue *value) |
Parameters
|
Parameter |
Input/Output |
Description |
|---|---|---|
|
stream |
Input |
Stream. For details about the type definition, see aclrtStream. |
|
stmAttrType |
Input |
Attribute type. For details about the type definition, see aclrtStreamAttr. |
|
value |
Input |
Attribute value. For details about the type definition, see aclrtStreamAttrValue. |
Returns
0 on success; otherwise, failure. For details, see aclError.
Restrictions
- Overflow detection attribute: After this API is called to enable or disable overflow detection, the setting takes effect only for subsequently delivered tasks.
- Failure Mode: Failure Mode cannot be set for the default stream of a context.
- If stop-on-failure is set for a stream, the stop-on-failure mode also applies to other streams in the context of the stream.
- For the
Ascend 950PR /Ascend 950DT ,Atlas A3 training products /Atlas A3 inference products andAtlas A2 training products /Atlas A2 inference products , the default stream can be used (that is, the stream parameter can be set to NULL). - For
Atlas 200I/500 A2 inference products ,Atlas inference products , andAtlas training products , the default stream cannot be used (that is, the stream parameter cannot be set to NULL).