-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[L0] Fix Event Memory Leak due to no destroy on delete #2476
Conversation
54b8a21
to
08ffad9
Compare
9c5e024
to
a96c4d0
Compare
I need to check that this change does not interfere with the "discard events" feature. This definitely resolves a memory leak issue with internal events, but I need to ensure I did not miss something with the discard feature that does not allow this cleanup. I will have this in draft until that is confirmed. |
- Given Internal Event that is not cached we must destroy the ze event at handle destroy. This can only occur if the associated queue does not have discard events enabled. - during context release and when event caching is disabled, the destroy sets the event handle to nullptr to avoid double cleanup. Signed-off-by: Neil R. Spruit <[email protected]>
a96c4d0
to
56a3c84
Compare
-pre-commit PR for oneapi-src/unified-runtime#2476 Signed-off-by: Neil R. Spruit <[email protected]>
Fixed the issue in my latest. The additional Destroy can only occur if the associated queue is NOT using Discard Events. If it is using Discard Events, then the zeEvent is not meant to be destroyed, but instead it is reused in new UR Events. The latest accounts for this such that the known event handle leak is still fixed, but does not break the discard events use case. |
Added ready to merge since the CI is passing related to discard events now after my additional check. |
[L0] Fix Event Memory Leak due to no destroy on delete
-pre-commit PR for oneapi-src/unified-runtime#2476 --------- Signed-off-by: Neil R. Spruit <[email protected]> Co-authored-by: Martin Morrison-Grant <[email protected]>
at handle destroy. This can only occur if the associated queue does
not have discard events enabled.
sets the event handle to nullptr to avoid double cleanup.