aclrtMemcpyAsyncWithOffset

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

Atlas inference product

Atlas training product

Description

Copies memory in scenarios where the base address is a level-2 pointer and an address offset exists. This API is asynchronous.

Prototype

1
aclError aclrtMemcpyAsyncWithOffset(void **dst, size_t destMax, size_t dstDataOffset, const void **src, size_t count, size_t srcDataOffset, aclrtMemcpyKind kind, aclrtStream stream)

Parameters

Parameter

Input/Output

Description

dst

Input

Pointer to the destination memory address.

destMax

Input

Memory size in bytes in the destination address

dstDataOffset

Input

Offset of the destination memory address.

src

Input

Pointer to the source memory address.

count

Input

Size in bytes to copy.

srcDataOffset

Input

Offset of the source memory address.

kind

Input

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

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

stream

Input

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

Returns

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