Skip to content

[SYCL] Implemented SYCL 2020 sub-group size functionality. #3444

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 26 commits into from
Apr 15, 2021

Conversation

erichkeane
Copy link
Contributor

As specified here:
https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/SubGroup/SYCL_INTEL_sub_group.asciidoc#attributes

This patch implements the named_sub_group_size attribute as well as the
command line parameter, and creates a new spelling of
reqd_sub_group_size (sub_group_size) to work like the SYCL 2020 version.

As specified here:
https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/SubGroup/SYCL_INTEL_sub_group.asciidoc#attributes

This patch implements the named_sub_group_size attribute as well as the
command line parameter, and creates a new spelling of
reqd_sub_group_size (sub_group_size) to work like the SYCL 2020 version.
@erichkeane
Copy link
Contributor Author

Note that the IR is not finalized, so I have a tentative version for that. I also lack tests as I'd like to get some thoughts on the design/diagnostics ahead of time. I'll in parallel work on adding tests, but any comments you can provide in advance are appreciated!

@erichkeane
Copy link
Contributor Author

Ugh... can't believe I didn't notice this, but 'auto' as an identifer here is going to require a bunch of work.... it'll be incoming :)

@erichkeane
Copy link
Contributor Author

The enum-patch here is going to be time consuming, so that'll take a while. But other than that comment (and getting 'auto' to work!) I think I have everything in my local repo.

The feature architect agreed to change auto to automatic due to
implementation issues.  Also changed over to EnumArgument.
Erich Keane added 4 commits March 30, 2021 12:33
Currently the discussion on the design has lead me to believe that
writing this patch is premature. Some of the in-flight changes to the
spec will severely change what this implementation looks like, so we're
going to put this patch on hold until the spec settles.

This is hopefully in a reasonable enough position where we can pick it
up later without trouble.
@erichkeane
Copy link
Contributor Author

Thank you to @smanna12 and @AaronBallman for the reviews! I'm considering us 'done' with this patch for a while, so don't bother reviewing the last commit until we get a more concrete direction.

Thanks!
-Erich

Erich Keane added 4 commits April 9, 2021 06:57
Still need to do the code gen, but that is broken at least until the
rebase on intel#3475, which is awaiting merge.
Copy link
Contributor

@AaronBallman AaronBallman left a comment

Choose a reason for hiding this comment

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

The tablegen functionality changed out from under you, so the code can be simplified a bit (sorry for the awkward timing of that functionality).

@erichkeane
Copy link
Contributor Author

I think I got it all :) I also removed the 'mergeSYCLSimd' bits as I think you meant that as well.

Currently trying to survive the merge, which is looking a little rough as well, so it'll be a bit before you get to see it all :)

Copy link
Contributor

@AaronBallman AaronBallman left a comment

Choose a reason for hiding this comment

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

Down to basically just nits from me.

mdtoguchi
mdtoguchi previously approved these changes Apr 13, 2021
Copy link
Contributor

@mdtoguchi mdtoguchi left a comment

Choose a reason for hiding this comment

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

OK for Driver - thanks!

@erichkeane
Copy link
Contributor Author

Whew... that should hopefully do it :) I likely need another review from @mdtoguchi due to the driver changes, plus @AaronBallman or @premanandrao for the CFE part.

mdtoguchi
mdtoguchi previously approved these changes Apr 13, 2021
@AaronBallman
Copy link
Contributor

It looks like there are some SYCL runtime test failures related to the changes that still need to be addressed?

@erichkeane
Copy link
Contributor Author

Yikes, I missed that! Thanks Aaron!

Really we should probably be checking this, but since it is a pattern
that is apparently commonly used, AND is a breaking change, we won't
enforce this rule. The standard doesn't require us to (since it is
pretty silent on mixing attribute types).
@erichkeane
Copy link
Contributor Author

Hah, looks like @mdtoguchi moved the code I modified for the driver! I'll do a merge commit, which should fix that and hopefully not run into the flakey problems i've seen here.

@mdtoguchi
Copy link
Contributor

In all honesty, I wasn't expecting my code to be merged before yours!

mdtoguchi
mdtoguchi previously approved these changes Apr 14, 2021
AaronBallman
AaronBallman previously approved these changes Apr 14, 2021
Copy link
Contributor

@AaronBallman AaronBallman left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@premanandrao premanandrao left a comment

Choose a reason for hiding this comment

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

Looks good to me. I just have minor test nits.

@erichkeane erichkeane dismissed stale reviews from AaronBallman and mdtoguchi via 51f7617 April 14, 2021 16:34
@erichkeane
Copy link
Contributor Author

Just blocked by @mdtoguchi at the moment :) Otherwise i seem to have finally made it through the buildbot guantlet.

@bader bader changed the title Implemented SYCL 2020 sub-group size functionality. [SYCL] Implemented SYCL 2020 sub-group size functionality. Apr 15, 2021
@bader bader merged commit 347e41c into intel:sycl Apr 15, 2021
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.

8 participants