-
Notifications
You must be signed in to change notification settings - Fork 798
[SYCL][L0 v2] Use counter-based events #20788
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
base: sycl
Are you sure you want to change the base?
Conversation
|
|
KFilipek
left a comment
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
Signed-off-by: Mateusz P. Nowak <[email protected]>
Signed-off-by: Mateusz P. Nowak <[email protected]>
| (platform->ZeDriver, "zexCounterBasedEventCreate2", | ||
| (void **)&this->eventCreateFunc)); | ||
| if (result != ZE_RESULT_SUCCESS) { | ||
| throw ur_result_t(ze2urResult(result)); |
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'm pretty sure that ZE2UR_CALL_THROWS does what you are doing here, it also prints an error message when UR_ENABLE_ASSERTIONS is enabled in cmake.
| // If counter-based events are not supported, fall back to normal events | ||
| // Remove the counter flag as the normal provider doesn't support it | ||
| event_flags_t normalFlags = flags & ~EVENT_FLAGS_COUNTER; | ||
| return std::make_unique<provider_normal>(context, queueType, normalFlags); |
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.
provider_normal still supports the counter events, it just uses the old API to do that. provider_counter throwing an exception would mean that the zexCounterBasedEventCreate2 function is unavailable, not that counter-based events aren't supported.
provider_normal should be used when EVENT_FLAGS_COUNTER is not set or provider_counter has thrown an error because zexCounterBasedEventCreate2 is unavailable.
Use counter-based events in level-zero v2 adapter