Skip to content

Commit 74167d0

Browse files
committed
Address review comments
Signed-off-by: Soumi Manna <[email protected]>
1 parent 436dc40 commit 74167d0

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

clang/include/clang/Basic/AttrDocs.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2421,8 +2421,8 @@ device kernel, the attribute is not ignored and it is propagated to the kernel.
24212421
If the`` intel::reqd_work_group_size`` or ``cl::reqd_work_group_size``
24222422
attribute is specified on a declaration along with a
24232423
intel::num_simd_work_items attribute, the work group size attribute
2424-
arguments must all be evenly divisible by the argument specified in
2425-
the ``intel::num_simd_work_items`` attribute.
2424+
argument (X argument) must be evenly divisible by the argument specified
2425+
in the ``intel::num_simd_work_items`` attribute.
24262426

24272427
.. code-block:: c++
24282428

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11213,7 +11213,7 @@ def err_sycl_invalid_accessor_property_list_template_param : Error<
1121311213
"template parameter must be a "
1121411214
"%select{parameter pack|type|non-negative integer}1">;
1121511215
def err_sycl_num_kernel_wrong_reqd_wg_size : Error<
11216-
"%0 attribute must evenly divide X argument of %1 attribute">;
11216+
"%0 attribute must evenly divide the work-group size for the %1 attribute">;
1121711217

1121811218
def warn_sycl_pass_by_value_deprecated
1121911219
: Warning<"Passing kernel functions by value is deprecated in SYCL 2020">,

clang/lib/Sema/SemaDeclAttr.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3303,8 +3303,8 @@ void Sema::AddSYCLIntelNumSimdWorkItemsAttr(Decl *D,
33033303
}
33043304

