Releasing Runtime Resources and Deinitializing ACL
Basic Principles
After all data on the host and device is processed, release the runtime resources, including the streams, contexts and devices in sequence.
- The default context cannot be released using acl.rt.destroy_context.
- The default stream cannot be released using acl.rt.destroy_stream.
- The default context and stream are automatically released with the reset of device using acl.rt.reset_device.
- Call acl.finalize to deinitialize the ACL.
Sample Code
import acl # ...... ret = acl.rt.destroy_stream(stream_) ret = acl.rt.destroy_context(context_) ret = acl.rt.reset_device(deviceId_) ret = acl.finalize() # ......