Skip to content
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

Add sycl_khr_work_item_queries extension #682

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Pennycook
Copy link
Contributor

This extension allows developers to access instances of the sycl::nd_item, sycl::group and sycl::sub_group classes without having to explicitly pass them as arguments to each function used on the device.

This extension allows developers to access instances of the sycl::nd_item,
sycl::group and sycl::sub_group classes without having to explicitly pass them
as arguments to each function used on the device.
get_group() conveys that it returns a sycl::group, avoids introducing a
dependency on the khr_group_interface extension, and reserves get_work_group()
for future use.
Copy link
Member

@keryell keryell left a comment

Choose a reason for hiding this comment

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

Thanks!

@tomdeakin
Copy link
Contributor

Awaiting CTS

@jbrodman
Copy link
Contributor

So this is a bit late, but could we consider collapsing some of this down? the this_work_item:: namespace doesn't seem to be doing much more than adding char count. Something maybe like sycl::this_work_item() seems just as intuitive.

@Pennycook
Copy link
Contributor Author

So this is a bit late, but could we consider collapsing some of this down? the this_work_item:: namespace doesn't seem to be doing much more than adding char count. Something maybe like sycl::this_work_item() seems just as intuitive.

After some offline discussion, the names that people seem to like most are:

namespace sycl {
namespace khr {

template <int Dimensions>
nd_item<Dimensions> this_nd_item();

template <int Dimensions>
group<Dimensions> this_group();

sub_group this_sub_group();

}
}

...which would naturally extend to include this_work_item(), this_work_group() and this_root_group() from other KHRs.

@Pennycook Pennycook added the Agenda To be discussed during a SYCL committee meeting label Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Agenda To be discussed during a SYCL committee meeting Waiting for CTS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants