SWDEV-374402 - Added check for invalid events in hipExtLaunchKernel

Change-Id: I8dfd69aa1ef38971a72b98c723d2099347a66d11


[ROCm/clr commit: b83271b4ca]
This commit is contained in:
Ioannis Assiouras
2022-12-20 17:38:26 +00:00
parent 5bc671c8c6
commit be16c31b60
3 changed files with 17 additions and 1 deletions
+15
View File
@@ -260,6 +260,21 @@ hipError_t Event::addMarker(hipStream_t stream, amd::Command* command, bool reco
return status;
}
// ================================================================================================
bool isValid(hipEvent_t event) {
// NULL event is always valid
if (event == nullptr) {
return true;
}
amd::ScopedLock lock(eventSetLock);
if (eventSet.find(event) == eventSet.end()) {
return false;
}
return true;
}
} // namespace hip
// ================================================================================================
hipError_t ihipEventCreateWithFlags(hipEvent_t* event, unsigned flags) {