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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

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.

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 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
@@ -17,6 +17,11 @@ set(UR_TEST_FUZZTESTS ON CACHE BOOL "Run fuzz tests if using clang and UR_DPCXX
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
set(INSTALL_GTEST OFF)
FetchContent_MakeAvailable(googletest)

set_target_properties(gtest PROPERTIES POSITION_INDEPENDENT_CODE ON)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I needed these on SLES for some reason. I'll remove them and create a separate PR once CI finishes (I don't want to force push right now to restart everything).

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 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.

1 participant