aclrtDeviceEnablePeerAccess
The
Description
Enables memory copy between the current device and a specified device. This API enables device-level memory copy.
Restrictions
Call aclrtDeviceCanAccessPeer in advance to check whether memory copy is supported between the current device and the specified device. To disable memory copy between the devices, call aclrtDeviceDisablePeerAccess.
Prototype
aclError aclrtDeviceEnablePeerAccess(int32_t peerDeviceId, uint32_t flags)
Parameters
|
Parameter |
Input/Output |
Description |
|---|---|---|
|
peerDeviceId |
Input |
Device ID, which must be different from the current device ID. Must be in the range of [0, Device count – 1]. Call aclrtGetDeviceCount to obtain the device count. |
|
flags |
Input |
This parameter is reserved and must be set to 0. |
Returns
The value 0 indicates success, and other values indicate failure. For details, see aclError.