Skip to content

[SYCL] Add a workaround for a Level Zero batching issue #4268

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

Merged
merged 2 commits into from
Aug 6, 2021

Conversation

sergey-semenov
Copy link
Contributor

Consider the following scenario on Level Zero:

  1. Kernel A, which uses buffer A, is submitted to queue A.
  2. Kernel B, which uses buffer B, is submitted to queue B.
  3. queueA.wait().
  4. queueB.wait().

DPCPP runtime used to treat unmap/write commands for buffer A/B as host
dependencies (i.e. they were waited for prior to enqueueing any command
that's dependent on them). This allowed Level Zero plugin to detect that
each queue is idle on steps 1/2 and submit the command list right away.
This is no longer the case since we started passing these dependencies in
an event waitlist and Level Zero plugin attempts to batch these commands,
so the execution of kernel B starts only on step 4. This workaround
restores the old behavior in this case until this is resolved.

Consider the following scenario on Level Zero:
1. Kernel A, which uses buffer A, is submitted to queue A.
2. Kernel B, which uses buffer B, is submitted to queue B.
3. queueA.wait().
4. queueB.wait().

DPCPP runtime used to treat unmap/write commands for buffer A/B as host
dependencies (i.e. they were waited for prior to enqueueing any command
that's dependent on them). This allowed Level Zero plugin to detect that
each queue is idle on steps 1/2 and submit the command list right away.
This is no longer the case since we started passing these dependencies in
an event waitlist and Level Zero plugin attempts to batch these commands,
so the execution of kernel B starts only on step 4. This workaround
restores the old behavior in this case until this is resolved.
@sergey-semenov
Copy link
Contributor Author

/summary:run

@sergey-semenov sergey-semenov marked this pull request as ready for review August 6, 2021 10:03
@sergey-semenov sergey-semenov requested a review from a team as a code owner August 6, 2021 10:03
@bader bader merged commit 2023e10 into intel:sycl Aug 6, 2021
@sergey-semenov sergey-semenov deleted the l0batchwa branch August 6, 2021 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants