SWDEV-369551 - invalid stream check in hipMemcpy

Change-Id: I6762af93cd566a38f7d04994b87a76e744b19043


[ROCm/clr commit: 76b0b4d635]
This commit is contained in:
pghafari authored and Payam Ghafari committed 2023-01-18 20:02:28 -05:00
1 parent de904d8716
commit 5fa035dbd4
1 file changed
+4
+4
View File
@@ -622,6 +622,10 @@ hipError_t hipMemcpyWithStream(void* dst, const void* src, size_t sizeBytes,
hipMemcpyKind kind, hipStream_t stream) {
HIP_INIT_API(hipMemcpyWithStream, dst, src, sizeBytes, kind, stream);
STREAM_CAPTURE(hipMemcpyAsync, stream, dst, src, sizeBytes, kind);
if (!hip::isValid(stream)) {
HIP_RETURN(hipErrorContextIsDestroyed);
}
amd::HostQueue* queue = hip::getQueue(stream);
if (queue == nullptr) {
HIP_RETURN(hipErrorInvalidValue);