aclrtSetStreamFailureMode

The Ascend 310 AI Processor does not support this API.

Description

Specifies the task scheduling mode to determine whether to continue the next task after a task fails, when multiple tasks are delivered to a stream.

Restrictions

This API can be called only once for a specified stream to set the task scheduling mode.

Prototype

aclError aclrtSetStreamFailureMode(aclrtStream stream, uint64_t mode)

Parameters

Parameter

Input/Output

Description

stream

Input

Stream to be operated.

The task scheduling mode of the default stream (that is, this parameter is set to NULL) cannot be specified.

mode

Input

When multiple tasks are delivered to a stream, you can use this parameter to specify the task scheduling mode to determine whether to continue the next task after a task fails.

Format range is as follows:

  • ACL_CONTINUE_ON_FAILURE: default value. If a task fails, the system continues to execute the next task.
  • ACL_STOP_ON_FAILURE: After a task fails, the subsequent tasks are stopped.

Returns

The value 0 indicates success, and other values indicate failure. For details, see aclError.