aclrtCmoAsyncWithDesc

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

Uses a memory descriptor (level-2 pointer mode) to operate the cache memory on the device. This is an asynchronous API.

Prototype

1
aclError aclrtCmoAsyncWithDesc(void *cmoDesc, aclrtCmoType cmoType, aclrtStream stream, const void *reserve)

Parameters

Parameter

Input/Output

Description

cmoDesc

Input

Pointer to the address of the cache memory descriptor. This address is the memory address on the device.

Call aclrtCmoSetDesc to set the memory descriptor, and then pass the pointer of the memory descriptor address as an input.

cmoType

Input

Cache memory operation type. For details about the type definition, see aclrtCmoType.

Currently, only ACL_RT_CMO_TYPE_PREFETCH (memory prefetch) is supported.

stream

Input

Stream for executing the memory operation task. For details about the type definition, see aclrtStream.

reserve

Input

Reserved. Currently, the value is fixed at NULL.

Returns

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