Skip to content

[SYCL] Implement diagnostic for !access_mode::read + const T #8169

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 10 commits into from
Feb 4, 2023

Conversation

mmoadeli
Copy link
Contributor

@mmoadeli mmoadeli commented Feb 1, 2023

According to Read only accessors A const qualified DataT is only allowed for a read-only accessor.
This PR:

  • Implements Implement diagnostic for !access_mode::read + const T
  • Adds test to for above diagnostic
  • Updates affected tests.
  • Assigns access::mode:read to access mode of local accessor when the data type is constant. The previous value was access::mode:read, which lead to an assert after implementing above diagnostic.

@mmoadeli mmoadeli requested a review from a team as a code owner February 1, 2023 01:09
@mmoadeli mmoadeli temporarily deployed to aws February 1, 2023 01:38 — with GitHub Actions Inactive
@mmoadeli mmoadeli temporarily deployed to aws February 1, 2023 02:23 — with GitHub Actions Inactive
@mmoadeli mmoadeli changed the title Implement diagnostic for !access_mode::read + const T [SYCL] Implement diagnostic for !access_mode::read + const T Feb 1, 2023
- Use -Xclang -verify for testing
@mmoadeli mmoadeli temporarily deployed to aws February 2, 2023 14:21 — with GitHub Actions Inactive
@mmoadeli mmoadeli temporarily deployed to aws February 2, 2023 14:53 — with GitHub Actions Inactive
Having it requires handling over 20 expected-erros.
@mmoadeli mmoadeli temporarily deployed to aws February 2, 2023 16:25 — with GitHub Actions Inactive
@mmoadeli mmoadeli temporarily deployed to aws February 2, 2023 17:02 — with GitHub Actions Inactive
@mmoadeli mmoadeli temporarily deployed to aws February 3, 2023 15:03 — with GitHub Actions Inactive
Copy link
Contributor

@steffenlarsen steffenlarsen left a comment

Choose a reason for hiding this comment

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

Apart from a small comment about formatting, my concerns have been addressed! 😄

@mmoadeli mmoadeli temporarily deployed to aws February 3, 2023 15:33 — with GitHub Actions Inactive
@mmoadeli mmoadeli temporarily deployed to aws February 3, 2023 16:33 — with GitHub Actions Inactive
@mmoadeli mmoadeli temporarily deployed to aws February 3, 2023 17:15 — with GitHub Actions Inactive
@bader
Copy link
Contributor

bader commented Feb 4, 2023

Failed Tests (1):
SYCL :: KernelAndProgram/spec_constants_after_link.cpp

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.

3 participants