From 3714e1778b72b6d55ee5d8060fb36bb9af2845df Mon Sep 17 00:00:00 2001 From: foreman Date: Wed, 12 Jun 2019 10:48:40 -0400 Subject: [PATCH] P4 to Git Change 1809454 by kjayapra@0_HIPWS_TRT2_ROCM on 2019/06/11 17:45:36 SWDEV-191936 - Implementation of hipMemcpyPeer & hipMemcpyPeerAsync + fix to check source P2PAgents for P2P. RocM Verified. Affected files ... ... //depot/stg/opencl/drivers/opencl/api/hip/hip_peer.cpp#6 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.cpp#76 edit --- rocclr/runtime/device/rocm/rocvirtual.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rocclr/runtime/device/rocm/rocvirtual.cpp b/rocclr/runtime/device/rocm/rocvirtual.cpp index 67d62e75d7..982ba4a070 100644 --- a/rocclr/runtime/device/rocm/rocvirtual.cpp +++ b/rocclr/runtime/device/rocm/rocvirtual.cpp @@ -1266,7 +1266,15 @@ void VirtualGPU::submitCopyMemoryP2P(amd::CopyMemoryP2PCommand& cmd) { p2pAllowed = true; break; } + + for (auto agent: srcDevMem->dev().p2pAgents()) { + if (agent.handle == dev().getBackendDevice().handle) { + p2pAllowed = true; + break; + } + } } + // Synchronize source and destination memory device::Memory::SyncFlags syncFlags; syncFlags.skipEntire_ = cmd.isEntireMemory();