- add P2P staging buffer copy.
- If copy device does not have sufficient access permissions, fall back
  to staging buffer.
- improve docs for which copy device is used.
This commit is contained in:
Ben Sander
2016-04-16 10:18:56 -05:00
parent 22d15dcdbc
commit dcabc9dbf7
7 ha cambiato i file con 172 aggiunte e 28 eliminazioni
+3 -1
Vedi File
@@ -108,7 +108,9 @@ hipError_t hipDeviceEnablePeerAccess (int peerDeviceId, unsigned int flags)
} else {
auto thisDevice = ihipGetTlsDefaultDevice();
auto peerDevice = ihipGetDevice(peerDeviceId);
if ((thisDevice != NULL) && (peerDevice != NULL)) {
if (thisDevice == peerDevice) {
err = hipErrorInvalidDevice; // Can't enable peer access to self.
} else if ((thisDevice != NULL) && (peerDevice != NULL)) {
LockedAccessor_DeviceCrit_t crit(thisDevice->criticalData());
bool isNewPeer = crit->addPeer(peerDevice);
if (isNewPeer) {