-
Notifications
You must be signed in to change notification settings - Fork 798
[UR][L0] Fix allocation lookup in EnqueuedPool #19638
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
1c623a3
to
8065a18
Compare
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.
lgtm, just one nit.
@@ -43,25 +44,40 @@ class EnqueuedPool { | |||
bool cleanup(); | |||
bool cleanupForQueue(void *Queue); | |||
|
|||
private: | |||
// Allocations are grouped by queue and alignment. | |||
struct AllocationGroupKey { |
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.
We should be consistent, either use a custom comparator or implement operator<
in the key for both types.
8065a18
to
3f79313
Compare
3f79313
to
c323efa
Compare
c323efa
to
499fa02
Compare
499fa02
to
2e1b162
Compare
2e1b162
to
cb8c94f
Compare
cb8c94f
to
f528c22
Compare
@intel/llvm-gatekeepers please merge |
This PR updates the allocation management algorithm to address cases where it fails to find suitable allocations due to how it performs lower bound searches.
Example:
If we request
align=64
,size=512
, the current code looks atAllocation(align=4096, size=128)
and skips the rest, even thoughAllocation(align=4096, size=1024)
would work.This PR introduces grouping the allocations by queue and alignment.