P2P Update.

- 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 f7089dbe4b
commit c3bd85595d
7 changed files with 172 additions and 28 deletions
+3 -2
View File
@@ -88,6 +88,7 @@ void enablePeerFirst()
{
printf ("\n==testing: %s\n", __func__);
setupPeerTests();
HIPCHECK(hipSetDevice(g_currentDevice));
HIPCHECK(hipDeviceEnablePeerAccess(g_peerDevice, 0));
@@ -111,12 +112,12 @@ void enablePeerFirst()
// allocate and initialize memory on device0
HIPCHECK (hipSetDevice(g_currentDevice));
HIPCHECK (hipMalloc(&A_d0, Nbytes) );
HIPCHECK ( hipMemset(A_d0, memsetval, Nbytes) );
HIPCHECK (hipMemset(A_d0, memsetval, Nbytes) );
// allocate and initialize memory on peer device
HIPCHECK (hipSetDevice(g_peerDevice));
HIPCHECK (hipMalloc(&A_d1, Nbytes) );
HIPCHECK ( hipMemset(A_d1, 0x13, Nbytes) );
HIPCHECK (hipMemset(A_d1, 0x13, Nbytes) );