aclrtGetMemcpyDescSize

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

Obtains the memory size used by the memory copy descriptor of the current device.

This API must be used with other key APIs to implement memory copy. For details, see aclrtMemcpyAsyncWithDesc.

Prototype

1
aclError aclrtGetMemcpyDescSize(aclrtMemcpyKind kind, size_t *descSize)

Parameters

Parameter

Input/Output

Description

kind

Input

Memory copy kind. For details about the type definition, see aclrtMemcpyKind.

Currently, only ACL_MEMCPY_INNER_DEVICE_TO_DEVICE is supported, indicating memory copy within a device.

descSize

Output

Memory size, in bytes.

Returns

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