Skip to content
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

fix event caching #2395

Merged
merged 1 commit into from
Dec 2, 2024
Merged

fix event caching #2395

merged 1 commit into from
Dec 2, 2024

Conversation

pbalcer
Copy link
Contributor

@pbalcer pbalcer commented Nov 28, 2024

L0 requires the adapter to use a variety of different events, depending on the specific use case and configuration. Events are also unique for devices.
And, because the adapter wants to avoid unnecessarily allocating new events from the driver, this necessities an event caching solution that can separate the different event type and device combinations.

When counter-based events were introduced the event caching was not properly expanded to take that event type into consideration, presumably with the assumption that normal and counter based events will never coexist. Unfortunately that is not true for the current adapter implementation.

This patch simplifies the event caching logic, ensuring that each unique event type and device combination has its own event cache.

@github-actions github-actions bot added the level-zero L0 adapter specific issues label Nov 28, 2024
@pbalcer pbalcer force-pushed the fix-event-pooling branch 2 times, most recently from 90de421 to 100c648 Compare November 28, 2024 12:49
@pbalcer pbalcer marked this pull request as ready for review November 28, 2024 12:50
@pbalcer pbalcer requested review from a team as code owners November 28, 2024 12:50
@pbalcer
Copy link
Contributor Author

pbalcer commented Nov 28, 2024

intel/llvm#16207

@pbalcer pbalcer added v0.10.x Include in the v0.10.x release v0.11.x Include in the v0.11.x release labels Nov 28, 2024
Copy link
Contributor

@nrspruit nrspruit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you for the optimization of the device mapping, using the id/uuid is much clearer.

L0 requires the adapter to use a variety of different events, depending
on the specific use case and configuration. Events are also unique for
devices.
And, because the adapter wants to avoid unnecessarily allocating new
events from the driver, this necessities an event caching solution that
can separate the different event type and device combinations.

When counter-based events were introduced the event caching was
not properly expanded to take that event type into consideration,
presumably with the assumption that normal and counter based events
will never coexist. Unfortunately that is not true for the current
adapter implementation.

This patch simplifies the event caching logic, ensuring that
each unique event type and device combination has its own
event cache.
@pbalcer pbalcer added the ready to merge Added to PR's which are ready to merge label Dec 2, 2024
@martygrant martygrant merged commit 7a38cc3 into oneapi-src:main Dec 2, 2024
73 checks passed
kbenzie pushed a commit to kbenzie/unified-runtime that referenced this pull request Dec 2, 2024
sommerlukas pushed a commit to intel/llvm that referenced this pull request Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level-zero L0 adapter specific issues ready to merge Added to PR's which are ready to merge v0.10.x Include in the v0.10.x release v0.11.x Include in the v0.11.x release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants