-
Notifications
You must be signed in to change notification settings - Fork 788
[SYCL] Make host task blocking and detach empty command. Part 1 #6995
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
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
Could you give a brief description of what this PR is achieving and why it is needed? Thanks |
It is intended to solve existing gap in implementation that kernel enqueue depending on host task via depends_on will wait for host task completion in its own enqueue. I want to change this approach and make it similar with the one we use when we have memory dependencies. TO conclude this PR (not fully ready yet) has intension to:
Please let me know if you need more details or have any concerns. |
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
fixes #7146 |
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
42b81d5
to
e6b91da
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 aside from some minor comments, feel free to apply separately.
return MEnqueueStatus == EnqueueResultT::SyclEnqueueBlocked; | ||
return MIsBlockable && MEnqueueStatus == EnqueueResultT::SyclEnqueueBlocked; | ||
} | ||
// Shows thst command could be enqueud, but is blocking enqueue of all |
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.
// Shows thst command could be enqueud, but is blocking enqueue of all | |
// Shows that command could be enqueued, but is blocking enqueue of all |
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.
fixed in e213e81
@@ -325,6 +337,14 @@ class Command { | |||
/// Indicates that the node will be freed by cleanup after enqueue. Such nodes | |||
/// should be ignored by other cleanup mechanisms. | |||
bool MPostEnqueueCleanup = false; | |||
|
|||
/// Contains list of commands that depends on the host command explicitly (by | |||
/// depends_on). Not involved into cleanup process since it is one-way link |
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.
/// depends_on). Not involved into cleanup process since it is one-way link | |
/// depends_on). Not involved in the cleanup process since it is one-way link |
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.
fixed in e213e81
|
||
/// Contains list of commands that depends on the host command explicitly (by | ||
/// depends_on). Not involved into cleanup process since it is one-way link | ||
/// and not holds resources. |
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.
/// and not holds resources. | |
/// and does not hold resources. |
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.
fixed in e213e81
BlockingT Blocking = NON_BLOCKING); | ||
|
||
static bool handleBlockingCmd(Command *Cmd, EnqueueResultT &EnqueueResult, |
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.
Could you add a comment for this function?
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.
fixed in e213e81
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
@intel/llvm-gatekeepers the change is ready for merge, sorry, closed PR by accident and should wait for checks again |
@KseniyaTikhomirova, post-commit issue: https://github.com/intel/llvm/actions/runs/3689466995/jobs/6245440471 |
#7770, hopefully. |
It is intended to solve existing gap in implementation that kernel enqueue depending on host task via depends_on will wait for host task completion in its own enqueue. I want to change this approach and make it similar with the one we use when we have memory dependencies.
It also should help with cleanup process because now host task is represented with two instances - ExecCGCommand and EmptyCommand that introduces leaks in some scenarios.
Signed-off-by: Tikhomirova, Kseniya [email protected]