Skip to content

No diagnostic for checking reqd_work_group_size and reqd_work_group_size attributes when merging #5735

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

Closed
smanna12 opened this issue Mar 4, 2022 · 0 comments · Fixed by #5782
Assignees
Labels
bug Something isn't working confirmed

Comments

@smanna12
Copy link
Contributor

smanna12 commented Mar 4, 2022

// FIXME: We do not have support yet for checking
// reqd_work_group_size and reqd_work_group_size
// attributes when merging, so the test compiles without
// any diagnostic when it shouldn't

[[sycl::reqd_work_group_size(32, 1, 1)]] void f(); // expected-note {{conflicting attribute is here}} now OK
[[sycl::reqd_work_group_size(1, 1, 32)]] void f(); // expected-error{{'reqd_work_group_size' attribute conflicts with 'reqd_work_group_size' attribute}} now OK

@smanna12 smanna12 added the bug Something isn't working label Mar 4, 2022
@smanna12 smanna12 self-assigned this Mar 4, 2022
@bader bader linked a pull request Mar 11, 2022 that will close this issue
bader pushed a commit that referenced this issue Mar 22, 2022
This patch

1. refactors SYCL kernel function attribute reqd_work_group_size to better fit for community standards.

2. refactors the way we handled duplicate attributes logic with when present on a given declaration.

3. refactors the way we handled mutually exclusive attributes logic with when present on a given declaration with 
     reqd_work_group_size, max_work_group_size, max_global_work_dim, and num_simd_work_items attributes.

5. handles redeclarations or template instantiations properly.

6. stores ConstantExpr into the semantic attribute rather than calling getIntegerConstantExpr() for attribute dimension values. 

7. fixes crash with optional arguments on ReqdWorkGroupAttr and adds missing diagnostics for merging cases  when present 
    on a given declaration with reqd_work_group_size, max_work_group_size, max_global_work_dim, and num_simd_work_items 
    attributes.

8. updates clang-tidy build after reqd_work_group_size attribute changes.

9.  adds tests.

This patch fixes 
#5736, #5735, #5734, #5732, #5731, #3223, #3361, #3175, #3742, and #5733

Signed-off-by: Soumi Manna <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirmed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant