@@ -77,34 +77,30 @@ void bar() {
77
77
FunctorAttr fattr;
78
78
kernel<class kernel_name4 >(fattr);
79
79
80
+ kernel<class kernel_name5 >([]() [[cl::reqd_work_group_size (32 , 32 , 32 )]] {
81
+ f32x32x32 ();
82
+ });
83
+
84
+
80
85
#ifdef TRIGGER_ERROR
81
86
Functor8 f8 ;
82
- kernel<class kernel_name5 >(f8 );
87
+ kernel<class kernel_name6 >(f8 );
83
88
84
- kernel<class kernel_name6 >([]() { // expected-error {{conflicting attributes applied to a SYCL kernel}}
89
+ kernel<class kernel_name7 >([]() { // expected-error {{conflicting attributes applied to a SYCL kernel}}
85
90
f4x1x1 ();
86
91
f32x1x1 ();
87
92
});
88
93
89
- kernel<class kernel_name7 >([]() { // expected-error {{conflicting attributes applied to a SYCL kernel}}
94
+ kernel<class kernel_name8 >([]() { // expected-error {{conflicting attributes applied to a SYCL kernel}}
90
95
f16x1x1 ();
91
96
f16x16x1 ();
92
97
});
93
98
94
- kernel<class kernel_name8 >([]() { // expected-error {{conflicting attributes applied to a SYCL kernel}}
99
+ kernel<class kernel_name9 >([]() { // expected-error {{conflicting attributes applied to a SYCL kernel}}
95
100
f32x32x32 ();
96
101
f32x32x1 ();
97
102
});
98
103
99
- // Support for reqd_work_group_size (and other SYCL attributes) that apply to
100
- // lambda expressions is not implemented in clang yet.
101
- // When it lands, the following code is expected to compile successfully.
102
- //
103
- // expected-error@+1 {{'reqd_work_group_size' attribute cannot be applied to types}}
104
- kernel<class kernel_name9 >([]() [[cl::reqd_work_group_size (32 , 32 , 32 )]] {
105
- f32x32x32 ();
106
- });
107
- // While this case is not going to work (wrong syntax):
108
104
// expected-error@+1 {{expected variable name or 'this' in lambda capture list}}
109
105
kernel<class kernel_name10 >([[cl::reqd_work_group_size (32 , 32 , 32 )]] []() {
110
106
f32x32x32 ();
@@ -121,4 +117,6 @@ void bar() {
121
117
// CHECK: ReqdWorkGroupSizeAttr {{.*}} 16 16 16
122
118
// CHECK: FunctionDecl {{.*}} {{.*}}kernel_name4
123
119
// CHECK: ReqdWorkGroupSizeAttr {{.*}} 128 128 128
120
+ // CHECK: FunctionDecl {{.*}} {{.*}}kernel_name5
121
+ // CHECK: ReqdWorkGroupSizeAttr {{.*}} 32 32 32
124
122
#endif // __SYCL_DEVICE_ONLY__
0 commit comments