-
Notifications
You must be signed in to change notification settings - Fork 10
inst: Add a way to get an event when the destruction of an instance actually occurs #300
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #300 +/- ##
=======================================
Coverage ? 26.63%
=======================================
Files ? 188
Lines ? 39022
Branches ? 14222
=======================================
Hits ? 10393
Misses ? 27642
Partials ? 987 ☔ View full report in Codecov by Sentry. |
Is there a reason to introduce a new method call and not just make the old API start returning an event? Overhead of triggering an event for an instance destruction should be very low. |
Triggering should be low, but I worry about creating an event on destroy. I didn't want to inadvertently regress perf on a heavily utilized call. I could go with returning an event, but I don't know what to tell QA to run to verify this isn't an issue. Was hoping you might have some insight? I still need to write tests for this change, so it's technically not done yet, but wanted a quick check to verify the concept. |
Run the Legate performance test suite. It should be fairly representative of at least some interesting workloads.
My intuition is that we should just always return an event. Even if the instance creation/deletion is on the critical path, the cost of triggering the event will be significantly lower than the cost of running through a memory allocator to make the instance (e.g. Realm's allocator or cudaMalloc, etc.). I don't expect to see any performance regression from returning an event all the time. |
09621a2
to
fc0fc3b
Compare
@lightsighter updated to always return an event. It'll not create a destroy event if wait_on is Event::NO_EVENT, and just return Event::NO_EVENT in that case, which is always triggered, as a small optimization. I can go deeper and only do this when the wait_on event is triggered, but I'm not sure it's worth it. |
I think that is perfectly fine and compliant with the Realm API. Presumably though I'll still get an actual event back if I do a destroy with a NO_EVENT as a precondition if I issue the destroy on a remote node from where the instance lives and a message needs to be sent to the owner node to do the actual destroy right? The event will trigger after the message has made it to the owner node and been applied. |
Ah, hm, no, I'll have to add that. |
84dd938
to
2751484
Compare
inst: add inst destroy waits to tutorials inst: add destroy events for examples inst: add waits for inst destruction in all benchmarks
2751484
to
3366af8
Compare
No description provided.