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
committed by Jaydeepkumar Patel
コミット 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;
}