File tree 3 files changed +10
-0
lines changed 3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,7 @@ class AttributeCommonInfo {
155
155
auto ParsedAttr = getParsedKind ();
156
156
if (ParsedAttr == AT_SYCLIntelKernelArgsRestrict ||
157
157
(ParsedAttr == AT_ReqdWorkGroupSize && isCXX11Attribute ()) ||
158
+ (ParsedAttr == AT_IntelReqdSubGroupSize && isCXX11Attribute ()) ||
158
159
ParsedAttr == AT_SYCLIntelNumSimdWorkItems ||
159
160
ParsedAttr == AT_SYCLIntelMaxWorkGroupSize)
160
161
return true ;
Original file line number Diff line number Diff line change @@ -25,10 +25,15 @@ void bar() {
25
25
26
26
Functor f;
27
27
kernel<class kernel_name2 >(f);
28
+
29
+ kernel<class kernel_name3 >(
30
+ []() [[cl::intel_reqd_sub_group_size (4 )]] {});
28
31
}
29
32
30
33
// CHECK: define spir_kernel void @{{.*}}kernel_name1() {{.*}} !intel_reqd_sub_group_size ![[SGSIZE16:[0-9]+]]
31
34
// CHECK: define spir_kernel void @{{.*}}kernel_name2() {{.*}} !intel_reqd_sub_group_size ![[SGSIZE8:[0-9]+]]
35
+ // CHECK: define spir_kernel void @{{.*}}kernel_name3() {{.*}} !intel_reqd_sub_group_size ![[SGSIZE4:[0-9]+]]
32
36
// CHECK: ![[SGSIZE16]] = !{i32 16}
33
37
// CHECK: ![[SGSIZE8]] = !{i32 8}
38
+ // CHECK: ![[SGSIZE4]] = !{i32 4}
34
39
Original file line number Diff line number Diff line change @@ -45,9 +45,13 @@ void bar() {
45
45
baz ();
46
46
});
47
47
#endif
48
+
49
+ kernel<class kernel_name5 >([]() [[cl::intel_reqd_sub_group_size (2 )]] { });
48
50
}
49
51
50
52
// CHECK: FunctionDecl {{.*}} {{.*}}kernel_name1
51
53
// CHECK: IntelReqdSubGroupSizeAttr {{.*}} 16
52
54
// CHECK: FunctionDecl {{.*}} {{.*}}kernel_name2
53
55
// CHECK: IntelReqdSubGroupSizeAttr {{.*}} 4
56
+ // CHECK: FunctionDecl {{.*}} {{.*}}kernel_name5
57
+ // CHECK: IntelReqdSubGroupSizeAttr {{.*}} 2
You can’t perform that action at this time.
0 commit comments