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 test plan for SYCL_KHR_GROUP_INTERFACE #1023

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

0x12CC
Copy link
Contributor

@0x12CC 0x12CC commented Jan 22, 2025

No description provided.

@gmlueck
Copy link
Contributor

gmlueck commented Jan 22, 2025

0x12CC requested review from gmlueck and https://github.com/orgs/KhronosGroup/teams/sycl-cts-reviewers as code owners 18 minutes ago

@Pennycook can you review this? I think you're closer to this API than me, so you'd do a better job reviewing the test plan.

@0x12CC
Copy link
Contributor Author

0x12CC commented Jan 22, 2025

I didn't include any of the C++ 23 member functions in this test plan since I don't have a working implementation of <mdspan>. Adding these tests shouldn't be much work but it's difficult to do without this header since I can't be sure the tests actually compile and run correctly.

@Pennycook
Copy link
Contributor

I didn't include any of the C++ 23 member functions in this test plan since I don't have a working implementation of <mdspan>. Adding these tests shouldn't be much work but it's difficult to do without this header since I can't be sure the tests actually compile and run correctly.

Could you use https://github.com/kokkos/mdspan? That's what I've used for mdspan experiments in the past.

@0x12CC
Copy link
Contributor Author

0x12CC commented Jan 22, 2025

I didn't include any of the C++ 23 member functions in this test plan since I don't have a working implementation of <mdspan>. Adding these tests shouldn't be much work but it's difficult to do without this header since I can't be sure the tests actually compile and run correctly.

Could you use https://github.com/kokkos/mdspan? That's what I've used for mdspan experiments in the past.

I'll try using this to add the missing test cases.

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!

Copy link
Contributor

@Pennycook Pennycook left a comment

Choose a reason for hiding this comment

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

What's here so far looks good to me. I've held off on approving to give @0x12CC a chance to experiment with kokkos/mdspan, as it would be nice to have the C++23 tests in place.

* Define a `sycl::group<Dimensions>` named `group` using `it.get_group()`.
* Define a `sycl::khr::work_group<Dimensions>` named `work_group` using `it.get_group()`.
* Define a `sycl::khr::work_item<sycl::khr::work_group<Dimensions>>` named `item` using `sycl::khr::get_item(work_group)`.
* Check that `item.id()` returns a `work_item<>::id_type`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Checking: Are you using work_item<>::id_type here as a shorthand for work_item<sycl::khr::work_group<Dimensions>>::id_type?

Somebody might misinterpret this as work_item<> (i.e., the class with the template arguments defaulted). I've not reviewed one of these test plans before, but if you think it's important to be unambiguous here you could say something like:

Suggested change
* Check that `item.id()` returns a `work_item<>::id_type`.
* Define a type alias `wg_item` equal to `sycl::khr::work_item<sycl::khr::work_group<Dimensions>>`.
* Check that `item.id()` returns a `wg_item::id_type`.

Same comment for the other work_item functions.

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