Queries whether memory copy is supported between two devices. This is a synchronous API.
The Ascend 310 AI Processor does not support this API in the current version.
aclError aclrtDeviceCanAccessPeer(int32_t *canAccessPeer, int32_t deviceId, int32_t peerDeviceId)
Parameter |
Input/Output |
Description |
|---|---|---|
canAccessPeer |
Output |
Whether memory copy is supported between the device specified by deviceId and the device specified by peerDeviceId. 1 indicates that memory copy is supported, and 0 indicates that memory copy is not supported. |
deviceId |
Input |
ID of the specified device, which must be different from peerDeviceId. Must be in the range of [0, Device count – 1]. Call aclrtGetDeviceCount to obtain the device count. |
peerDeviceId |
Input |
ID of the specified device, which must be different from deviceId. Must be in the range of [0, Device count – 1]. Call aclrtGetDeviceCount to obtain the device count. |
0 on success; else, failure.
For the API call example, see Inter-Device Data Transfer.