aclrtSetStreamAttribute

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product / Atlas A3 inference product

Atlas A2 training product / Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

Description

Sets the 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.

Products differ in their support for default streams (setting this parameter to NULL):

Atlas 350 Accelerator Card: not supported

Atlas A3 training product / Atlas A3 inference product : supported

Atlas A2 training product / Atlas A2 inference product : supported

Atlas 200I/500 A2 inference product : not supported

Atlas inference product : not supported

Atlas training product : not supported

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/Underflow detection attribute: The setting takes effect only for tasks created after this API call.
  • Failure mode: The failure mode cannot be set for the default stream of a context.

API Call Example

For the API call example, see Task Stopping Upon Failure.