aclrtStreamAttr

typedef enum { 
    ACL_STREAM_ATTR_FAILURE_MODE         = 1,
    ACL_STREAM_ATTR_FLOAT_OVERFLOW_CHECK = 2,
    ACL_STREAM_ATTR_USER_CUSTOM_TAG      = 3, 
    ACL_STREAM_ATTR_CACHE_OP_INFO        = 4, 
} aclrtStreamAttr;

Enumeration Item

Description

ACL_STREAM_ATTR_FAILURE_MODE

When a task execution error occurs in a stream, use this attribute to set the task scheduling mode of the stream to determine whether to execute the next task after the previous one fails.

By default, the task scheduling mode cannot be set for a stream.

The function of setting the task scheduling mode by using this attribute is the same as that of the aclrtSetStreamFailureMode call.

ACL_STREAM_ATTR_FLOAT_OVERFLOW_CHECK

Enables or disables the overflow detection function for a specified stream when the upper-layer training framework (such as PyTorch) is connected in saturation mode. After the function is disabled, you cannot use the overflow detection operator to check whether a task overflows.

After the overflow detection function is enabled or disabled, the setting takes effect only for new tasks. The delivered tasks remain unchanged.

The function of setting the overflow detection switch by using this attribute is the same as that of the aclrtSetStreamOverflowSwitch call.

ACL_STREAM_ATTR_USER_CUSTOM_TAG

Sets the overflow detection group tag on the stream to determine the detection granularity when the overflow occurs. If no group tag is set, the process granularity is used by default. If a group tag is set, only the streams with the same group tag as the stream where the overflow occurs are detected.

ACL_STREAM_ATTR_CACHE_OP_INFO

When a model running instance is built based on the capture mode, use this attribute to set the stream's operator information caching switch to control whether operator information is included during subsequent performance data collection.

This attribute must be used together with other APIs. For details, see the API call sequence in aclrtCacheLastTaskOpInfo.

During cross-stream task capture, the operator information caching switch status of other streams associated with the main stream is the same as that of the main stream.