33053305
// If the declaration has an [[intel::reqd_work_group_size]] attribute,
3306-
// check to see X argument can be evenly divided by the num_simd_work_items
3307-
// attribute.
3306+
// check to see if the X argument can be evenly divided by the
3307+
// num_simd_work_items attribute.
33083308
if (const auto *DeclAttr = D->getAttr<ReqdWorkGroupSizeAttr>()) {
33093309
Optional<llvm::APSInt> XDimVal = DeclAttr->getXDimVal(Context);
33103310

clang/test/SemaSYCL/num_simd_work_items_device.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,29 +41,29 @@ struct FuncObj {
4141

4242
#ifdef TRIGGER_ERROR
4343
struct TRIFuncObjBad1 {
44-
[[intel::num_simd_work_items(3)]] // expected-error{{'num_simd_work_items' attribute must evenly divide X argument of 'reqd_work_group_size' attribute}}
44+
[[intel::num_simd_work_items(3)]] // expected-error{{'num_simd_work_items' attribute must evenly divide the work-group size for the 'reqd_work_group_size' attribute}}
4545
[[intel::reqd_work_group_size(5, 5, 5)]] //expected-note{{conflicting attribute is here}}
4646
void
4747
operator()() const {}
4848
};
4949

5050
struct TRIFuncObjBad2 {
5151
[[intel::reqd_work_group_size(5, 5, 5)]] // expected-note{{conflicting attribute is here}}
52-
[[intel::num_simd_work_items(3)]] // expected-error{{'num_simd_work_items' attribute must evenly divide X argument of 'reqd_work_group_size' attribute}}
52+
[[intel::num_simd_work_items(3)]] // expected-error{{'num_simd_work_items' attribute must evenly divide the work-group size for the 'reqd_work_group_size' attribute}}
5353
void
5454
operator()() const {}
5555
};
5656

5757
struct TRIFuncObjBad3 {
58-
[[intel::num_simd_work_items(3)]] // expected-error{{'num_simd_work_items' attribute must evenly divide X argument of 'reqd_work_group_size' attribute}}
58+
[[intel::num_simd_work_items(3)]] // expected-error{{'num_simd_work_items' attribute must evenly divide the work-group size for the 'reqd_work_group_size' attribute}}
5959
[[cl::reqd_work_group_size(5, 5, 5)]] // expected-note{{conflicting attribute is here}}
6060
void
6161
operator()() const {}
6262
};
6363

6464
struct TRIFuncObjBad4 {
6565
[[cl::reqd_work_group_size(5, 5, 5)]] // expected-note{{conflicting attribute is here}}
66-
[[intel::num_simd_work_items(3)]] // expected-error{{'num_simd_work_items' attribute must evenly divide X argument of 'reqd_work_group_size' attribute}}
66+
[[intel::num_simd_work_items(3)]] // expected-error{{'num_simd_work_items' attribute must evenly divide the work-group size for the 'reqd_work_group_size' attribute}}
6767
void
6868
operator()() const {}
6969
};
@@ -75,29 +75,29 @@ struct TRIFuncObjBad5 {
7575
};
7676

7777
struct TRIFuncObjBad6 {
78-
[[intel::num_simd_work_items(3)]] // expected-error{{'num_simd_work_items' attribute must evenly divide X argument of 'reqd_work_group_size' attribute}}
78+
[[intel::num_simd_work_items(3)]] // expected-error{{'num_simd_work_items' attribute must evenly divide the work-group size for the 'reqd_work_group_size' attribute}}
7979
[[intel::reqd_work_group_size(5)]] //expected-note{{conflicting attribute is here}}
8080
void
8181
operator()() const {}
8282
};
8383

8484
struct TRIFuncObjBad7 {
8585
[[intel::reqd_work_group_size(5)]] // expected-note{{conflicting attribute is here}}
86-
[[intel::num_simd_work_items(3)]] // expected-error{{'num_simd_work_items' attribute must evenly divide X argument of 'reqd_work_group_size' attribute}}
86+
[[intel::num_simd_work_items(3)]] // expected-error{{'num_simd_work_items' attribute must evenly divide the work-group size for the 'reqd_work_group_size' attribute}}
8787
void
8888
operator()() const {}
8989
};
9090

9191
struct TRIFuncObjBad8 {
92-
[[intel::num_simd_work_items(4)]] // expected-error{{'num_simd_work_items' attribute must evenly divide X argument of 'reqd_work_group_size' attribute}}
92+
[[intel::num_simd_work_items(4)]] // expected-error{{'num_simd_work_items' attribute must evenly divide the work-group size for the 'reqd_work_group_size' attribute}}
9393
[[intel::reqd_work_group_size(3, 64)]] // expected-note{{conflicting attribute is here}}
9494
void
9595
operator()() const {}
9696
};
9797

9898
struct TRIFuncObjBad9 {
9999
[[intel::reqd_work_group_size(3, 64)]] // expected-note{{conflicting attribute is here}}
100-
[[intel::num_simd_work_items(4)]] // expected-error{{'num_simd_work_items' attribute must evenly divide X argument of 'reqd_work_group_size' attribute}}
100+
[[intel::num_simd_work_items(4)]] // expected-error{{'num_simd_work_items' attribute must evenly divide the work-group size for the 'reqd_work_group_size' attribute}}
101101
void
102102
operator()() const {}
103103
};
@@ -158,7 +158,7 @@ struct TRIFuncObjBad18 {
158158

159159
struct TRIFuncObjBad19 {
160160
[[intel::reqd_work_group_size(5, 64, 64)]] // expected-note{{conflicting attribute is here}}
161-
[[intel::num_simd_work_items(4)]] // expected-error{{'num_simd_work_items' attribute must evenly divide X argument of 'reqd_work_group_size' attribute}}
161+
[[intel::num_simd_work_items(4)]] // expected-error{{'num_simd_work_items' attribute must evenly divide the work-group size for the 'reqd_work_group_size' attribute}}
162162
void operator()() const {}
163163
};
164164

0 commit comments

Comments
 (0)