Skip to content

[SYCL] [L0] Use L0 immediate commandlists if specified via env var. #6468

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 20 commits into from
Aug 30, 2022

Conversation

rdeodhar
Copy link
Contributor

@rdeodhar rdeodhar commented Jul 22, 2022

Use L0 immediate commandlists if explicitly specified.
This is a preliminary step towards using deviceid to detect devices on which use of immediate commandlists is preferred, and switching to using immediate commandlists on those devices automatically.

Signed-off-by: Rajiv Deodhar [email protected]

@rdeodhar rdeodhar marked this pull request as ready for review August 10, 2022 23:10
@rdeodhar rdeodhar requested a review from a team as a code owner August 10, 2022 23:10
Copy link
Contributor

@smaslov-intel smaslov-intel left a comment

Choose a reason for hiding this comment

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

It appears I failed to submit my comments from a prior review, please take a look

// For some devices (e.g. PVC) immediate commandlists are preferred.
bool ImmCommandListsPreferred;

// Return the Events scope to be used in for this device.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can that be a problem that the 2+ devices in the system use different event scopes? Say, one device is submitting immediately and as such is using the OnDemandHostVisibleProxy and the other device is waiting for it (not involving host, otherwise a host-visible proxy would be created and waited. Is there no possibility of deadlock here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

L0 distinguishes between host-visible or not. When not host visible the documentation says that events are visible to peer devices.
This issue (if an issue) is not unique to use of immediate commandlists. If the plugin is set to use OnDemandHostVisibleProxy then the same situation of cross-device event checking could still occur.

Copy link
Contributor

Choose a reason for hiding this comment

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

With the OnDemandHostVisibleProxy, the proxy is only created when SYCL RT is waiting for an event on the host. Until these changes every device would use the same strategy, so there wouldn't be a conflict (in strategies). Could you try to create a test case that different devices (now using the different strategies) would still work together smoothly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A test for cross-device events has been created and is being used to verify the situation where one device might use standard commandlists and another immediate commandlists.

Copy link
Contributor

Choose a reason for hiding this comment

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

I assume the test didn't reveal any issues currently, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No issues found by the test - cross-device events work as expected.

@rdeodhar rdeodhar changed the title [SYCL] [L0] Make use of immediate commandlists default on PVC. [SYCL] [L0] Use L0 immediate commandlists if specified via env var. Aug 25, 2022
@rdeodhar rdeodhar requested a review from againull August 29, 2022 20:11
@againull againull merged commit 2ffd50a into intel:sycl Aug 30, 2022
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