-
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] Manage UMF pools through usm::pool_manager #2495
base: main
Are you sure you want to change the base?
Conversation
8b14272
to
223fd4e
Compare
b00072c
to
2a62983
Compare
281e3e4
to
30d5386
Compare
source/common/ur_pool_manager.hpp
Outdated
@@ -289,6 +289,12 @@ template <typename D> struct pool_manager { | |||
|
|||
return it->second.get(); | |||
} | |||
|
|||
bool hasPool(umf_memory_pool_handle_t hPool) noexcept { |
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.
One UR pulls down this commit oneapi-src/unified-memory-framework@86d2341 hasPool
won't be necessary - you will be able to just use umfPoolByPtr
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've decided not to include the umfPool[Set/Get]Tag
changes in this PR. After trying to implement it I've encountered some complications in ur_result_t ur_validation_layer::bounds(ur_queue_handle_t, const void*, size_t, size_t)
from ur_validation_layer.cpp
.
30d5386
to
cdbec07
Compare
44fcaa0
to
51fec4f
Compare
8a2b671
to
38752a1
Compare
b7a42f9
to
9bc686d
Compare
8023b0a
to
5ee6a87
Compare
5ee6a87
to
5022823
Compare
|
||
// Peform actual device allocation as needed. | ||
if (!Allocation.ZeHandle) { | ||
if (!SingleRootDeviceBufferMigration && UrContext->SingleRootDevice && |
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.
did you intentionally remove this logic?
why?
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.
SingleRootDevice
from Context is default initialized to nullptr
and is never set to any value, hence this if statement would always evaluate to false
so I've removed this variable alltogether.
source/adapters/level_zero/usm.cpp
Outdated
// find the allocator depending on context as we do for Shared and Device | ||
// allocations. | ||
umf_memory_pool_handle_t hPoolInternal = nullptr; | ||
ur_usm_pool_handle_t USMPool = nullptr; | ||
if (!UseUSMAllocator) { |
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.
Isn't UseUSMAllocator a global variable? Can't we just read it in contextCreate and decide whether to create ProxyPool or DisjointPool there? We would only have one defaultPool in the context this way.
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.
Done. I've removed the ProxyPool
from Context, now it's the DefaultPool
that uses different pool implementation depending on the UseUSMAllocator
variable.
5022823
to
6b22b21
Compare
This variable is not initialized in any way and it is set to nullptr by default.
Level Zero provider internally stores native errors of ur_result_t type.
6b22b21
to
69b3a4e
Compare
Unified Runtime -> intel/llvm Repo Move NoticeInformationThe source code of Unified Runtime has been moved to intel/llvm under the unified-runtime top-level directory, The code will be mirrored to oneapi-src/unified-runtime and the specification will continue to be hosted at oneapi-src.github.io/unified-runtime. The contribution guide has been updated with new instructions for contributing to Unified Runtime. PR MigrationAll open PRs including this one will be labelled auto-close and shall be automatically closed after 30 days. Should you wish to continue with your PR you will need to migrate it to intel/llvm. This is an automated comment. |
Unified Runtime -> intel/llvm Repo Move NoticeFollowing on from the previous notice, we have now enabled workflows to automatically label and close PRs because the Unified Runtime source code has moved to intel/llvm. This PR has now been marked with the Please review the previous notice for more information, including assistance with migrating your PR to intel/llvm. Should there be a reason for this PR to remain open, manually remove the This is an automated comment. |
No description provided.