-
Notifications
You must be signed in to change notification settings - Fork 769
[SYCL] Enqueue dependencies of blocked command #2543
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: Sergey Kanaev <sergey.kanaev@intel.com>
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
Need to fix unit-test |
LGTM. I think this change likely will not pessimize the problem which was fixed by bc8f0a4. |
Is there any benchmark to check this assumption/hypothesis? |
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
No, there is not. Only unit tests. |
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
I think that we should prefer #2561 instead of this one. |
Closing this PR as there is a more preferable solution in #2561 |
Document how llvm intrinsics are lowered by SPIRV-LLVM-Translator. Signed-off-by: Lu, John <john.lu@intel.com> Original commit: KhronosGroup/SPIRV-LLVM-Translator@45154b58186cb22
Let's have this part of dependency graph:
EC1
andEC2
are of helper typeEmptyCommand
. Both are blocked.C1
andC2
are of any other type which represents some meaningful operation i.e. the one that actually does something useful, likeExecCGCommand
with a host task orUpdateHostReqCommand
for host accessor.This part of graph is result of two submissions: the first one adds
EC1 -> C1
and the second addsEC2 -> C2 -> EC1
.The submission process in both cases adds the corresponding
Cx
command in first place and then adds the empty commandECx
. WhenCx
is added to the graph it's also added to list of leaves for corresponding memory record. Now, whenECx
is added to graph it removes correspondingCx
from list of leaves.ECx
is added to the list instead ofCx
. Blocked state ofECx
prevents it from being enqueued.Upon the second submission,
C2
isn't going to be enqueued right away as it depends on blockedEC1
.When
C1
finishes (whether it is a host task or host accessor's update command) SYCL RT will unblockEC1
and trigger enqueue process for leaves of memory recordsC1
was depending by. Eventually, RT will enqueue theEC1
which will set its event into complete state. Though,EC2
isn't going to be enqueued due to it's blocked state. Neither does its dependencies.PR with test: #2540
PR with comment fix: #2541
A more workaroundey way is available at #2542