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">;
780
780
def IndependentClassAttribute : DiagGroup<"IndependentClass-attribute">;
781
781
def UnknownAttributes : DiagGroup<"unknown-attributes">;
782
782
def IgnoredAttributes : DiagGroup<"ignored-attributes", [SyclIvdepAttribute]>;
783
+ def IncorrectSubGroupSize: DiagGroup<"incorrect-sub-group-size">;
783
784
def AcceptedAttributes : DiagGroup<"accepted-attributes">;
784
785
def Attributes : DiagGroup<"attributes", [UnknownAttributes,
785
786
IgnoredAttributes,
787
+ IncorrectSubGroupSize,
786
788
AcceptedAttributes]>;
787
789
def UnknownSanitizers : DiagGroup<"unknown-sanitizers">;
788
790
def 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"
3539
3539
def warn_reqd_sub_group_attribute_n
3540
3540
: Warning<"attribute argument %0 is invalid and will be ignored; %1 "
3541
3541
"requires sub_group size %2">,
3542
- InGroup<IgnoredAttributes >;
3542
+ InGroup<IncorrectSubGroupSize >;
3543
3543
def warn_nothrow_attribute_ignored : Warning<"'nothrow' attribute conflicts with"
3544
3544
" exception specification; attribute ignored">,
3545
3545
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