-
Notifications
You must be signed in to change notification settings - Fork 769
[UR][L0] Add initial USM alloc enqueue API #17112
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
Conversation
Not sure if you are already collaborating to make sure the work doesn't conflict, but heads up that @Seanst98 is doing in oneapi-src/unified-runtime#2668 and #16900 |
Yeah, I'm planning on rebasing this PR on the spec changes added by @Seanst98 in #17117. Thanks for the heads up. |
65d6ceb
to
4f128d3
Compare
c7b5030
to
c75c5d9
Compare
ur_event_handle_t OriginAllocEvent = nullptr; | ||
auto AsyncAlloc = | ||
USMPool->allocateEnqueued(Queue, Device, nullptr, Type, Size); | ||
if (!AsyncAlloc) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't this bypass any limits specified for async pools?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say that it's possible since we are caching memory from those pools without really releasing it back to the pool immediately. The implementation would probably need to introduce some restriction for caching based on the pool limits.
Since all the changes were reviewed and approved, I've squashed all the changes into a neat single commit. |
TODO: - Limit the growth of the async freelist - Some better way to deallocate allocation events - Put a bucket-shaped limit on memory reuse (i.e., don't let async alloc reuse objects that are N times bigger than request) - Elide using inter-object events when possible, and deallocate them alongside async alloc output events instead of globally - Prune the async freelist if hitting OOM on normal allocations Co-authored-by: Michał Staniewski <michal.staniewski@intel.com> Co-authored-by: Piotr Balcer <piotr.balcer@intel.com>
@intel/llvm-gatekeepers merge this PR please |
This PR ports USM alloc enqueue API introduced to L0 adapter in #17112 to L0 adapter v2.
Co-authored-by: Michał Staniewski <michal.staniewski@intel.com> Co-authored-by: Piotr Balcer <piotr.balcer@intel.com>
This PR ports USM alloc enqueue API introduced to L0 adapter in intel/llvm#17112 to L0 adapter v2.
This PR ports USM alloc enqueue API introduced to L0 adapter in intel/llvm#17112 to L0 adapter v2.
No description provided.