Skip to content
2 changes: 1 addition & 1 deletion clang/lib/Sema/SemaSYCL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3167,7 +3167,7 @@ class SyclKernelDeclCreator : public SyclKernelFieldHandler {
// // code
// }
//
// [[intel::reqd_sub_group_size(4)]] void operator()(sycl::id<1> id) const
// [[sycl::reqd_sub_group_size(4)]] void operator()(sycl::id<1> id) const
// {
// // code
// }
Expand Down
7 changes: 7 additions & 0 deletions clang/lib/Sema/SemaSYCLDeclAttr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@ void SemaSYCL::checkDeprecatedSYCLAttributeSpelling(const ParsedAttr &A,
return;
}

// Additionally, diagnose deprecated [[sycl::reqd_sub_group_size]] spelling
if (A.getKind() == ParsedAttr::AT_IntelReqdSubGroupSize &&
A.getAttrName()->isStr("reqd_sub_group_size") && A.getScopeName()->isStr("intel")) {
diagnoseDeprecatedAttribute(A, "sycl", "reqd_sub_group_size");
return;
}

// Diagnose SYCL 2020 spellings in later SYCL modes.
if (getLangOpts().getSYCLVersion() >= LangOptions::SYCL_2020) {
// All attributes in the cl vendor namespace are deprecated in favor of a
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/kernel-op-calls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Functor1 {
public:
Functor1(){}

[[intel::reqd_sub_group_size(4)]] void operator()(sycl::id<1> id) const {}
[[sycl::reqd_sub_group_size(4)]] void operator()(sycl::id<1> id) const {}

[[sycl::work_group_size_hint(1, 2, 3)]] void operator()(sycl::id<2> id) const {}

Expand Down
8 changes: 4 additions & 4 deletions clang/test/CodeGenSYCL/reqd-sub-group-size.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@ queue q;

class Functor16 {
public:
[[intel::reqd_sub_group_size(16)]] void operator()() const {}
[[sycl::reqd_sub_group_size(16)]] void operator()() const {}
};

template <int SIZE>
class Functor2 {
public:
[[intel::reqd_sub_group_size(SIZE)]] void operator()() const {}
[[sycl::reqd_sub_group_size(SIZE)]] void operator()() const {}
};

template <int N>
[[intel::reqd_sub_group_size(N)]] void func() {}
[[sycl::reqd_sub_group_size(N)]] void func() {}

int main() {
q.submit([&](handler &h) {
Functor16 f16;
h.single_task<class kernel_name1>(f16);

h.single_task<class kernel_name3>(
[]() [[intel::reqd_sub_group_size(4)]]{});
[]() [[sycl::reqd_sub_group_size(4)]]{});

Functor2<2> f2;
h.single_task<class kernel_name4>(f2);
Expand Down
4 changes: 2 additions & 2 deletions clang/test/CodeGenSYCL/sycl-multi-kernel-attr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ queue q;

class Functor {
public:
[[intel::reqd_sub_group_size(4), cl::reqd_work_group_size(32, 16, 16)]] void operator()() const {}
[[sycl::reqd_sub_group_size(4), cl::reqd_work_group_size(32, 16, 16)]] void operator()() const {}
};

class Functor1 {
public:
[[intel::reqd_sub_group_size(2), sycl::reqd_work_group_size(64, 32, 32)]] void operator()() const {}
[[sycl::reqd_sub_group_size(2), sycl::reqd_work_group_size(64, 32, 32)]] void operator()() const {}
};

template <int SIZE, int SIZE1, int SIZE2>
Expand Down
2 changes: 1 addition & 1 deletion clang/test/SemaSYCL/parallel_for_wrapper_attr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ template <typename T> class Fobj {
public:
Fobj() {}
void operator()() const {
auto L0 = []() [[intel::reqd_sub_group_size(4)]]{};
auto L0 = []() [[sycl::reqd_sub_group_size(4)]]{};
L0();
}
};
Expand Down
2 changes: 1 addition & 1 deletion clang/test/SemaSYCL/reqd-sub-group-size-ast.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -ast-dump %s | FileCheck %s
// RUN: %clang_cc1 -fsycl-is-device -Wno-error=deprecated-declarations -internal-isystem %S/Inputs -ast-dump %s | FileCheck %s

// The test checks AST of [[intel::reqd_sub_group_size()]] attribute.

Expand Down
2 changes: 1 addition & 1 deletion clang/test/SemaSYCL/reqd-sub-group-size-host.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -fsycl-is-host -fsyntax-only -verify %s
// RUN: %clang_cc1 -fsycl-is-host -Wno-error=deprecated-declarations -fsyntax-only -verify %s
// expected-no-diagnostics

[[intel::reqd_sub_group_size(8)]] void fun() {}
Expand Down
2 changes: 1 addition & 1 deletion clang/test/SemaSYCL/reqd-sub-group-size.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -fsyntax-only -verify -pedantic %s
// RUN: %clang_cc1 -fsycl-is-device -Wno-error=deprecated-declarations -internal-isystem %S/Inputs -fsyntax-only -verify -pedantic %s

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

Expand Down
2 changes: 1 addition & 1 deletion clang/test/SemaSYCL/sub-group-size.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 -internal-isystem %S/Inputs -fsycl-is-device -sycl-std=2020 -internal-isystem %S/Inputs -fsyntax-only -verify=expected,primary,integer %s
// 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
// 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
// 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

// Validate the semantic analysis checks for the interaction betwen the
// named_sub_group_size and sub_group_size attributes. These are not able to be
Expand Down
2 changes: 1 addition & 1 deletion clang/test/SemaSYCL/sycl-attr-warn-non-kernel.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -fsyntax-only -verify -pedantic %s
// RUN: %clang_cc1 -fsycl-is-device -Wno-error=deprecated-declarations -internal-isystem %S/Inputs -fsyntax-only -verify -pedantic %s

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

Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/AOT/reqd-sg-size.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ template <size_t... Ns> struct SubgroupDispatcher {
accessor acc{buf, cgh};
cgh.parallel_for<kernel_name<size>>(
nd_range<1>(1, 1),
[=](auto item) [[intel::reqd_sub_group_size(size)]] {
[=](auto item) [[sycl::reqd_sub_group_size(size)]] {
acc[0] = item.get_sub_group().get_max_local_range()[0];
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#ifdef IMPL_SUBGROUP
#define SUBGROUP_ATTR
#else
#define SUBGROUP_ATTR [[intel::reqd_sub_group_size(VL)]]
#define SUBGROUP_ATTR [[sycl::reqd_sub_group_size(VL)]]
#endif

using namespace sycl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ void RunSortOverGroupArray(sycl::queue &Q, const std::vector<T> &DataToSort,
CGH);

CGH.parallel_for(
NDRange, [=](sycl::nd_item<Dims> id) [[intel::reqd_sub_group_size(
NDRange, [=](sycl::nd_item<Dims> id) [[sycl::reqd_sub_group_size(
ReqSubGroupSize)]] {
const size_t GlobalLinearID = id.get_global_linear_id();
using RadixSorterT = oneapi_exp::radix_sorters::group_sorter<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ void RunJointSort(sycl::queue &Q, const std::vector<T> &DataToSort,

CGH.parallel_for<KernelNameJoint<IntWrapper<Dims>,
UseGroupWrapper<UseGroup>, T, Compare>>(
NDRange, [=](sycl::nd_item<Dims> ID) [[intel::reqd_sub_group_size(
NDRange, [=](sycl::nd_item<Dims> ID) [[sycl::reqd_sub_group_size(
ReqSubGroupSize)]] {
auto Group = [&]() {
if constexpr (UseGroup == UseGroupT::SubGroup)
Expand Down Expand Up @@ -282,7 +282,7 @@ void RunSortOVerGroup(sycl::queue &Q, const std::vector<T> &DataToSort,

CGH.parallel_for<KernelNameOverGroup<
IntWrapper<Dims>, UseGroupWrapper<UseGroup>, T, Compare>>(
NDRange, [=](sycl::nd_item<Dims> id) [[intel::reqd_sub_group_size(
NDRange, [=](sycl::nd_item<Dims> id) [[sycl::reqd_sub_group_size(
ReqSubGroupSize)]] {
const size_t GlobalLinearID = id.get_global_linear_id();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void RunSortKeyValueOverGroupArray(sycl::queue &Q,
CGH);

CGH.parallel_for(NDRange, [=](sycl::nd_item<Dims>
id) [[intel::reqd_sub_group_size(
id) [[sycl::reqd_sub_group_size(
ReqSubGroupSize)]] {
const size_t GlobalLinearID = id.get_global_linear_id();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ void RunSortKeyValueOverGroup(sycl::queue &Q,
CGH);

auto KeyValueSortKernel =
[=](sycl::nd_item<Dims> id) [[intel::reqd_sub_group_size(
[=](sycl::nd_item<Dims> id) [[sycl::reqd_sub_group_size(
ReqSubGroupSize)]] {
const size_t GlobalLinearID = id.get_global_linear_id();

Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/GroupAlgorithm/load_store/odd_wg_size.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ template <int SG_SIZE, int WG_SIZE> void test(queue &q) {

cgh.parallel_for(
nd_range<1>{global_size, wg_size},
[=](nd_item<1> ndi) [[intel::reqd_sub_group_size(SG_SIZE)]] {
[=](nd_item<1> ndi) [[sycl::reqd_sub_group_size(SG_SIZE)]] {
auto gid = ndi.get_global_id(0);
auto g = ndi.get_group();
auto offset = g.get_group_id(0) * g.get_local_range(0) * elems_per_wi;
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/GroupAlgorithm/load_store/partial_sg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ template <int SG_SIZE> void test(queue &q) {

cgh.parallel_for(
nd_range<1>{wg_size, wg_size},
[=](nd_item<1> ndi) [[intel::reqd_sub_group_size(SG_SIZE)]] {
[=](nd_item<1> ndi) [[sycl::reqd_sub_group_size(SG_SIZE)]] {
auto gid = ndi.get_global_id(0);
auto sg = ndi.get_sub_group();
auto offset =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#ifdef IMPL_SUBGROUP
#define SUBGROUP_ATTR
#else
#define SUBGROUP_ATTR [[intel::reqd_sub_group_size(VL)]]
#define SUBGROUP_ATTR [[sycl::reqd_sub_group_size(VL)]]
#endif

using namespace sycl::ext::oneapi::experimental;
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/InvokeSimd/Feature/invoke_simd_struct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#ifdef IMPL_SUBGROUP
#define SUBGROUP_ATTR
#else
#define SUBGROUP_ATTR [[intel::reqd_sub_group_size(VL)]]
#define SUBGROUP_ATTR [[sycl::reqd_sub_group_size(VL)]]
#endif

using namespace sycl::ext::oneapi::experimental;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#ifdef IMPL_SUBGROUP
#define SUBGROUP_ATTR
#else
#define SUBGROUP_ATTR [[intel::reqd_sub_group_size(VL)]]
#define SUBGROUP_ATTR [[sycl::reqd_sub_group_size(VL)]]
#endif

using namespace sycl::ext::oneapi::experimental;
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/InvokeSimd/Feature/popcnt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
#ifdef IMPL_SUBGROUP
#define SUBGROUP_ATTR
#else
#define SUBGROUP_ATTR [[intel::reqd_sub_group_size(VL)]]
#define SUBGROUP_ATTR [[sycl::reqd_sub_group_size(VL)]]
#endif

using namespace sycl::ext::oneapi::experimental;
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/InvokeSimd/Feature/popcnt_emu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
#ifdef IMPL_SUBGROUP
#define SUBGROUP_ATTR
#else
#define SUBGROUP_ATTR [[intel::reqd_sub_group_size(VL)]]
#define SUBGROUP_ATTR [[sycl::reqd_sub_group_size(VL)]]
#endif

using namespace sycl::ext::oneapi::experimental;
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/InvokeSimd/Feature/scale.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#ifdef IMPL_SUBGROUP
#define SUBGROUP_ATTR
#else
#define SUBGROUP_ATTR [[intel::reqd_sub_group_size(VL)]]
#define SUBGROUP_ATTR [[sycl::reqd_sub_group_size(VL)]]
#endif

using namespace sycl::ext::oneapi::experimental;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#ifdef IMPL_SUBGROUP
#define SUBGROUP_ATTR
#else
#define SUBGROUP_ATTR [[intel::reqd_sub_group_size(VL)]]
#define SUBGROUP_ATTR [[sycl::reqd_sub_group_size(VL)]]
#endif

using namespace sycl::ext::oneapi::experimental;
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/InvokeSimd/Feature/void_retval.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#ifdef IMPL_SUBGROUP
#define SUBGROUP_ATTR
#else
#define SUBGROUP_ATTR [[intel::reqd_sub_group_size(VL)]]
#define SUBGROUP_ATTR [[sycl::reqd_sub_group_size(VL)]]
#endif

using namespace sycl::ext::oneapi::experimental;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ bool test() {
try {
auto e = q.submit([&](handler &cgh) {
cgh.parallel_for(
Range, [=](nd_item<1> ndi) [[intel::reqd_sub_group_size(VL)]] {
Range, [=](nd_item<1> ndi) [[sycl::reqd_sub_group_size(VL)]] {
sub_group sg = ndi.get_sub_group();
group<1> g = ndi.get_group();
uint32_t i = sg.get_group_linear_id() * VL +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#ifdef IMPL_SUBGROUP
#define SUBGROUP_ATTR
#else
#define SUBGROUP_ATTR [[intel::reqd_sub_group_size(VL)]]
#define SUBGROUP_ATTR [[sycl::reqd_sub_group_size(VL)]]
#endif

using namespace sycl::ext::oneapi::experimental;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#ifdef IMPL_SUBGROUP
#define SUBGROUP_ATTR
#else
#define SUBGROUP_ATTR [[intel::reqd_sub_group_size(VL)]]
#define SUBGROUP_ATTR [[sycl::reqd_sub_group_size(VL)]]
#endif

using namespace sycl::ext::oneapi::experimental;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#ifdef IMPL_SUBGROUP
#define SUBGROUP_ATTR
#else
#define SUBGROUP_ATTR [[intel::reqd_sub_group_size(VL)]]
#define SUBGROUP_ATTR [[sycl::reqd_sub_group_size(VL)]]
#endif

using namespace sycl::ext::oneapi::experimental;
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/InvokeSimd/Regression/debug_symbols.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#ifdef IMPL_SUBGROUP
#define SUBGROUP_ATTR
#else
#define SUBGROUP_ATTR [[intel::reqd_sub_group_size(VL)]]
#define SUBGROUP_ATTR [[sycl::reqd_sub_group_size(VL)]]
#endif

using namespace sycl::ext::oneapi::experimental;
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/InvokeSimd/Regression/dp4a.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#ifdef IMPL_SUBGROUP
#define SUBGROUP_ATTR
#else
#define SUBGROUP_ATTR [[intel::reqd_sub_group_size(SIZE)]]
#define SUBGROUP_ATTR [[sycl::reqd_sub_group_size(SIZE)]]
#endif

using namespace sycl::ext::oneapi::experimental;
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/InvokeSimd/Regression/matrix_add.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#ifdef IMPL_SUBGROUP
#define SUBGROUP_ATTR
#else
#define SUBGROUP_ATTR [[intel::reqd_sub_group_size(VL)]]
#define SUBGROUP_ATTR [[sycl::reqd_sub_group_size(VL)]]
#endif

using namespace sycl::ext::oneapi::experimental;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#ifdef IMPL_SUBGROUP
#define SUBGROUP_ATTR
#else
#define SUBGROUP_ATTR [[intel::reqd_sub_group_size(VL)]]
#define SUBGROUP_ATTR [[sycl::reqd_sub_group_size(VL)]]
#endif

using namespace sycl::ext::oneapi::experimental;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#ifdef IMPL_SUBGROUP
#define SUBGROUP_ATTR
#else
#define SUBGROUP_ATTR [[intel::reqd_sub_group_size(VL)]]
#define SUBGROUP_ATTR [[sycl::reqd_sub_group_size(VL)]]
#endif

using namespace sycl::ext::oneapi::experimental;
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/InvokeSimd/Regression/nbarrier_basic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#ifdef IMPL_SUBGROUP
#define SUBGROUP_ATTR
#else
#define SUBGROUP_ATTR [[intel::reqd_sub_group_size(VL)]]
#define SUBGROUP_ATTR [[sycl::reqd_sub_group_size(VL)]]
#endif

using namespace sycl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ bool test(queue q) {
cgh.parallel_for<KernelID<CaseNum>>(
nd_range<1>(global_range, local_range),
// This test requires an explicit specification of the subgroup size
[=](nd_item<1> item) [[intel::reqd_sub_group_size(VL)]] {
[=](nd_item<1> item) [[sycl::reqd_sub_group_size(VL)]] {
sycl::group<1> g = item.get_group();
sycl::sub_group sg = item.get_sub_group();

Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/InvokeSimd/Regression/nbarrier_loop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ int main() {
cgh.parallel_for<KernelID>(
nd_range<1>(GlobalRange, LocalRange),
// This test requires an explicit specification of the subgroup size
[=](nd_item<1> item) [[intel::reqd_sub_group_size(VL)]] {
[=](nd_item<1> item) [[sycl::reqd_sub_group_size(VL)]] {
sycl::group<1> g = item.get_group();
sycl::sub_group sg = item.get_sub_group();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ bool test(queue q) {
cgh.parallel_for<KernelID<CaseNum>>(
nd_range<1>(global_range, local_range),
// This test requires an explicit specification of the subgroup size
[=](nd_item<1> item) [[intel::reqd_sub_group_size(VL)]] {
[=](nd_item<1> item) [[sycl::reqd_sub_group_size(VL)]] {
sycl::group<1> g = item.get_group();
sycl::sub_group sg = item.get_sub_group();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#ifdef IMPL_SUBGROUP
#define SUBGROUP_ATTR
#else
#define SUBGROUP_ATTR [[intel::reqd_sub_group_size(VL)]]
#define SUBGROUP_ATTR [[sycl::reqd_sub_group_size(VL)]]
#endif

using namespace sycl;
Expand Down
Loading
Loading