aclFinalize

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

Function

Performs deinitialization to destroy the resources used by the acl API in the process.

In scenarios where device service logs need to be sent back to the host, this API adds a delay of 2000 ms by default (the actual maximum delay can reach 2000 ms) to ensure that ERROR and EVENT logs are sent back and no data is lost. You can set the ASCEND_LOG_DEVICE_FLUSH_TIMEOUT environment variable to 0 (command example: export ASCEND_LOG_DEVICE_FLUSH_TIMEOUT=0) to cancel the default delay. For details about the ASCEND_LOG_DEVICE_FLUSH_TIMEOUT environment variable, see Logs > ASCEND_LOG_DEVICE_FLUSH_TIMEOUT in Environment Variables.

Prototype

1
aclError aclFinalize()

Parameters

None

Returns

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

Restrictions

Before the app process exits, ensure that aclFinalize or aclFinalizeReference has been called to complete deinitialization. Otherwise, there may be exceptions. For example, an error is reported when the app process exits.

You are not advised to call aclFinalize or aclFinalizeReference in the destructor call. Otherwise, the process may exit abnormally due to the unknown singleton destruction sequence.

API Call Example

For the API call example, see Initialization.