Skip to content

Commit ee93fbc

Browse files
[SYCL] Move SYCL headers from CL/ to sycl/ (#6407)
`CL/sycl.hpp` is changed to include `sycl/sycl.hpp`. No deprecation warning emitted as the header is required by the SYCL 2020 for backward compatibility.
1 parent 261290b commit ee93fbc

File tree

626 files changed

+1788
-1767
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

626 files changed

+1788
-1767
lines changed

clang/docs/SYCLSupport.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ This is also in line with the behaviour of CUDA (`small example
7272
template <typename T, address_space AS> class multi_ptr {
7373
// DecoratedType applies corresponding address space attribute to the type T
7474
// DecoratedType<T, global_space>::type == "__attribute__((opencl_global)) T"
75-
// See sycl/include/CL/sycl/access/access.hpp for more details
75+
// See sycl/include/sycl/access/access.hpp for more details
7676
using pointer_t = typename DecoratedType<T, AS>::type *;
7777
7878
pointer_t m_Pointer;

clang/lib/Sema/SemaSYCL.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4585,8 +4585,8 @@ void SYCLIntegrationHeader::emit(raw_ostream &O) {
45854585
O << "// This is auto-generated SYCL integration header.\n";
45864586
O << "\n";
45874587

4588-
O << "#include <CL/sycl/detail/defines_elementary.hpp>\n";
4589-
O << "#include <CL/sycl/detail/kernel_desc.hpp>\n";
4588+
O << "#include <sycl/detail/defines_elementary.hpp>\n";
4589+
O << "#include <sycl/detail/kernel_desc.hpp>\n";
45904590

45914591
O << "\n";
45924592

@@ -5055,7 +5055,7 @@ bool SYCLIntegrationFooter::emit(raw_ostream &OS) {
50555055
// We only want to emit the #includes if we have a variable that needs
50565056
// them, so emit this one on the first time through the loop.
50575057
if (!EmittedFirstSpecConstant && !DeviceGlobalsEmitted)
5058-
OS << "#include <CL/sycl/detail/defines_elementary.hpp>\n";
5058+
OS << "#include <sycl/detail/defines_elementary.hpp>\n";
50595059

50605060
Visited.insert(VD);
50615061
std::string TopShim = EmitShims(OS, ShimCounter, Policy, VD);
@@ -5101,10 +5101,10 @@ bool SYCLIntegrationFooter::emit(raw_ostream &OS) {
51015101
}
51025102

51035103
if (EmittedFirstSpecConstant)
5104-
OS << "#include <CL/sycl/detail/spec_const_integration.hpp>\n";
5104+
OS << "#include <sycl/detail/spec_const_integration.hpp>\n";
51055105

51065106
if (DeviceGlobalsEmitted) {
5107-
OS << "#include <CL/sycl/detail/device_global_map.hpp>\n";
5107+
OS << "#include <sycl/detail/device_global_map.hpp>\n";
51085108
DeviceGlobOS.flush();
51095109
OS << "namespace sycl::detail {\n";
51105110
OS << "namespace {\n";

clang/test/CodeGenSYCL/anonymous_integration_footer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ int main() {
99
cl::sycl::kernel_single_task<class first_kernel>([]() {});
1010
}
1111

12-
// CHECK: #include <CL/sycl/detail/defines_elementary.hpp>
12+
// CHECK: #include <sycl/detail/defines_elementary.hpp>
1313

1414
using namespace cl;
1515

@@ -402,4 +402,4 @@ constexpr sycl::specialization_id same_name{17};
402402
}
403403
} // namespace outer
404404

405-
// CHECK: #include <CL/sycl/detail/spec_const_integration.hpp>
405+
// CHECK: #include <sycl/detail/spec_const_integration.hpp>

clang/test/CodeGenSYCL/anonymous_integration_footer2.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ int main() {
99
cl::sycl::kernel_single_task<class first_kernel>([]() {});
1010
}
1111

12-
// CHECK: #include <CL/sycl/detail/defines_elementary.hpp>
12+
// CHECK: #include <sycl/detail/defines_elementary.hpp>
1313

1414
using namespace cl;
1515

@@ -155,4 +155,4 @@ constexpr sycl::specialization_id same_name{209};
155155
}
156156
}
157157

158-
// CHECK: #include <CL/sycl/detail/spec_const_integration.hpp>
158+
// CHECK: #include <sycl/detail/spec_const_integration.hpp>

clang/test/CodeGenSYCL/device_global_int_footer_header.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ int main() {
2727
// CHECK-HEADER: } // namespace sycl
2828
// CHECK-HEADER: } // __SYCL_INLINE_NAMESPACE(cl)
2929

30-
// CHECK-FOOTER: #include <CL/sycl/detail/defines_elementary.hpp>
30+
// CHECK-FOOTER: #include <sycl/detail/defines_elementary.hpp>
3131

3232
// Shims go before the registration.
3333
// CHECK-FOOTER: namespace Foo {
@@ -47,7 +47,7 @@ int main() {
4747
// CHECK-FOOTER-NEXT: } // namespace __sycl_detail
4848
// CHECK-FOOTER-NEXT: } // namespace
4949

50-
// CHECK-FOOTER: #include <CL/sycl/detail/device_global_map.hpp>
50+
// CHECK-FOOTER: #include <sycl/detail/device_global_map.hpp>
5151
// CHECK-FOOTER: namespace sycl::detail {
5252
// CHECK-FOOTER-NEXT: namespace {
5353
// CHECK-FOOTER-NEXT: __sycl_device_global_registration::__sycl_device_global_registration() noexcept {

clang/test/CodeGenSYCL/device_globals_with_spec_ids.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ int main() {
1111
cl::sycl::kernel_single_task<class first_kernel>([]() {});
1212
}
1313

14-
// CHECK: #include <CL/sycl/detail/defines_elementary.hpp>
14+
// CHECK: #include <sycl/detail/defines_elementary.hpp>
1515
constexpr sycl::specialization_id a{2};
1616
// CHECK-NEXT: __SYCL_INLINE_NAMESPACE(cl) {
1717
// CHECK-NEXT: namespace sycl {
@@ -247,8 +247,8 @@ struct Wrapper {
247247
} // namespace
248248
} // namespace outer
249249

250-
// CHECK: #include <CL/sycl/detail/spec_const_integration.hpp>
251-
// CHECK-NEXT: #include <CL/sycl/detail/device_global_map.hpp>
250+
// CHECK: #include <sycl/detail/spec_const_integration.hpp>
251+
// CHECK-NEXT: #include <sycl/detail/device_global_map.hpp>
252252
// CHECK-NEXT: namespace sycl::detail {
253253
// CHECK-NEXT: namespace {
254254
// CHECK-NEXT: __sycl_device_global_registration::__sycl_device_global_registration() noexcept {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown -fsycl-int-footer=%t.h %s -emit-llvm -o %t.ll
22
// RUN: FileCheck -input-file=%t.h %s --allow-empty
33

4-
// CHECK-NOT: #include <CL/sycl/detail/defines_elementary.hpp>
5-
// CHECK-NOT: #include <CL/sycl/detail/spec_const_integration.hpp>
4+
// CHECK-NOT: #include <sycl/detail/defines_elementary.hpp>
5+
// CHECK-NOT: #include <sycl/detail/spec_const_integration.hpp>

clang/test/CodeGenSYCL/int_header_without_kernels.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ using namespace cl::sycl::ext::oneapi;
2323
// CHECK-HEADER: } // namespace sycl
2424
// CHECK-HEADER: } // __SYCL_INLINE_NAMESPACE(cl)
2525

26-
// CHECK-FOOTER: #include <CL/sycl/detail/defines_elementary.hpp>
26+
// CHECK-FOOTER: #include <sycl/detail/defines_elementary.hpp>
2727

28-
// CHECK-FOOTER: #include <CL/sycl/detail/device_global_map.hpp>
28+
// CHECK-FOOTER: #include <sycl/detail/device_global_map.hpp>
2929
// CHECK-FOOTER: namespace sycl::detail {
3030
// CHECK-FOOTER-NEXT: namespace {
3131
// CHECK-FOOTER-NEXT: __sycl_device_global_registration::__sycl_device_global_registration() noexcept {

clang/test/CodeGenSYCL/integration_footer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ int main() {
77
cl::sycl::kernel_single_task<class first_kernel>([]() {});
88
}
99

10-
// CHECK: #include <CL/sycl/detail/defines_elementary.hpp>
10+
// CHECK: #include <sycl/detail/defines_elementary.hpp>
1111

1212
using namespace cl::sycl;
1313

@@ -200,4 +200,4 @@ auto &y = GlobalWrapper<int>::template sc<20>;
200200
// CHECK-NOT: inline const char *get_spec_constant_symbolic_ID_impl<::GlobalWrapper<int>::sc>()
201201
// CHECK: inline const char *get_spec_constant_symbolic_ID_impl<::GlobalWrapper<int>::sc<20>>()
202202

203-
// CHECK: #include <CL/sycl/detail/spec_const_integration.hpp>
203+
// CHECK: #include <sycl/detail/spec_const_integration.hpp>

clang/test/CodeGenSYCL/integration_header.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown -sycl-std=2020 -fsycl-int-header=%t.h %s -emit-llvm -o %t.ll
22
// RUN: FileCheck -input-file=%t.h %s
33
//
4-
// CHECK: #include <CL/sycl/detail/kernel_desc.hpp>
4+
// CHECK: #include <sycl/detail/kernel_desc.hpp>
55
//
66
// CHECK: class first_kernel;
77
// CHECK-NEXT: namespace second_namespace {

0 commit comments

Comments
 (0)