aclrtCmoSetDesc

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

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 current 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.