Product |
Supported (√/x) |
|---|---|
√ |
|
√ |
|
√ |
|
x |
|
x |
|
√ |
Copies memory using a memory copy descriptor (level-2 pointer mode).
This API is asynchronous. The API call delivers a task rather than executes a task. After this API is called, you need to call a synchronization API (for example, acl.rt.synchronize_stream) to ensure that the task is complete. Otherwise, service exceptions (such as training or inference exception) or unknown situations (such as device link or card disconnection) may occur.
This API must be used together with the following APIs to implement memory copy:
1 | aclError aclrtMemcpyAsyncWithDesc(void *desc, aclrtMemcpyKind kind, aclrtStream stream) |
1 | ret= acl.rt.memcpy_async_with_desc(desc, kind, stream) |
Parameter |
Description |
|---|---|
desc |
Int, pointer to the memory copy descriptor address on the device. Call acl.rt.set_memcpy_desc to set the memory copy descriptor, and then pass the pointer to the memory copy descriptor address as an input parameter. |
kind |
Int, memory copy type. Currently, only ACL_MEMCPY_INNER_DEVICE_TO_DEVICE is supported, indicating memory copy within a device. |
stream |
Int, stream. |
Return Value |
Description |
|---|---|
ret |
Int, error code. 0 on success; else, failure. |