Skip to content

[SYCL][DOC] Add initial spec draft for new default device #15382

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 15 commits into from
Jan 15, 2025

Conversation

jbrodman
Copy link
Contributor

@jbrodman jbrodman commented Sep 12, 2024

This is a draft for a new extension to add the notion of a default device. It adds a method to query the current device from the calling thread as well as a method to change it.

@jbrodman jbrodman requested a review from a team as a code owner September 12, 2024 18:35
@etomzak
Copy link

etomzak commented Oct 29, 2024

The default device portion of this extension is very interesting for SYCL SC. We probably need something similar as a core feature for SYCL SC 1.0.

I might be missing something, but I don't immediately see how the default device, memory & allocation, and submission portions of this extension are related. Are they? I ask because default device solves some problems for SYCL SC, so it would be good to align with SYCL on solving that problem. It's less clear how relevant the other parts of the extension are to SYCL SC.

Copy link
Contributor

@gmlueck gmlueck left a comment

Choose a reason for hiding this comment

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

I've added some granular comments below, but I have a big picture comment too.

What is the customer request that we are solving with this? I wonder if we are going to far by adding the concept of the default queue and the functions that implicitly submit work to the default queue. In particular the memory functions seem like they would be confusing. If you saw code like this:

sycl::copy(src, dest, N);

I think most people would expect this to immediately copy memory from src to dest, but that is not the semantic of this command. It seems like this confusion would outweigh whatever benefit we gain. Even a call to barrier seems like it could be confusing:

sycl::barrier();

I can imagine that people would expect this to be some sort of host barrier instruction.

If we do not have a request for these functions that assume a default queue, I think it would be better to wait until there is a more clear requirement. We might want to consider new names if we ever do add functions like this.

Is the real user request just set_current_device and get_current_device? If so, maybe we should just add those for now.

@jbrodman jbrodman requested review from Pennycook and gmlueck January 9, 2025 19:07
@jbrodman jbrodman changed the title [SYCL][DOC] Add initial spec draft for new default devices and queues [SYCL][DOC] Add initial spec draft for new default device Jan 10, 2025
@gmlueck
Copy link
Contributor

gmlueck commented Jan 10, 2025

@jbrodman let me know when this is ready to review again. I think there are still some spelling / formatting comments to address.

Signed-off-by: James Brodman <[email protected]>
Signed-off-by: James Brodman <[email protected]>
@@ -0,0 +1,140 @@
= sycl_ext_oneapi_current_device
Copy link
Contributor

Choose a reason for hiding this comment

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

From the description: "It also extends the new launch mechanisms with queue-less forms that utilize the default device's default queue."

Am I correct that these changes will be introduced in separate PR/spec?

Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch. The PR description should be changed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. Took a second to realize this was the PR description and not the spec. :)

@steffenlarsen steffenlarsen merged commit 0629c6c into intel:sycl Jan 15, 2025
3 checks passed
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.

7 participants