Function: mem_invalidate
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
Invalidates the cache.
In this version, you do not need to care about the cache coherence between the CPU and NPU and therefore this API is unused in this version.
Prototype
-
C Prototype
aclError aclrtMemInvalidate(void *devPtr, size_t size) -
Python Function
ret = acl.rt.mem_invalidate(dev_ptr, size)
Parameters
| Parameter | Description |
|---|---|
| devPtr | Int, invalid cache corresponding to the DDR memory. |
| size | Int, DDR memory size, in bytes. Must not be 0. |
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. |