SWDEV-487988 - Reserve event flag in hip::Event.

Don't create new hip:Function if it is already registered.

Change-Id: I3ecd5d61146659be6ba434717b0f21d3fc04cfc9
Этот коммит содержится в:
Jaydeep Patel
2024-10-05 12:05:49 +00:00
коммит произвёл Jaydeepkumar Patel
родитель e74ac6f580
Коммит a6c5c6a95a
2 изменённых файлов: 12 добавлений и 2 удалений
+5
Просмотреть файл
@@ -308,6 +308,11 @@ hipError_t ihipEventCreateWithFlags(hipEvent_t* event, unsigned flags) {
e = new hip::Event(flags);
}
}
// App might have used combination of flags i.e. hipEventInterprocess|hipEventDisableTiming
// However based on hipEventInterprocess flag, IPCEvent creates even with
// JUST hipEventInterprocess and hence, Actual hipEventInterprocess|hipEventDisableTiming
// flag is getting supressed with hipEventInterprocess
e->flags_ = flags;
if (e == nullptr) {
return hipErrorOutOfMemory;
}