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
That particular spelling had been introduced as part of an Intel extension to support sub-groups in SYCL 1.2.1 before they became a core feature of SYCL 2020.
The extension has been deprecated for a while and no one should use that legacy spelling anymore. The official SYCL 2020 spelling should be used instead (with `sycl::` namespace).
[[sycl::reqd_sub_group_size(16)]] voidA() // expected-warning {{'reqd_sub_group_size' attribute can only be applied to a SYCL kernel function}}
37
38
{
38
39
}
39
40
40
-
[[intel::reqd_sub_group_size(16)]] SYCL_EXTERNAL voidB() { // expected-warning {{'reqd_sub_group_size' attribute can only be applied to a SYCL kernel function}}
[[sycl::reqd_sub_group_size(16)]] SYCL_EXTERNAL voidB() { // expected-warning {{'reqd_sub_group_size' attribute can only be applied to a SYCL kernel function}}
41
43
A();
42
44
}
45
+
43
46
// expected-note@+1 {{conflicting attribute is here}}
44
-
[[intel::reqd_sub_group_size(2)]] voidsg_size2() {} // expected-warning {{'reqd_sub_group_size' attribute can only be applied to a SYCL kernel function}}
47
+
[[sycl::reqd_sub_group_size(2)]] voidsg_size2() {} // expected-warning {{'reqd_sub_group_size' attribute can only be applied to a SYCL kernel function}}
45
48
46
49
// expected-note@+3 {{conflicting attribute is here}}
47
50
// expected-error@+2 {{conflicting attributes applied to a SYCL kernel}}
48
51
// expected-warning@+1 {{'reqd_sub_group_size' attribute can only be applied to a SYCL kernel function}}
// Test that checks support and functionality of reqd_sub_group_size attribute support on function.
54
57
55
58
// Tests for incorrect argument values for Intel reqd_sub_group_size attribute.
56
-
[[intel::reqd_sub_group_size]] voidone() {} // expected-error {{'reqd_sub_group_size' attribute takes one argument}}
57
-
[[intel::reqd_sub_group_size(5)]] int a; // expected-error{{'reqd_sub_group_size' attribute only applies to functions}}
58
-
[[intel::reqd_sub_group_size("foo")]] voidfunc() {} // expected-error{{integral constant expression must have integral or unscoped enumeration type, not 'const char[4]'}}
59
-
[[intel::reqd_sub_group_size(-1)]] voidfunc1() {} // expected-error{{'reqd_sub_group_size' attribute requires a positive integral compile time constant expression}}
60
-
[[intel::reqd_sub_group_size(0, 1)]] voidarg() {} // expected-error{{'reqd_sub_group_size' attribute takes one argument}}
59
+
[[sycl::reqd_sub_group_size]] voidone() {} // expected-error {{'reqd_sub_group_size' attribute takes one argument}}
60
+
[[sycl::reqd_sub_group_size(5)]] int a; // expected-error{{'reqd_sub_group_size' attribute only applies to functions}}
61
+
[[sycl::reqd_sub_group_size("foo")]] voidfunc() {} // expected-error{{integral constant expression must have integral or unscoped enumeration type, not 'const char[4]'}}
62
+
[[sycl::reqd_sub_group_size(-1)]] voidfunc1() {} // expected-error{{'reqd_sub_group_size' attribute requires a positive integral compile time constant expression}}
63
+
[[sycl::reqd_sub_group_size(0, 1)]] voidarg() {} // expected-error{{'reqd_sub_group_size' attribute takes one argument}}
61
64
62
65
// Diagnostic is emitted because the arguments mismatch.
63
-
[[intel::reqd_sub_group_size(12)]] voidquux(); // expected-note {{previous attribute is here}}
64
-
[[intel::reqd_sub_group_size(100)]] voidquux(); // expected-warning {{attribute 'reqd_sub_group_size' is already applied with different arguments}} expected-note {{previous attribute is here}}
66
+
[[sycl::reqd_sub_group_size(12)]] voidquux(); // expected-note {{previous attribute is here}}
67
+
[[sycl::reqd_sub_group_size(100)]] voidquux(); // expected-warning {{attribute 'reqd_sub_group_size' is already applied with different arguments}} expected-note {{previous attribute is here}}
65
68
[[sycl::reqd_sub_group_size(200)]] voidquux(); // expected-warning {{attribute 'reqd_sub_group_size' is already applied with different arguments}}
66
69
67
70
// Make sure there's at least one argument passed.
68
71
[[sycl::reqd_sub_group_size]] voidquibble(); // expected-error {{'reqd_sub_group_size' attribute takes one argument}}
69
72
70
73
// No diagnostic is emitted because the arguments match.
74
+
[[sycl::reqd_sub_group_size(12)]] voidsame();
75
+
[[sycl::reqd_sub_group_size(12)]] voidsame() {} // expected-warning {{'reqd_sub_group_size' attribute can only be applied to a SYCL kernel function}}
76
+
77
+
// expected-note@+2 {{did you mean to use 'sycl::reqd_sub_group_size' instead?}}
78
+
// expected-warning@+1{{attribute 'intel::reqd_sub_group_size' is deprecated}}
71
79
[[intel::reqd_sub_group_size(12)]] voidsame();
72
-
[[intel::reqd_sub_group_size(12)]] voidsame() {} // expected-warning {{'reqd_sub_group_size' attribute can only be applied to a SYCL kernel function}}
73
80
74
81
// No diagnostic because the attributes are synonyms with identical behavior.
75
82
[[sycl::reqd_sub_group_size(12)]] voidsame(); // OK
@@ -80,7 +87,7 @@ template <typename Ty>
80
87
// expected-error@+3{{'reqd_sub_group_size' attribute requires a positive integral compile time constant expression}}
81
88
// expected-error@+2 {{integral constant expression must have integral or unscoped enumeration type, not 'S'}}
82
89
// expected-error@+1 {{integral constant expression must have integral or unscoped enumeration type, not 'float'}}
0 commit comments