SWDEV-300934 - Check if the stream is valid

Change-Id: I41797dc3e726c7eea6a405f20deebd6f59381b5e
This commit is contained in:
Satyanvesh Dittakavi
2021-08-30 13:36:35 +00:00
szülő dab4457c14
commit dda2613525
+4
Fájl megtekintése
@@ -80,6 +80,10 @@ hipError_t hipMemPrefetchAsync(const void* dev_ptr, size_t count, int device,
HIP_RETURN(hipErrorInvalidValue);
}
if (!hip::isValid(stream)) {
HIP_RETURN(hipErrorContextIsDestroyed);
}
size_t offset = 0;
amd::Memory* memObj = getMemoryObject(dev_ptr, offset);
// Return error if count passed is more than the actual size allocated