aclrtDeviceTaskAbort

Note: This API is for trial use and may be changed in later versions. It is not available in production environments.

Applicable Products

Product

Supported

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

☓

Function

Stops the tasks that are being executed on a specified device and discards the tasks that have been delivered to the device. This API allows you to set an infinite wait interval or a specific timeout interval. If a specific timeout interval is configured, the API returns an error when the timeout interval is exceeded after this API is called.

Prototype

1
aclError aclrtDeviceTaskAbort(int32_t deviceId, uint32_t timeout)

Parameters

Parameter

Input/Output

Description

deviceId

Input

Device ID.

The value must be the same as the device ID in aclrtSetDevice.

timeout

Input

Timeout interval.

The value can be:

  • 0: permanent waiting
  • > 0: specific timeout interval, in milliseconds The maximum timeout interval is 36 minutes.

Returns

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