Skip to content

Commit e42a6f0

Browse files
author
iclsrc
committed
Merge from 'sycl' to 'sycl-web' (#1)
2 parents 4035f5e + 9f1db32 commit e42a6f0

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

clang/include/clang/Basic/AttributeCommonInfo.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ class AttributeCommonInfo {
155155
auto ParsedAttr = getParsedKind();
156156
if (ParsedAttr == AT_SYCLIntelKernelArgsRestrict ||
157157
(ParsedAttr == AT_ReqdWorkGroupSize && isCXX11Attribute()) ||
158+
(ParsedAttr == AT_IntelReqdSubGroupSize && isCXX11Attribute()) ||
158159
ParsedAttr == AT_SYCLIntelNumSimdWorkItems ||
159160
ParsedAttr == AT_SYCLIntelMaxWorkGroupSize)
160161
return true;

clang/test/CodeGenSYCL/reqd-sub-group-size.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,15 @@ void bar() {
2525

2626
Functor f;
2727
kernel<class kernel_name2>(f);
28+
29+
kernel<class kernel_name3>(
30+
[]() [[cl::intel_reqd_sub_group_size(4)]] {});
2831
}
2932

3033
// CHECK: define spir_kernel void @{{.*}}kernel_name1() {{.*}} !intel_reqd_sub_group_size ![[SGSIZE16:[0-9]+]]
3134
// 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]+]]
3236
// CHECK: ![[SGSIZE16]] = !{i32 16}
3337
// CHECK: ![[SGSIZE8]] = !{i32 8}
38+
// CHECK: ![[SGSIZE4]] = !{i32 4}
3439

clang/test/SemaSYCL/reqd-sub-group-size.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,13 @@ void bar() {
4545
baz();
4646
});
4747
#endif
48+
49+
kernel<class kernel_name5>([]() [[cl::intel_reqd_sub_group_size(2)]] { });
4850
}
4951

5052
// CHECK: FunctionDecl {{.*}} {{.*}}kernel_name1
5153
// CHECK: IntelReqdSubGroupSizeAttr {{.*}} 16
5254
// CHECK: FunctionDecl {{.*}} {{.*}}kernel_name2
5355
// CHECK: IntelReqdSubGroupSizeAttr {{.*}} 4
56+
// CHECK: FunctionDecl {{.*}} {{.*}}kernel_name5
57+
// CHECK: IntelReqdSubGroupSizeAttr {{.*}} 2

0 commit comments

Comments
 (0)