SWDEV-383056 - Don't sync with dst device for hipMemcpyAsync.

Change-Id: I28530e6bd870d617507592576295fc9e7eed1475
Cette révision appartient à :
Jaydeep Patel
2023-02-27 17:23:01 +00:00
révisé par Jaydeepkumar Patel
Parent 88dc5cd386
révision 57fa5938fe
6 fichiers modifiés avec 16 ajouts et 22 suppressions
+7 -2
Voir le fichier
@@ -220,7 +220,8 @@ hipError_t hipMemcpyPeer(void* dst, int dstDevice, const void* src, int srcDevic
HIP_RETURN(hipErrorInvalidDevice);
}
HIP_RETURN(hipMemcpy(dst, src, sizeBytes, hipMemcpyDeviceToDevice));
HIP_RETURN(ihipMemcpy(dst, src, sizeBytes, hipMemcpyDeviceToDevice, *hip::getNullStream(),
true, false));
}
hipError_t hipMemcpyPeerAsync(void* dst, int dstDevice, const void* src, int srcDevice,
@@ -235,7 +236,11 @@ hipError_t hipMemcpyPeerAsync(void* dst, int dstDevice, const void* src, int src
if (!hip::isValid(stream)) {
return hipErrorContextIsDestroyed;
}
HIP_RETURN(hipMemcpyAsync(dst, src, sizeBytes, hipMemcpyDeviceToDevice, stream));
hip::Stream* hip_stream = hip::getStream(stream);
if (hip_stream == nullptr) {
return hipErrorInvalidValue;
}
HIP_RETURN(ihipMemcpy(dst, src, sizeBytes, hipMemcpyDeviceToDevice, *hip_stream, true, true));
}
hipError_t hipCtxEnablePeerAccess(hipCtx_t peerCtx, unsigned int flags) {