aclFinalize

Description

Deinitializes AscendCL to clean up AscendCL allocations.

A 2000 ms timeout interval is added by default (the maximum timeout is 2000 ms) for the transfer of device logs to ensure the integrity of error- and event-level logs. You can set the ASCEND_LOG_DEVICE_FLUSH_TIMEOUT environment variable to 0 (by using the export ASCEND_LOG_DEVICE_FLUSH_TIMEOUT=0 command) to cancel the timeout. For details about the ASCEND_LOG_DEVICE_FLUSH_TIMEOUT environment variable, see ASCEND_LOG_DEVICE_FLUSH_TIMEOUT in Environment Variables.

Restrictions

This API needs to be called explicitly to deinitialize AscendCL before the app process exits. Otherwise, an error will be reported, for example, an app process exit error.

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

Prototype

aclError aclFinalize()

Parameters

None

Returns

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

See Also

For the API call example, see Initializing AscendCL.