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
When multiple tasks are delivered to a stream, you can use this API to specify the task scheduling mode to determine whether to continue the next task after a task fails.
Prototype
- C Prototype
| aclError aclrtSetStreamFailureMode(aclrtStream stream, uint64_t mode)
|
- Python Function
| ret = acl.rt.set_stream_failure_mode(stream, mode)
|
Parameters
Parameter
|
Description
|
stream
|
Int, pointer address of the stream to be operated.
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
|
mode
|
Int, the task scheduling mode to determine whether to continue the next task after a task fails, when multiple tasks are delivered to a stream.
The options are as follows:
- ACL_CONTINUE_ON_FAILURE = 0: default value. If a task fails, the system continues to execute the next task.
- ACL_STOP_ON_FAILURE = 1: After a task fails, the subsequent tasks are stopped.
|
Return Values
Return Value
|
Description
|
ret
|
Int, error code. 0 on success; else, failure.
|
Restrictions
- This API can be called only once for a specified stream to set the task scheduling mode.
- If the stop-on-failure mode is set for a stream, the stop-on-failure mode also applies to other streams in the context of the stream. This restriction applies to the following product models:
Ascend 950PR/Ascend 950DT
Atlas A3 training products/Atlas A3 inference products
Atlas A2 training products/Atlas A2 inference products
Atlas 200I/500 A2 inference products
Atlas inference products
Atlas training products