Skip to content

[SYCL]Fixes a performance issue due to https://github.com/intel/llvm/… - #3797

Merged
bader merged 2 commits into
intel:syclfrom
kbsmith-intel:endbatch_on_event_query_v2
May 23, 2021
Merged

bader merged 2 commits into
intel:syclfrom
kbsmith-intel:endbatch_on_event_query_v2

Conversation

@kbsmith-intel

Copy link
Copy Markdown
Contributor

…pull/3612

This change does two things to fix the performance issue.
The first is in the level zero plugin. Here the change is to only
close and submit the batch if the event being queried is one that
will be signalled one of the commands in the batch.

The second change is in the sycl run-time itself. This change
prevents the event cleanup code from querying every single event
that is outstanding in the system. This is necessary to prevent
the most recent events (which are likely to be in the plug-ins batch)
from being queried.

Both changes are required to fix the performance issue.

This change does two things to fix the performance issue.
The first is in the level zero plugin.  Here the change is to only
close and submit the batch if the event being queried is one that
will be signalled one of the commands in the batch.

The second change is in the sycl run-time itself.  This change
prevents the event cleanup code from querying every single event
that is outstanding in the system.  This is necessary to prevent
the most recent events (which are likely to be in the plug-ins batch)
from being queried.

Both changes are required to fix the performance issue.
@kbsmith-intel
kbsmith-intel requested review from a team and smaslov-intel as code owners May 21, 2021 15:05

@romanovvlad romanovvlad left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add a test/extend existing one?

Example of a test for sycl::queue:
sycl/source see unittests/queue/EventClear.cpp

@kbsmith-intel

Copy link
Copy Markdown
Contributor Author

Could you please add a test/extend existing one?

Example of a test for sycl::queue:
sycl/source see unittests/queue/EventClear.cpp

Done. Updated unittests/queue/EventClear.cpp

@kbsmith-intel
kbsmith-intel requested a review from romanovvlad May 21, 2021 18:11

@smaslov-intel smaslov-intel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bader
bader merged commit 4dc23a2 into intel:sycl May 23, 2021
@kbsmith-intel
kbsmith-intel deleted the endbatch_on_event_query_v2 branch May 24, 2021 22:35
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.

4 participants