aclrtCmoSetDesc

Applicability

Product

Supported

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

Description

Sets the cache memory descriptor. After this API is called, the source memory address and memory size are recorded in this descriptor.

Prototype

aclError aclrtCmoSetDesc(void *cmoDesc, void *src, size_t size)

Parameters

Parameter

Input/Output

Description

cmoDesc

Input

Pointer to the address of the cache memory descriptor.

First call aclrtCmoGetDescSize to obtain the memory size required by the cache memory descriptor, allocate device memory (for example, by calling aclrtMalloc), and pass the device memory address as an input.

src

Input

Address of the device memory to be operated.

Only cache memory operations on the local device are supported.

size

Input

Size of the device memory to be operated, in bytes.

Returns

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