Function: destroy_context
Applicable Products
- Ascend 950PR&950DT products: Supported
- Atlas A3 products: Supported
- Atlas A2 products: Supported
- Atlas 200I/500 A2 inference products: Supported
- Atlas inference products: Supported
- Atlas training products: Supported
Function
Destroys a context and cleans up the associated resources. Only the context created by the acl.rt.create_context call can be destroyed.
Prototype
-
C Prototype
aclError aclrtDestroyContext(aclrtContext context) -
Python Function
ret = acl.rt.destroy_context(context)
Parameters
| Parameter | Description |
|---|---|
| context | Int, pointer address of the context object to be destroyed. |
Return Values
| Return Value | Description |
|---|---|
| ret | Int, error code. If 0 is returned, the operation is successful. If other values are returned, the operation fails. |
Reference
For details about the API call process and example, see "Runtime Resource Allocation and Deallocation" and "Synchronous Wait" in "Application Development (Python)".