-
Notifications
You must be signed in to change notification settings - Fork 218
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
Refactor memory wrappers #2335
Refactor memory wrappers #2335
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2335 +/- ##
===========================================
- Coverage 71.86% 60.30% -11.57%
===========================================
Files 155 155
Lines 15020 14880 -140
===========================================
- Hits 10794 8973 -1821
- Misses 4226 5907 +1681 ☔ View full report in Codecov by Sentry. |
37a1f17
to
3cdd16c
Compare
12b22e6
to
e3bb56f
Compare
This makes it possible to share them between array objects, and to synchronize on the correct stream when freeing.
ab27b99
to
d7eb467
Compare
Implements #2236: Each piece of memory now keeps track on which stream is working on it, and whether there's outstanding (non-synchronized) changes within that stream. That makes it possible to accurately and automatically synchronize when we derive a pointer from a CuArray (which is the one and only place where we indicate that we will start using the memory).
I did quite a bit of refactoring as part of this PR, most notably removing the
Mem
submodule. I added plenty deprecations though, so it should be nonbreaking (although I expect issues and hotfixes when we tag this).Closes #1566 by making synchronization unnecessary, i.e., the following now "just works":
@vchuravy: much easier than the Task changes we were brainstorming about :-)
Fixes #2323:
Hopefully fixes #875