aclrtStreamAbort

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

Stops tasks that are being executed in a specified stream and discards tasks that have been delivered but not executed in the specified stream. New tasks delivered to the specified stream do not take effect during the execution of this API.

Prototype

1
aclError aclrtStreamAbort(aclrtStream stream)

Parameters

Parameter

Input/Output

Description

stream

Input

Stream with tasks to be stopped. For details about the type definition, see aclrtStream.

Returns

0 on success; otherwise, failure. For details, see aclError.

Restrictions

  • aclmdlRIBindStream cannot be used to bind a stream to a model running instance.
  • This API does not apply to the stream created by calling aclrtCreateStreamWithConfig with flag set to ACL_STREAM_DEVICE_USE_ONLY (creating a stream that can be invoked exclusively on the device).
  • Atlas 350 Accelerator Card does not support the default stream (that is, the stream parameter is set to NULL).
  • If other streams depend on the stream specified by this API (for example, using aclrtRecordEvent or aclrtStreamWaitEvent to synchronize two streams), the execution of other streams may be suspended. In this case, you need to explicitly call this API to clear tasks on other streams.
  • If you call this API to clear tasks on a specified stream and then call a synchronization API (such as aclrtSynchronizeStream or aclrtSynchronizeEvent), the synchronization API exits and returns ACL_ERROR_RT_STREAM_ABORT.