aclrtStreamAttr

1
2
3
4
5
6
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

Sets the task scheduling mode for a stream to determine whether to execute the next task after a task within this stream encounters an error.

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. Previously delivered tasks remain unaffected.

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 a stream to determine the detection granularity when an overflow occurs. If no group tag is set, the process granularity is used by default. If a group tag is set, only streams sharing the same group tag as the stream where an overflow occurs are subject to detection.

ACL_STREAM_ATTR_CACHE_OP_INFO

Sets the operator information caching switch for a stream to control whether operator information is included during subsequent performance data collection when a model running instance is built in capture mode.

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 remains consistent across the main stream and its associated streams.