aclrtMemInvalidate

Applicable Products

Product

Supported

Ascend 950PR/Ascend 950DT

√

Atlas A3 training products/Atlas A3 inference products

√

Atlas A2 training products/Atlas A2 inference products

√

Atlas 200I/500 A2 inference products

√

Atlas inference products

√

Atlas training products

√

Function

Invalidates the data in 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

1
aclError aclrtMemInvalidate(void *devPtr, size_t size)

Parameters

Parameter

Input/Output

Description

devPtr

Input

Pointer to the start address of the DDR memory that needs cache invalidation.

size

Input

DDR memory size, in bytes.

size cannot be 0.

Returns

0 on success; otherwise, failure. For details, see aclError.