aclrtCmoSetDesc

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

x

Atlas inference product

x

Atlas training product

x

Function

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

Prototype

1
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; otherwise, failure. For details, see aclError.