File tree Expand file tree Collapse file tree 3 files changed +27
-1
lines changed
Expand file tree Collapse file tree 3 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -780,9 +780,11 @@ def SyclIvdepAttribute : DiagGroup<"ivdep-compat">;
780780def IndependentClassAttribute : DiagGroup<"IndependentClass-attribute">;
781781def UnknownAttributes : DiagGroup<"unknown-attributes">;
782782def IgnoredAttributes : DiagGroup<"ignored-attributes", [SyclIvdepAttribute]>;
783+ def IncorrectSubGroupSize: DiagGroup<"incorrect-sub-group-size">;
783784def AcceptedAttributes : DiagGroup<"accepted-attributes">;
784785def Attributes : DiagGroup<"attributes", [UnknownAttributes,
785786 IgnoredAttributes,
787+ IncorrectSubGroupSize,
786788 AcceptedAttributes]>;
787789def UnknownSanitizers : DiagGroup<"unknown-sanitizers">;
788790def UnnamedTypeTemplateArgs : DiagGroup<"unnamed-type-template-args",
Original file line number Diff line number Diff line change @@ -3539,7 +3539,7 @@ def warn_attribute_on_direct_kernel_callee_only : Warning<"%0 attribute allowed"
35393539def warn_reqd_sub_group_attribute_n
35403540 : Warning<"attribute argument %0 is invalid and will be ignored; %1 "
35413541 "requires sub_group size %2">,
3542- InGroup<IgnoredAttributes >;
3542+ InGroup<IncorrectSubGroupSize >;
35433543def warn_nothrow_attribute_ignored : Warning<"'nothrow' attribute conflicts with"
35443544 " exception specification; attribute ignored">,
35453545 InGroup<IgnoredAttributes>;
Original file line number Diff line number Diff line change 1+ // RUN: %clang_cc1 -fsycl-is-device -triple nvptx -internal-isystem %S/Inputs -std=c++2b -verify -Wno-incorrect-sub-group-size %s
2+ // RUN: %clang_cc1 -fsycl-is-device -triple nvptx -internal-isystem %S/Inputs -std=c++2b -verify -Wno-attributes %s
3+ // RUN: %clang_cc1 -fsycl-is-device -triple amdgcn-amd-amdhsa -target-cpu gfx90a -internal-isystem %S/Inputs -std=c++2b -verify -Wno-incorrect-sub-group-size %s
4+ // RUN: %clang_cc1 -fsycl-is-device -triple amdgcn-amd-amdhsa -target-cpu gfx90a -internal-isystem %S/Inputs -std=c++2b -verify -Wno-attributes %s
5+ // RUN: %clang_cc1 -fsycl-is-device -triple amdgcn-amd-amdhsa -target-cpu gfx1010 -internal-isystem %S/Inputs -std=c++2b -verify -Wno-incorrect-sub-group-size %s
6+ // RUN: %clang_cc1 -fsycl-is-device -triple amdgcn-amd-amdhsa -target-cpu gfx1010 -internal-isystem %S/Inputs -std=c++2b -verify -Wno-attributes %s
7+ //
8+ // Sub group size of 8 is incompatible with both CUDA and HIP, expect it to be
9+ // silenced. Check both the dedicated switch '-Wno-incorrect-sub-group-size' and
10+ // the catch all '-Wno-attributes'.
11+ #include " sycl.hpp"
12+
13+
14+ // expected-no-diagnostics
15+ int main () {
16+
17+ sycl::queue Q;
18+
19+ Q.submit ([&](sycl::handler &h) {
20+ h.single_task <class invalid_kernel >([=] [[sycl::reqd_sub_group_size (8 )]] {});
21+ });
22+
23+ return 0 ;
24+ }
You can’t perform that action at this time.
0 commit comments