Function: mem_flush

C Prototype

aclError aclrtMemFlush(void *devPtr, size_t size)

Python Function

ret = acl.rt.mem_flush(dev_ptr, size)

Function Usage

Flushes cache data to the DDR and 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.

Input Description

dev_ptr: int, start address of the DDR memory to be flushed.

size: int, size of the DDR memory to be flushed, in bytes. The size cannot be 0.

Return Value

ret: int, error code.

Restrictions

None