SWDEV-332371 - Address seg fault with hip event tests on Windows

Change-Id: I0367f6dbb395b3032c97692c5bde6e99d503c6a9
Tento commit je obsažen v:
Satyanvesh Dittakavi
2022-04-13 13:00:38 +00:00
rodič bd851550bd
revize 3b525ad298
+10 -3
Zobrazit soubor
@@ -251,9 +251,6 @@ hipError_t Event::addMarker(hipStream_t stream, amd::Command* command, bool reco
} // namespace hip
// ================================================================================================
hipError_t ihipEventCreateWithFlags(hipEvent_t* event, unsigned flags) {
if (event == nullptr) {
return hipErrorInvalidValue;
}
#if !defined(_MSC_VER)
unsigned supportedFlags = hipEventDefault | hipEventBlockingSync | hipEventDisableTiming |
hipEventReleaseToDevice | hipEventReleaseToSystem | hipEventInterprocess;
@@ -288,11 +285,21 @@ hipError_t ihipEventCreateWithFlags(hipEvent_t* event, unsigned flags) {
hipError_t hipEventCreateWithFlags(hipEvent_t* event, unsigned flags) {
HIP_INIT_API(hipEventCreateWithFlags, event, flags);
if (event == nullptr) {
return hipErrorInvalidValue;
}
HIP_RETURN(ihipEventCreateWithFlags(event, flags), *event);
}
hipError_t hipEventCreate(hipEvent_t* event) {
HIP_INIT_API(hipEventCreate, event);
if (event == nullptr) {
return hipErrorInvalidValue;
}
HIP_RETURN(ihipEventCreateWithFlags(event, 0), *event);
}