You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SYCL] [FPGA] Add mutual diagnostic for num_simd_work_items attribute in conjunction with the reqd_work_group_size attribute
This is a follow up comments on intel#2906 (comment)
There is a rule on FPGA document that the num_simd_work_items attribute we specify must evenly divide
the work-group size we specify for the reqd_work_group_size attribute, was missed during initial
implemention of the num_simd_work_items attribute.
OpenCL spelling for num_simd_work_items attribute supports this rule.
This patch
1. addes support for mutual diagnostic in Sema for num_simd_work_items attribute interacting with reqd_work_group_size attribute.
2. addes tests
3. updates documenation about the num_simd_work_items attribute with the note and exmaples.
Current implementation of SYCL attribute “num_simd_work_items” and “reqd_work_group_size” does not support this.
Signed-off-by: Soumi Manna <[email protected]>
[[intel::num_simd_work_items(0)]] int Var = 0; // expected-error{{'num_simd_work_items' attribute only applies to functions}}
59
175
60
-
h.single_task<classtest_kernel4>(
176
+
h.single_task<classtest_kernel10>(
61
177
[]() [[intel::num_simd_work_items(0)]]{}); // expected-error{{'num_simd_work_items' attribute requires a positive integral compile time constant expression}}
62
178
63
-
h.single_task<classtest_kernel5>(
179
+
h.single_task<classtest_kernel11>(
64
180
[]() [[intel::num_simd_work_items(-42)]]{}); // expected-error{{'num_simd_work_items' attribute requires a positive integral compile time constant expression}}
[]() [[intel::num_simd_work_items(1), intel::num_simd_work_items(2)]]{}); // expected-warning{{attribute 'num_simd_work_items' is already applied with different parameters}}
0 commit comments