Function: mem_flush
Applicability
Product |
Supported (√/x) |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
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.
Prototype
- C Prototype
1aclError aclrtMemFlush(void *devPtr, size_t size)
- Python Function
1ret = acl.rt.mem_flush(dev_ptr, size)
Parameter Description
Parameter |
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. Must not be 0. |
Return Value Description
Return Value |
Description |
|---|---|
ret |
Int, error code: 0 on success; else, failure. |
Parent topic: Memory Management