Deinitializes AscendCL to clean up AscendCL allocations. This API is synchronous.
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 Log Reference.
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.
aclError aclFinalize()
None
0 on success; else, failure.
For the API call example, see AscendCL Initialization and Deinitialization.