Skip to content

[SYCL] Improve kernel name diagnostics implementation #3225

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 29 commits into from
Apr 6, 2021

Conversation

srividya-sundaram
Copy link
Contributor

@srividya-sundaram srividya-sundaram commented Feb 17, 2021

This patch does the following changes in order to be conformant with the updated sycl kernel naming rules in SYCL 2020 spec:
Diagnoses kernel names,

  * declared within namespace 'std' (at any level)
    e.g., namespace std { namespace literals { class Whatever; } }
    h.single_task<std::literals::Whatever>([]() {});
  * declared within an anonymous namespace (at any level)
    e.g., namespace foo { namespace { class Whatever; } }
    h.single_task<foo::Whatever>([]() {});
  * declared within a function
    e.g., void foo() { struct S { int i; };
     h.single_task<S>([]() {} ); }
  * declared within another tag
    e.g., struct S { struct T { int i } t; };
    h.single_task<S::T>([]() {});

Adds new visitor functions:

VisitBuiltinType()

Updates existing diagnostics text.

Fixes #3103

@AaronBallman
Copy link
Contributor

Heh, sorry, I didn't see the Draft tag until after I already did the review work. Sorry if I generated some noise for you!

@srividya-sundaram
Copy link
Contributor Author

srividya-sundaram commented Feb 17, 2021

Heh, sorry, I didn't see the Draft tag until after I already did the review work. Sorry if I generated some noise for you!

Np. I tend to create a draft to check if my initial changes causes any tests to fail.
Thanks for the early feedback, I will address your comments.

@srividya-sundaram srividya-sundaram changed the title [SYCL]Diagnose kernel names nested in "std" and "anonymous" ns [WIP] [SYCL]Diagnose kernel names nested in "std" and "anonymous" ns Mar 1, 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.

I may have missed it, but do we have sufficient existing test coverage for the incomplete struct cases and for the structs within structs cases?

@srividya-sundaram
Copy link
Contributor Author

/summary:run

@srividya-sundaram srividya-sundaram marked this pull request as ready for review March 23, 2021 03:41
AaronBallman
AaronBallman previously approved these changes Mar 24, 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 aside from the commenting request.

premanandrao
premanandrao previously approved these changes Mar 29, 2021
@srividya-sundaram
Copy link
Contributor Author

@kathywar I keep getting Err: Build failed with Error: hudson.AbortException: script returned exit code 255
Can you please take a look?

@kathywar
Copy link

I see this error in the verification run:
image

@srividya-sundaram
Copy link
Contributor Author

Jenkins failure fixed by intel/llvm-test-suite#212
@bader Can you please merge this PR?

@bader
Copy link
Contributor

bader commented Apr 5, 2021

Jenkins failure fixed by intel/llvm-test-suite#212
@bader Can you please merge this PR?

It must be approved by @intel/llvm-reviewers-runtime first.

Copy link
Contributor

@s-kanaev s-kanaev left a comment

Choose a reason for hiding this comment

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

Other than the concern asked, the change looks good.

Copy link
Contributor

@s-kanaev s-kanaev left a comment

Choose a reason for hiding this comment

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

RT test changes look good.

@srividya-sundaram
Copy link
Contributor Author

ping @bader

@bader bader merged commit 0c0f4c5 into intel:sycl Apr 6, 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.

[SYCL] Diagnose kernel names in nested "std" and "anonymous" namespace
8 participants