Product |
Supported (√/x) |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
|
x |
Queries whether memory copy is supported between two devices.
1 | aclError aclrtDeviceCanAccessPeer(int32_t *canAccessPeer, int32_t deviceId, int32_t peerDeviceId) |
1 | can_access_peer, ret = acl.rt.device_can_access_peer(dev_id, peer_dev_id) |
Parameter |
Description |
|---|---|
dev_id |
Int, specified device ID, which must be different from that of peer_dev_id. Must be in the range of [0, Device count – 1]. Call acl.rt.get_device_count to obtain the device count. |
peer_dev_id |
Int, specified device ID, which must be different from that of dev_id. Must be in the range of [0, Device count – 1]. Call acl.rt.get_device_count to obtain the device count. |
Return Value |
Description |
|---|---|
can_access_peer |
Int, whether memory copy is supported between the device specified by dev_id and the device specified by peer_dev_id. 1: supported; 0: not supported. |
ret |
Int, error code. 0 on success; else, failure. |