Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SYCL] Move SYCL headers from CL/ to sycl/ #6407

Merged
merged 13 commits into from
Jul 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion clang/docs/SYCLSupport.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ This is also in line with the behaviour of CUDA (`small example
template <typename T, address_space AS> class multi_ptr {
// DecoratedType applies corresponding address space attribute to the type T
// DecoratedType<T, global_space>::type == "__attribute__((opencl_global)) T"
// See sycl/include/CL/sycl/access/access.hpp for more details
// See sycl/include/sycl/access/access.hpp for more details
using pointer_t = typename DecoratedType<T, AS>::type *;

pointer_t m_Pointer;
Expand Down
10 changes: 5 additions & 5 deletions clang/lib/Sema/SemaSYCL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4585,8 +4585,8 @@ void SYCLIntegrationHeader::emit(raw_ostream &O) {
O << "// This is auto-generated SYCL integration header.\n";
O << "\n";

O << "#include <CL/sycl/detail/defines_elementary.hpp>\n";
O << "#include <CL/sycl/detail/kernel_desc.hpp>\n";
O << "#include <sycl/detail/defines_elementary.hpp>\n";
O << "#include <sycl/detail/kernel_desc.hpp>\n";

O << "\n";

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

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

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

if (DeviceGlobalsEmitted) {
OS << "#include <CL/sycl/detail/device_global_map.hpp>\n";
OS << "#include <sycl/detail/device_global_map.hpp>\n";
DeviceGlobOS.flush();
OS << "namespace sycl::detail {\n";
OS << "namespace {\n";
Expand Down
4 changes: 2 additions & 2 deletions clang/test/CodeGenSYCL/anonymous_integration_footer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ int main() {
cl::sycl::kernel_single_task<class first_kernel>([]() {});
}

// CHECK: #include <CL/sycl/detail/defines_elementary.hpp>
// CHECK: #include <sycl/detail/defines_elementary.hpp>

using namespace cl;

Expand Down Expand Up @@ -402,4 +402,4 @@ constexpr sycl::specialization_id same_name{17};
}
} // namespace outer

// CHECK: #include <CL/sycl/detail/spec_const_integration.hpp>
// CHECK: #include <sycl/detail/spec_const_integration.hpp>
4 changes: 2 additions & 2 deletions clang/test/CodeGenSYCL/anonymous_integration_footer2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ int main() {
cl::sycl::kernel_single_task<class first_kernel>([]() {});
}

// CHECK: #include <CL/sycl/detail/defines_elementary.hpp>
// CHECK: #include <sycl/detail/defines_elementary.hpp>

using namespace cl;

Expand Down Expand Up @@ -155,4 +155,4 @@ constexpr sycl::specialization_id same_name{209};
}
}

// CHECK: #include <CL/sycl/detail/spec_const_integration.hpp>
// CHECK: #include <sycl/detail/spec_const_integration.hpp>
4 changes: 2 additions & 2 deletions clang/test/CodeGenSYCL/device_global_int_footer_header.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ int main() {
// CHECK-HEADER: } // namespace sycl
// CHECK-HEADER: } // __SYCL_INLINE_NAMESPACE(cl)

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

// Shims go before the registration.
// CHECK-FOOTER: namespace Foo {
Expand All @@ -47,7 +47,7 @@ int main() {
// CHECK-FOOTER-NEXT: } // namespace __sycl_detail
// CHECK-FOOTER-NEXT: } // namespace

// CHECK-FOOTER: #include <CL/sycl/detail/device_global_map.hpp>
// CHECK-FOOTER: #include <sycl/detail/device_global_map.hpp>
// CHECK-FOOTER: namespace sycl::detail {
// CHECK-FOOTER-NEXT: namespace {
// CHECK-FOOTER-NEXT: __sycl_device_global_registration::__sycl_device_global_registration() noexcept {
Expand Down
6 changes: 3 additions & 3 deletions clang/test/CodeGenSYCL/device_globals_with_spec_ids.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ int main() {
cl::sycl::kernel_single_task<class first_kernel>([]() {});
}

// CHECK: #include <CL/sycl/detail/defines_elementary.hpp>
// CHECK: #include <sycl/detail/defines_elementary.hpp>
constexpr sycl::specialization_id a{2};
// CHECK-NEXT: __SYCL_INLINE_NAMESPACE(cl) {
// CHECK-NEXT: namespace sycl {
Expand Down Expand Up @@ -247,8 +247,8 @@ struct Wrapper {
} // namespace
} // namespace outer

// CHECK: #include <CL/sycl/detail/spec_const_integration.hpp>
// CHECK-NEXT: #include <CL/sycl/detail/device_global_map.hpp>
// CHECK: #include <sycl/detail/spec_const_integration.hpp>
// CHECK-NEXT: #include <sycl/detail/device_global_map.hpp>
// CHECK-NEXT: namespace sycl::detail {
// CHECK-NEXT: namespace {
// CHECK-NEXT: __sycl_device_global_registration::__sycl_device_global_registration() noexcept {
Expand Down
4 changes: 2 additions & 2 deletions clang/test/CodeGenSYCL/empty-integration-footer.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown -fsycl-int-footer=%t.h %s -emit-llvm -o %t.ll
// RUN: FileCheck -input-file=%t.h %s --allow-empty

// CHECK-NOT: #include <CL/sycl/detail/defines_elementary.hpp>
// CHECK-NOT: #include <CL/sycl/detail/spec_const_integration.hpp>
// CHECK-NOT: #include <sycl/detail/defines_elementary.hpp>
// CHECK-NOT: #include <sycl/detail/spec_const_integration.hpp>
4 changes: 2 additions & 2 deletions clang/test/CodeGenSYCL/int_header_without_kernels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ using namespace cl::sycl::ext::oneapi;
// CHECK-HEADER: } // namespace sycl
// CHECK-HEADER: } // __SYCL_INLINE_NAMESPACE(cl)

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

// CHECK-FOOTER: #include <CL/sycl/detail/device_global_map.hpp>
// CHECK-FOOTER: #include <sycl/detail/device_global_map.hpp>
// CHECK-FOOTER: namespace sycl::detail {
// CHECK-FOOTER-NEXT: namespace {
// CHECK-FOOTER-NEXT: __sycl_device_global_registration::__sycl_device_global_registration() noexcept {
Expand Down
4 changes: 2 additions & 2 deletions clang/test/CodeGenSYCL/integration_footer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ int main() {
cl::sycl::kernel_single_task<class first_kernel>([]() {});
}

// CHECK: #include <CL/sycl/detail/defines_elementary.hpp>
// CHECK: #include <sycl/detail/defines_elementary.hpp>

using namespace cl::sycl;

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

// CHECK: #include <CL/sycl/detail/spec_const_integration.hpp>
// CHECK: #include <sycl/detail/spec_const_integration.hpp>
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/integration_header.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown -sycl-std=2020 -fsycl-int-header=%t.h %s -emit-llvm -o %t.ll
// RUN: FileCheck -input-file=%t.h %s
//
// CHECK: #include <CL/sycl/detail/kernel_desc.hpp>
// CHECK: #include <sycl/detail/kernel_desc.hpp>
//
// CHECK: class first_kernel;
// CHECK-NEXT: namespace second_namespace {
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/kernel-param-acc-array-ih.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// This test checks the integration header generated when
// the kernel argument is an Accessor array.

// CHECK: #include <CL/sycl/detail/kernel_desc.hpp>
// CHECK: #include <sycl/detail/kernel_desc.hpp>

// CHECK: class kernel_A;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// This test checks the integration header when kernel argument
// is a struct containing an Accessor array.

// CHECK: #include <CL/sycl/detail/kernel_desc.hpp>
// CHECK: #include <sycl/detail/kernel_desc.hpp>

// CHECK: class kernel_C;

Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/kernel-param-pod-array-ih.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// This test checks the integration header generated for a kernel
// with an argument that is a POD array.

// CHECK: #include <CL/sycl/detail/kernel_desc.hpp>
// CHECK: #include <sycl/detail/kernel_desc.hpp>

// CHECK: class kernel_B;

Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/union-kernel-param-ih.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// This test checks the integration header generated when
// the kernel argument is union.

// CHECK: #include <CL/sycl/detail/kernel_desc.hpp>
// CHECK: #include <sycl/detail/kernel_desc.hpp>

// CHECK: class kernel_A;

Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/wrapped-accessor.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown -fsycl-int-header=%t.h %s -o %t.out
// RUN: FileCheck -input-file=%t.h %s
//
// CHECK: #include <CL/sycl/detail/kernel_desc.hpp>
// CHECK: #include <sycl/detail/kernel_desc.hpp>

// CHECK: class wrapped_access;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <CL/sycl/detail/defines_elementary.hpp>
#include <sycl/detail/defines_elementary.hpp>

__SYCL_INLINE_NAMESPACE(cl) {
namespace sycl {
Expand Down
2 changes: 1 addition & 1 deletion libdevice/include/assert-happened.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#ifdef __SPIR__

// NOTE Layout of this structure should be aligned with the one in
// sycl/include/CL/sycl/detail/assert_happened.hpp
// sycl/include/sycl/detail/assert_happened.hpp
struct AssertHappened {
int Flag = 0;
char Expr[256 + 1] = "";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <CL/sycl.hpp>
#include <sycl/sycl.hpp>

SYCL_EXTERNAL void custom_wrapper(const char *S) {
sycl::ext::oneapi::experimental::printf(S);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <CL/sycl.hpp>
#include <sycl/sycl.hpp>

using namespace sycl;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <CL/sycl.hpp>
#include <sycl/sycl.hpp>

using namespace sycl;

Expand Down
4 changes: 2 additions & 2 deletions sycl/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include/CL/sycl/version.hpp
include/CL/sycl/feature_test.hpp
include/sycl/version.hpp
include/sycl/feature_test.hpp
4 changes: 2 additions & 2 deletions sycl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ set(sycl_inc_dir ${CMAKE_CURRENT_SOURCE_DIR}/include)
set(sycl_src_dir ${CMAKE_CURRENT_SOURCE_DIR}/source)
set(sycl_plugin_dir ${CMAKE_CURRENT_SOURCE_DIR}/plugins)
string(TIMESTAMP __SYCL_COMPILER_VERSION "%Y%m%d")
set(version_header "${sycl_inc_dir}/CL/sycl/version.hpp")
set(version_header "${sycl_inc_dir}/sycl/version.hpp")
configure_file("${version_header}.in" "${version_header}")
set(feature_header "${sycl_inc_dir}/CL/sycl/feature_test.hpp")
set(feature_header "${sycl_inc_dir}/sycl/feature_test.hpp")
configure_file("${feature_header}.in" "${feature_header}")

include(AddBoostMp11Headers)
Expand Down
10 changes: 5 additions & 5 deletions sycl/doc/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ library is listed in the correct environment variable: `LD_LIBRARY_PATH`
Example error message:
```
In file included from example.cpp:1:
In file included from C:\compiler\lib\clang\10.0.0\include\CL/sycl.hpp:11:
In file included from C:\compiler\lib\clang\10.0.0\include\CL/sycl/accessor.hpp:13:
In file included from C:\compiler\lib\clang\10.0.0\include\CL/sycl/buffer.hpp:10:
In file included from C:\compiler\lib\clang\10.0.0\include\CL/sycl/detail/buffer_impl.hpp:14:
In file included from C:\compiler\lib\clang\10.0.0\include\CL/sycl/detail/aligned_allocator.hpp:16:
In file included from C:\compiler\lib\clang\10.0.0\include\sycl/sycl.hpp:11:
In file included from C:\compiler\lib\clang\10.0.0\include\sycl/accessor.hpp:13:
In file included from C:\compiler\lib\clang\10.0.0\include\sycl/buffer.hpp:10:
In file included from C:\compiler\lib\clang\10.0.0\include\sycl/detail/buffer_impl.hpp:14:
In file included from C:\compiler\lib\clang\10.0.0\include\sycl/detail/aligned_allocator.hpp:16:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.22.27905\include\algorithm(4493,9): error: SYCL kernel cannot call a
dllimport function
_STL_ASSERT(!(_Left < _Right), "invalid comparator");
Expand Down
4 changes: 2 additions & 2 deletions sycl/doc/GetStartedGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ A simple DPC++ or SYCL\* program consists of following parts:
Creating a file `simple-sycl-app.cpp` with the following C++/SYCL code:

```c++
#include <CL/sycl.hpp>
#include <sycl/sycl.hpp>

int main() {
// Creating buffer of 4 ints to be used inside the kernel code
Expand Down Expand Up @@ -737,7 +737,7 @@ The example below illustrates how to use `cl::sycl::device_selector` to create
device and queue objects bound to Intel GPU device:

```c++
#include <CL/sycl.hpp>
#include <sycl/sycl.hpp>

int main() {
class NEOGPUDeviceSelector : public cl::sycl::device_selector {
Expand Down
2 changes: 1 addition & 1 deletion sycl/doc/design/Assert.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ device binary image descriptor's property sets.

Each device image is supplied with an array of property sets. For description
of property sets see `struct pi_device_binary_struct` in
[`pi.h`](https://github.com/intel/llvm/blob/sycl/sycl/include/CL/sycl/detail/pi.h#L692)
[`pi.h`](https://github.com/intel/llvm/blob/sycl/sycl/include/sycl/detail/pi.h#L692)

A distinct property set `SYCL/assert used` is added. In this set a property
with the name of the kernel is added whenever the kernel uses assert. The use of
Expand Down
2 changes: 1 addition & 1 deletion sycl/doc/design/CompilerAndRuntimeDesign.md
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ For instance:
template <typename T, address_space AS> class multi_ptr {
// DecoratedType applies corresponding address space attribute to the type T
// DecoratedType<T, global_space>::type == "__attribute__((opencl_global)) T"
// See sycl/include/CL/sycl/access/access.hpp for more details
// See sycl/include/sycl/access/access.hpp for more details
using pointer_t = typename DecoratedType<T, AS>::type *;

pointer_t m_Pointer;
Expand Down
2 changes: 1 addition & 1 deletion sycl/doc/design/GlobalObjectsInRuntime.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ At the same time, SYCL users may want to construct some SYCL objects globally,
like in example below:

```
#include <CL/sycl.hpp>
#include <sycl/sycl.hpp>

sycl::queue Queue;

Expand Down
2 changes: 1 addition & 1 deletion sycl/doc/design/KernelProgramCache.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ following is done:
All fields are atomic because they can be accessed from multiple threads.

A specialization of helper class
[Locked](https://github.com/intel/llvm/blob/sycl/sycl/include/CL/sycl/detail/locked.hpp)
[Locked](https://github.com/intel/llvm/blob/sycl/sycl/include/sycl/detail/locked.hpp)
for reference of proper mapping is returned by Acquire function. The use of this
class implements RAII to make code look cleaner a bit. Now, GetCache function
will return the mapping to be employed that includes the 3 components: kernel
Expand Down
6 changes: 3 additions & 3 deletions sycl/doc/design/PluginInterface.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ SYCL_PI_TRACE=-1 lists all PI Traces above and more debug messages.

#### Plugin binary interface
Plugins should implement all the Interface APIs required for the PI Version
it supports. There is [pi.def](../../include/CL/sycl/detail/pi.def)/
[pi.h](../../include/CL/sycl/detail/pi.h) file listing all PI API names that
it supports. There is [pi.def](../../include/sycl/detail/pi.def)/
[pi.h](../../include/sycl/detail/pi.h) file listing all PI API names that
can be called by the specific version of Plugin Interface.
It exports a function - "piPluginInit" that returns the plugin details and
function pointer table containing the list of pointers to implemented Interface
Expand Down Expand Up @@ -149,7 +149,7 @@ into
- **Interoperability API** which allows interoperability with underlying
runtimes such as OpenCL.

See [pi.h](../../include/CL/sycl/detail/pi.h) header for the full list and
See [pi.h](../../include/sycl/detail/pi.h) header for the full list and
descriptions of PI APIs.

### The Core OpenCL-based PI APIs
Expand Down
4 changes: 2 additions & 2 deletions sycl/doc/design/SYCL2020-SpecializationConstants.md
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ inline const char *get_spec_constant_symbolic_ID<id_float>() {
} // __SYCL_INLINE_NAMESPACE(cl)

// Detailed description of this header is provided below in corresponding RT section
#include <CL/sycl/detail/spec_const_integration.hpp>
#include <sycl/detail/spec_const_integration.hpp>
```

Note that `get_spec_constant_symbolic_ID` specialization are generated for each
Expand Down Expand Up @@ -915,7 +915,7 @@ namespace sycl {
}
}

#include <CL/sycl/detail/spec_const_integration.hpp>
#include <sycl/detail/spec_const_integration.hpp>
```

### DPC++ runtime
Expand Down
2 changes: 1 addition & 1 deletion sycl/doc/design/SYCLInstrumentationUsingXPTI.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ plugin interface (PI) layer `initialize()` call. In this call, we will
perform two operations:

1. Initialize all listeners and create a trace event to represent the graph.
This is done in `sycl/include/CL/sycl/detail/pi.cpp`.
This is done in `sycl/include/sycl/detail/pi.cpp`.
2. Send a `graph_create` event to all subscribers. This notification
will only be sent once.

Expand Down
2 changes: 1 addition & 1 deletion sycl/doc/developer/ABIPolicyGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,4 @@ At the end of this window we will increment major version of the DPC++ library
1. If there is a need to add a new field in `sycl::handler` or/and
`sycl::detail::CG` classes it can be done without breaking ABI using the
approach described in the comment at the beggining of
[cg.hpp](../../include/CL/sycl/detail/cg.hpp)
[cg.hpp](../../include/sycl/detail/cg.hpp)
Loading