-
Notifications
You must be signed in to change notification settings - Fork 769
[SYCL] Profile host events only if the submitted queue has profiling enabled #18982
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
…ng enabled Currently profiling for host tasks is tracked no matter what. Track it only if the queue, where host task is submitted, has profiling enabled.
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.
Do you know if this was a bug or a case of changing requirements/design decisions?
@@ -214,8 +200,22 @@ void event_impl::setQueue(queue_impl &Queue) { | |||
|
|||
void event_impl::setSubmittedQueue(std::weak_ptr<queue_impl> SubmittedQueue) { | |||
MSubmittedQueue = std::move(SubmittedQueue); | |||
if (MHostProfilingInfo) { | |||
if (isHost()) { |
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.
Early returns for both if
s would help readability here.
if (!MIsProfilingEnabled || MState == HES_Discarded || | ||
MState == HES_Complete) | ||
return; |
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.
This looks sketchy. Can we assert that event is incomplete?
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.
Also, what would "profiling enabled" even mean for the discarded events?
I believe this is a bug, according to spec 4.6.6. Event class:
Also this can be considered as performance bug as well. |
Currently profiling for host tasks is always enabled. Track profiling info only if the submitted queue (where host task is submitted) has profiling enabled.