Skip to content

Commit f8bb79c

Browse files
committed
[SYCL] revert back intel deprecated attribute
1 parent 695c112 commit f8bb79c

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -fsycl-is-device -triple nvptx -internal-isystem %S/Inputs -std=c++2b -verify %s
1+
// RUN: %clang_cc1 -fsycl-is-device -Wno-error=deprecated-declarations -triple nvptx -internal-isystem %S/Inputs -std=c++2b -verify %s
22
//
33
// This tests that a warning is returned when a sub group size other than 32 is
44
// requested in the CUDA backend via the reqd_sub_group_size() kernel attribute.
@@ -9,11 +9,11 @@ int main() {
99
sycl::queue Q;
1010

1111
Q.submit([&](sycl::handler &h) {
12-
h.single_task<class invalid_kernel>([=] [[sycl::reqd_sub_group_size(8)]] {}); // expected-warning {{attribute argument 8 is invalid and will be ignored; nvptx requires sub_group size 32}}
12+
h.single_task<class invalid_kernel>([=] [[intel::reqd_sub_group_size(8)]] {}); // expected-warning {{attribute argument 8 is invalid and will be ignored; nvptx requires sub_group size 32}}
1313
});
1414

1515
Q.submit([&](sycl::handler &h) {
16-
h.single_task<class valid_kernel>([=] [[sycl::reqd_sub_group_size(32)]] {});
16+
h.single_task<class valid_kernel>([=] [[intel::reqd_sub_group_size(32)]] {});
1717
});
1818

1919
return 0;
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
// RUN: %clang_cc1 -fsycl-is-host -fsyntax-only -verify %s
1+
// RUN: %clang_cc1 -fsycl-is-host -Wno-error=deprecated-declarations -fsyntax-only -verify %s
22
// expected-no-diagnostics
33

4-
[[sycl::reqd_sub_group_size(8)]] void fun() {}
4+
[[intel::reqd_sub_group_size(8)]] void fun() {}
55

66
class Functor {
77
public:
8-
[[sycl::reqd_sub_group_size(16)]] void operator()() {}
8+
[[intel::reqd_sub_group_size(16)]] void operator()() {}
99
};

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -fsyntax-only -verify -pedantic %s
1+
// RUN: %clang_cc1 -fsycl-is-device -Wno-error=deprecated-declarations -internal-isystem %S/Inputs -fsyntax-only -verify -pedantic %s
22

33
// The test checks functionality of [[intel::reqd_sub_group_size()]] attribute on SYCL kernel.
44

@@ -62,17 +62,17 @@ int main() {
6262
// Diagnostic is emitted because the arguments mismatch.
6363
[[intel::reqd_sub_group_size(12)]] void quux(); // expected-note {{previous attribute is here}}
6464
[[intel::reqd_sub_group_size(100)]] void quux(); // expected-warning {{attribute 'reqd_sub_group_size' is already applied with different arguments}} expected-note {{previous attribute is here}}
65-
[[intel::reqd_sub_group_size(200)]] void quux(); // expected-warning {{attribute 'reqd_sub_group_size' is already applied with different arguments}}
65+
[[sycl::reqd_sub_group_size(200)]] void quux(); // expected-warning {{attribute 'reqd_sub_group_size' is already applied with different arguments}}
6666

6767
// Make sure there's at least one argument passed.
68-
[[intel::reqd_sub_group_size]] void quibble(); // expected-error {{'reqd_sub_group_size' attribute takes one argument}}
68+
[[sycl::reqd_sub_group_size]] void quibble(); // expected-error {{'reqd_sub_group_size' attribute takes one argument}}
6969

7070
// No diagnostic is emitted because the arguments match.
7171
[[intel::reqd_sub_group_size(12)]] void same();
7272
[[intel::reqd_sub_group_size(12)]] void same() {} // expected-warning {{'reqd_sub_group_size' attribute can only be applied to a SYCL kernel function}}
7373

7474
// No diagnostic because the attributes are synonyms with identical behavior.
75-
[[intel::reqd_sub_group_size(12)]] void same(); // OK
75+
[[sycl::reqd_sub_group_size(12)]] void same(); // OK
7676

7777
// Test that checks wrong function template instantiation and ensures that the type
7878
// is checked properly when instantiating from the template definition.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %clang_cc1 -internal-isystem %S/Inputs -fsycl-is-device -sycl-std=2020 -internal-isystem %S/Inputs -fsyntax-only -verify=expected,primary,integer %s
22
// RUN: %clang_cc1 -internal-isystem %S/Inputs -fsycl-is-device -fsycl-default-sub-group-size=primary -sycl-std=2020 -internal-isystem %S/Inputs -fsyntax-only -verify=expected,integer %s
3-
// RUN: %clang_cc1 -internal-isystem %S/Inputs -fsycl-is-device -fsycl-default-sub-group-size=10 -sycl-std=2020 -internal-isystem %S/Inputs -fsyntax-only -verify=expected,primary %s
3+
// RUN: %clang_cc1 -internal-isystem %S/Inputs -Wno-error=deprecated-declarations -fsycl-is-device -fsycl-default-sub-group-size=10 -sycl-std=2020 -internal-isystem %S/Inputs -fsyntax-only -verify=expected,primary %s
44

55
// Validate the semantic analysis checks for the interaction betwen the
66
// named_sub_group_size and sub_group_size attributes. These are not able to be
@@ -153,7 +153,7 @@ void calls_kernel_5() {
153153

154154
// Don't diag with the old sub-group-size.
155155
void calls_kernel_6() {
156-
sycl::kernel_single_task<class Kernel6>([]() [[sycl::reqd_sub_group_size(10)]] { // #Kernel6
156+
sycl::kernel_single_task<class Kernel6>([]() [[intel::reqd_sub_group_size(10)]] { // #Kernel6
157157
NoAttrExternalNotDefined();
158158
});
159159
}

clang/test/SemaSYCL/sycl-attr-warn-non-kernel.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -fsyntax-only -verify -pedantic %s
1+
// RUN: %clang_cc1 -fsycl-is-device -Wno-error=deprecated-declarations -internal-isystem %S/Inputs -fsyntax-only -verify -pedantic %s
22

33
// The test check issuing diagnostics for attributes that can not be applied to a non SYCL kernel function
44

@@ -7,7 +7,7 @@
77
[[sycl::reqd_work_group_size(16)]] void f1(){ // expected-warning {{'reqd_work_group_size' attribute can only be applied to a SYCL kernel function}}
88
}
99

10-
[[sycl::reqd_sub_group_size(12)]] void f3(){ // expected-warning {{'reqd_sub_group_size' attribute can only be applied to a SYCL kernel function}}
10+
[[intel::reqd_sub_group_size(12)]] void f3(){ // expected-warning {{'reqd_sub_group_size' attribute can only be applied to a SYCL kernel function}}
1111
}
1212

1313
[[sycl::reqd_work_group_size(16)]] void f4(){ // expected-warning {{'reqd_work_group_size' attribute can only be applied to a SYCL kernel function}}
@@ -41,7 +41,7 @@ class Functor16x16x16 {
4141

4242
class FunctorSubGroupSize4 {
4343
public:
44-
[[sycl::reqd_sub_group_size(4)]] void operator()() const{} // expected-warning {{'reqd_sub_group_size' attribute can only be applied to a SYCL kernel function}}
44+
[[intel::reqd_sub_group_size(4)]] void operator()() const{} // expected-warning {{'reqd_sub_group_size' attribute can only be applied to a SYCL kernel function}}
4545
};
4646

4747
class Functor8 {

0 commit comments

Comments
 (0)