From 90dcff1345f82a346e555033ce0ab3981cabe37b 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 [ROCm/clr commit: 5c6b42efed77dda89c1394987dd18f1c4762dd65] --- projects/clr/hipamd/api/hip/hip_peer.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/projects/clr/hipamd/api/hip/hip_peer.cpp b/projects/clr/hipamd/api/hip/hip_peer.cpp index e986cfeac0..cdfec74f0e 100644 --- a/projects/clr/hipamd/api/hip/hip_peer.cpp +++ b/projects/clr/hipamd/api/hip/hip_peer.cpp @@ -98,18 +98,14 @@ hipError_t hipMemcpyPeer(void* dst, int dstDevice, const void* src, int srcDevic size_t sizeBytes) { HIP_INIT_API(dst, dstDevice, src, srcDevice, sizeBytes); - assert(0 && "Unimplemented"); - - HIP_RETURN(hipErrorUnknown); + HIP_RETURN(hipMemcpy(dst, src, sizeBytes, hipMemcpyDeviceToDevice)); } hipError_t hipMemcpyPeerAsync(void* dst, int dstDevice, const void* src, int srcDevice, size_t sizeBytes, hipStream_t stream) { HIP_INIT_API(dst, dstDevice, src, srcDevice, sizeBytes, stream); - assert(0 && "Unimplemented"); - - HIP_RETURN(hipErrorUnknown); + HIP_RETURN(hipMemcpyAsync(dst, src, sizeBytes, hipMemcpyDeviceToDevice, stream)); } hipError_t hipCtxEnablePeerAccess(hipCtx_t peerCtx, unsigned int flags) {