aclrtStreamAbort
Applicable Products
Product |
Supported |
|---|---|
√ |
|
√ |
|
√ |
|
☓ |
|
☓ |
|
☓ |
Function
Stops tasks that are being executed in a specified stream and discards tasks that have been delivered but not executed in the stream. New tasks delivered to this 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
- This API does not apply to the stream bound to a model running instance. For details about how to bind a model running instance to a stream, see aclmdlRIBindStream.
- 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 is restricted to device-side calls).
- 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.
- For the
Ascend 950PR /Ascend 950DT , this API does not apply to the stream created by calling aclrtCreateStreamWithConfig with flag set to ACL_STREAM_PERSISTENT.
Parent topic: Stream Management