Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions clang/lib/Driver/ToolChains/SYCL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1812,22 +1812,18 @@ void SYCLToolChain::AddSYCLIncludeArgs(const clang::driver::Driver &Driver,
const ArgList &DriverArgs,
ArgStringList &CC1Args) {
// Add the SYCL header search locations in the specified order.
// ../include/sycl
// ../include/sycl/stl_wrappers
// ../include
SmallString<128> IncludePath(Driver.Dir);
llvm::sys::path::append(IncludePath, "..");
llvm::sys::path::append(IncludePath, "include");
SmallString<128> SYCLPath(IncludePath);
llvm::sys::path::append(SYCLPath, "sycl");
// This is used to provide our wrappers around STL headers that provide
// additional functions/template specializations when the user includes those
// STL headers in their programs (e.g., <complex>).
SmallString<128> STLWrappersPath(SYCLPath);
SmallString<128> STLWrappersPath(IncludePath);
llvm::sys::path::append(STLWrappersPath, "sycl");
llvm::sys::path::append(STLWrappersPath, "stl_wrappers");
CC1Args.push_back("-internal-isystem");
CC1Args.push_back(DriverArgs.MakeArgString(SYCLPath));
CC1Args.push_back("-internal-isystem");
CC1Args.push_back(DriverArgs.MakeArgString(STLWrappersPath));
CC1Args.push_back("-internal-isystem");
CC1Args.push_back(DriverArgs.MakeArgString(IncludePath));
Expand Down
2 changes: 1 addition & 1 deletion clang/test/Driver/sycl-device-old-model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/// Check "-fsycl-is-device" is passed when compiling for device:
// RUN: %clang -### -fsycl-device-only --no-offload-new-driver %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK-SYCL-DEV %s
// CHECK-SYCL-DEV: "-fsycl-is-device"{{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl" "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include"
// CHECK-SYCL-DEV: "-fsycl-is-device"{{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers" "-internal-isystem" "{{[^"]*}}bin{{[/\\]+}}..{{[/\\]+}}include"

/// Check that "-Wno-sycl-strict" is set on compiler invocation with "-fsycl"
/// or "-fsycl-device-only" or both:
Expand Down
2 changes: 1 addition & 1 deletion clang/test/Driver/sycl-device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// RUN: | FileCheck -check-prefix=CHECK-SYCL-DEV %s
// RUN: %clang -### --config=%S/Inputs/empty.cfg -fsycl-device-only %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK-SYCL-DEV %s
// CHECK-SYCL-DEV: "-fsycl-is-device"{{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl" "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include"
// CHECK-SYCL-DEV: "-fsycl-is-device"{{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers" "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include"

/// Check that "-Wno-sycl-strict" is set on compiler invocation with "-fsycl"
/// or "-fsycl-device-only" or both:
Expand Down
2 changes: 1 addition & 1 deletion clang/test/Driver/sycl-int-footer-old-model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
// DEP_GEN: clang{{.*}} "-fsycl-is-device"
// DEP_GEN-SAME: "-dependency-file" "[[DEPFILE:.+\.d]]"
// DEP_GEN-SAME: "-MT"
// DEP_GEN-SAME: "-internal-isystem" "{{.*}}{{[/\\]+}}include{{[/\\]+}}sycl"
// DEP_GEN-SAME: "-internal-isystem" "{{.*}}{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers"
// DEP_GEN-SAME: "-x" "c++" "[[INPUTFILE:.+\.cpp]]"
// DEP_GEN: clang{{.*}} "-fsycl-is-host"
// DEP_GEN-SAME: "-dependency-file" "[[DEPFILE]]"
Expand Down
2 changes: 1 addition & 1 deletion clang/test/Driver/sycl-int-footer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
// DEP_GEN: clang{{.*}} "-fsycl-is-device"
// DEP_GEN-SAME: "-dependency-file" "[[DEPFILE:.+\.d]]"
// DEP_GEN-SAME: "-MT"
// DEP_GEN-SAME: "-internal-isystem" "{{.*}}{{[/\\]+}}include{{[/\\]+}}sycl"
// DEP_GEN-SAME: "-internal-isystem" "{{.*}}{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers"
// DEP_GEN-SAME: "-x" "c++" "[[INPUTFILE:.+\.cpp]]"
// DEP_GEN: clang{{.*}} "-fsycl-is-host"
// DEP_GEN-SAME: "-dependency-file" "[[DEPFILE]]"
Expand Down
2 changes: 1 addition & 1 deletion clang/test/Driver/sycl-offload-amdgcn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// RUN: -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx906 -nogpulib\
// RUN: -fsycl-libspirv-path=%S/Inputs/SYCL/libspirv.bc %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHK-ACTIONS %s
// CHK-ACTIONS: "-cc1" "-triple" "amdgcn-amd-amdhsa" "-aux-triple" "x86_64-unknown-linux-gnu"{{.*}} "-fsycl-is-device"{{.*}} "-Wno-sycl-strict"{{.*}} "-sycl-std=2020" {{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libspirv.bc"{{.*}} "-target-cpu" "gfx906"{{.*}} "-std=c++11"{{.*}}
// CHK-ACTIONS: "-cc1" "-triple" "amdgcn-amd-amdhsa" "-aux-triple" "x86_64-unknown-linux-gnu"{{.*}} "-fsycl-is-device"{{.*}} "-Wno-sycl-strict"{{.*}} "-sycl-std=2020" {{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libspirv.bc"{{.*}} "-target-cpu" "gfx906"{{.*}} "-std=c++11"{{.*}}
// CHK-ACTIONS-NOT: "-mllvm -sycl-opt"
// CHK-ACTIONS: clang-offload-wrapper"{{.*}} "-host=x86_64-unknown-linux-gnu" "-compile-opts=--offload-arch=gfx906" "-target=amdgcn" "-kind=sycl"{{.*}}

Expand Down
2 changes: 1 addition & 1 deletion clang/test/Driver/sycl-offload-header-check.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
// RUN: %clang -### -fsycl %s 2>&1 | \
// RUN: FileCheck --check-prefix=CHECK-HEADER %s
// CHECK-HEADER: clang{{.*}} "-fsycl-int-header=[[HEADER:.+\.h]]"
// CHECK-HEADER: {{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl"
// CHECK-HEADER: {{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers"
// CHECK-HEADER-NOT: clang{{.*}} "-include" "[[HEADER]]"
// CHECK-HEADER: clang{{.*}} "-include" "{{.*}}_dirname{{.+}}.h"
2 changes: 1 addition & 1 deletion clang/test/Driver/sycl-offload-intelfpga.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// RUN: | FileCheck -check-prefix=CHK-HEADERS-INTELFPGA %s
// RUN: %clangxx -### -target x86_64-unknown-linux-gnu -fsycl -fsycl-targets=spir64_fpga-unknown-unknown %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHK-HEADERS-INTELFPGA %s
// CHK-HEADERS-INTELFPGA: clang{{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl"
// CHK-HEADERS-INTELFPGA: clang{{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers"

/// -fintelfpga implies -g and -MMD
// RUN: %clangxx -### -target x86_64-unknown-linux-gnu -fintelfpga -Xshardware %s 2>&1 \
Expand Down
4 changes: 2 additions & 2 deletions clang/test/Driver/sycl-offload-nvptx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// RUN: -fsycl-libspirv-path=%S/Inputs/SYCL/libspirv.bc %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHK-ACTIONS-WIN %s

// CHK-ACTIONS: "-cc1" "-triple" "nvptx64-nvidia-cuda" "-aux-triple" "x86_64-unknown-linux-gnu"{{.*}} "-fsycl-is-device"{{.*}} "-Wno-sycl-strict"{{.*}} "-sycl-std=2020" {{.*}} "-emit-llvm-bc" {{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libspirv.bc"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libdevice{{.*}}.10.bc"{{.*}} "-target-sdk-version=[[CUDA_VERSION:[0-9.]+]]"{{.*}} "-target-cpu" "sm_50"{{.*}} "-target-feature" "+ptx42"{{.*}} "-std=c++11"{{.*}}
// CHK-ACTIONS: "-cc1" "-triple" "nvptx64-nvidia-cuda" "-aux-triple" "x86_64-unknown-linux-gnu"{{.*}} "-fsycl-is-device"{{.*}} "-Wno-sycl-strict"{{.*}} "-sycl-std=2020" {{.*}} "-emit-llvm-bc" {{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libspirv.bc"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libdevice{{.*}}.10.bc"{{.*}} "-target-sdk-version=[[CUDA_VERSION:[0-9.]+]]"{{.*}} "-target-cpu" "sm_50"{{.*}} "-target-feature" "+ptx42"{{.*}} "-std=c++11"{{.*}}
// CHK-ACTIONS: sycl-post-link{{.*}} "-split=auto"
// CHK-ACTIONS: file-table-tform" "-extract=Code" "-drop_titles"
// CHK-ACTIONS: llvm-foreach" {{.*}} "--" "{{.*}}clang-{{[0-9]+}}"
Expand All @@ -23,7 +23,7 @@
// CHK-ACTIONS-NOT: "-mllvm -sycl-opt"
// CHK-ACTIONS: clang-offload-wrapper"{{.*}} "-host=x86_64-unknown-linux-gnu" "-target=nvptx64" "-kind=sycl"{{.*}}

// CHK-ACTIONS-WIN: "-cc1" "-triple" "nvptx64-nvidia-cuda" "-aux-triple" "x86_64-pc-windows-msvc"{{.*}} "-fsycl-is-device"{{.*}} "-Wno-sycl-strict"{{.*}} "-sycl-std=2020" {{.*}} "-emit-llvm-bc" {{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libspirv.bc"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libdevice{{.*}}.10.bc"{{.*}} "-target-sdk-version=[[CUDA_VERSION:[0-9.]+]]"{{.*}} "-target-cpu" "sm_50"{{.*}} "-target-feature" "+ptx42"{{.*}}
// CHK-ACTIONS-WIN: "-cc1" "-triple" "nvptx64-nvidia-cuda" "-aux-triple" "x86_64-pc-windows-msvc"{{.*}} "-fsycl-is-device"{{.*}} "-Wno-sycl-strict"{{.*}} "-sycl-std=2020" {{.*}} "-emit-llvm-bc" {{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libspirv.bc"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libdevice{{.*}}.10.bc"{{.*}} "-target-sdk-version=[[CUDA_VERSION:[0-9.]+]]"{{.*}} "-target-cpu" "sm_50"{{.*}} "-target-feature" "+ptx42"{{.*}}
// CHK-ACTIONS-WIN: sycl-post-link{{.*}} "-split=auto"
// CHK-ACTIONS-WIN: file-table-tform" "-extract=Code" "-drop_titles"
// CHK-ACTIONS-WIN: llvm-foreach" {{.*}} "--" "{{.*}}clang-{{[0-9]+}}"
Expand Down
6 changes: 1 addition & 5 deletions clang/test/Driver/sycl-offload-old-model.c
Original file line number Diff line number Diff line change
Expand Up @@ -782,14 +782,10 @@
// RUN: %clang -### -fsycl --no-offload-new-driver %s 2>&1 | FileCheck %s -check-prefixes=CHECK-HEADER-DIR
// RUN: %clang_cl -### -fsycl --no-offload-new-driver %s 2>&1 | FileCheck %s -check-prefixes=CHECK-HEADER-DIR
// CHECK-HEADER-DIR: clang{{.*}} "-fsycl-is-device"
// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT:[^"]*]]bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl"
// CHECK-HEADER-DIR-NOT: -internal-isystem
// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT]]bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers"
// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT:[^"]*]]bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers"
// CHECK-HEADER-DIR-NOT: -internal-isystem
// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT]]bin{{[/\\]+}}..{{[/\\]+}}include"
// CHECK-HEADER-DIR: clang{{.*}} "-fsycl-is-host"
// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT]]bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl"
// CHECK-HEADER-DIR-NOT: -internal-isystem
// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT]]bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers"
// CHECK-HEADER-DIR-NOT: -internal-isystem
// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT]]bin{{[/\\]+}}..{{[/\\]+}}include"
Expand Down
6 changes: 1 addition & 5 deletions clang/test/Driver/sycl-offload.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,14 +497,10 @@
// RUN: %clang -### -fsycl --offload-new-driver %s 2>&1 | FileCheck %s -check-prefixes=CHECK-HEADER-DIR
// RUN: %clang_cl -### -fsycl --offload-new-driver %s 2>&1 | FileCheck %s -check-prefixes=CHECK-HEADER-DIR
// CHECK-HEADER-DIR: clang{{.*}} "-fsycl-is-device"
// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT:[^"]*]]bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl"
// CHECK-HEADER-DIR-NOT: -internal-isystem
// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT]]bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers"
// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT:[^"]*]]bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers"
// CHECK-HEADER-DIR-NOT: -internal-isystem
// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT]]bin{{[/\\]+}}..{{[/\\]+}}include"
// CHECK-HEADER-DIR: clang{{.*}} "-fsycl-is-host"
// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT]]bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl"
// CHECK-HEADER-DIR-NOT: -internal-isystem
// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT]]bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers"
// CHECK-HEADER-DIR-NOT: -internal-isystem
// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT]]bin{{[/\\]+}}..{{[/\\]+}}include"
Expand Down
4 changes: 2 additions & 2 deletions clang/test/Driver/sycl.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

// ENABLED: "-cc1"{{.*}} "-fsycl-is-device"
// ENABLED-SAME: "-sycl-std={{[-.sycl0-9]+}}"
// ENABLED-SAME: "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl"
// ENABLED-SAME: "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers"

// NOT_ENABLED-NOT: "-fsycl-is-device"
// NOT_ENABLED-NOT: "-fsycl-std-layout-kernel-params"
Expand Down Expand Up @@ -47,7 +47,7 @@
// RUN: %clang_cl -### --target=i386-pc-windows-msvc -fsycl-device-only %s 2>&1 | FileCheck %s --check-prefix=DEFAULT -DSPIRARCH=spir

// DEFAULT: "-triple" "[[SPIRARCH]]-unknown-{{.*}}"{{.*}} "-fsycl-is-device"{{.*}} "-sycl-std=2020"{{.*}} "-emit-llvm-bc"
// DEFAULT: "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl"
// DEFAULT: "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers"
// DEFAULT: "-internal-isystem" "{{.*lib.*clang.*include}}"
// DEFAULT: "-std=c++17"
// DEFAULT-NOT: "{{.*}}llvm-spirv"{{.*}}
Expand Down
11 changes: 5 additions & 6 deletions sycl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,11 @@ endif()
# Copy OpenCL Headers into sycl headers build directory
# Compiler does automatic lookup bin/../include based on clang binary location,
# e.g. when run LIT tests
file(COPY ${OpenCL_INCLUDE_DIR}/CL
DESTINATION ${SYCL_INCLUDE_BUILD_DIR}/sycl)
file(COPY ${OpenCL_INCLUDE_DIR}/CL DESTINATION ${SYCL_INCLUDE_BUILD_DIR})

# Include OpenCL Headers into final bundle.
install(DIRECTORY ${OpenCL_INCLUDE_DIR}/CL
DESTINATION ${SYCL_INCLUDE_DIR}/sycl
DESTINATION ${SYCL_INCLUDE_DIR}
COMPONENT OpenCL-Headers)

# Option for enabling building the SYCL major release preview library.
Expand Down Expand Up @@ -220,7 +219,7 @@ file(GLOB_RECURSE HEADERS_IN_SYCLCOMPAT_DIR CONFIGURE_DEPENDS "${sycl_inc_dir}/s

string(REPLACE "${sycl_inc_dir}" "${SYCL_INCLUDE_BUILD_DIR}"
OUT_HEADERS_IN_SYCL_DIR "${HEADERS_IN_SYCL_DIR}")
string(REPLACE "${sycl_inc_dir}/CL" "${SYCL_INCLUDE_BUILD_DIR}/sycl/CL"
string(REPLACE "${sycl_inc_dir}/CL" "${SYCL_INCLUDE_BUILD_DIR}/CL"
OUT_HEADERS_IN_CL_DIR "${HEADERS_IN_CL_DIR}")
string(REPLACE "${sycl_inc_dir}" "${SYCL_INCLUDE_BUILD_DIR}"
OUT_HEADERS_IN_STD_DIR "${HEADERS_IN_STD_DIR}")
Expand All @@ -245,7 +244,7 @@ add_custom_command(
${HEADERS_IN_STD_DIR}
${HEADERS_IN_SYCLCOMPAT_DIR}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${sycl_inc_dir}/sycl ${SYCL_INCLUDE_BUILD_DIR}/sycl
COMMAND ${CMAKE_COMMAND} -E copy_directory ${sycl_inc_dir}/CL ${SYCL_INCLUDE_BUILD_DIR}/sycl/CL
COMMAND ${CMAKE_COMMAND} -E copy_directory ${sycl_inc_dir}/CL ${SYCL_INCLUDE_BUILD_DIR}/CL
COMMAND ${CMAKE_COMMAND} -E copy_directory ${sycl_inc_dir}/std ${SYCL_INCLUDE_BUILD_DIR}/std
COMMAND ${CMAKE_COMMAND} -E copy_directory ${sycl_inc_dir}/syclcompat ${SYCL_INCLUDE_BUILD_DIR}/syclcompat
COMMAND ${CMAKE_COMMAND} -E copy ${sycl_inc_dir}/syclcompat.hpp ${SYCL_INCLUDE_BUILD_DIR}/syclcompat.hpp
Expand All @@ -256,7 +255,7 @@ add_custom_command(

# Copy SYCL headers from source to install directory
install(DIRECTORY "${sycl_inc_dir}/sycl" DESTINATION ${SYCL_INCLUDE_DIR} COMPONENT sycl-headers)
install(DIRECTORY "${sycl_inc_dir}/CL" DESTINATION ${SYCL_INCLUDE_DIR}/sycl COMPONENT sycl-headers)
install(DIRECTORY "${sycl_inc_dir}/CL" DESTINATION ${SYCL_INCLUDE_DIR}/ COMPONENT sycl-headers)
install(DIRECTORY "${sycl_inc_dir}/std" DESTINATION ${SYCL_INCLUDE_DIR} COMPONENT sycl-headers)
install(DIRECTORY ${BOOST_MP11_DESTINATION_DIR} DESTINATION ${SYCL_INCLUDE_DIR}/sycl/detail COMPONENT boost_mp11-headers)
install(DIRECTORY "${sycl_inc_dir}/syclcompat" DESTINATION ${SYCL_INCLUDE_DIR} COMPONENT sycl-headers)
Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/accessor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include <sycl/property_list.hpp> // for property_list
#include <sycl/range.hpp> // for range
#include <sycl/sampler.hpp> // for addressing_mode
#include <ur_api.h> // for UR_RESULT_ERRO...
#include <sycl/ur_api.h> // for UR_RESULT_ERRO...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change makes me think that ur_api.h is our own header, but that's not true. I wonder if we need to put it into some _deps subfolder for clarity.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been thinking about this too. I think even sycl/_deps/ur_api.h might be questionable, because one might want to use both UR and SYCL on the application side and I'd expect user's UR must somehow match the one libsycl.so was built with. Maybe I should be deploying these ur_*.h/.hpp at root include/ directory instead.

Does anybody have any ideas here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implemented the move in the latest revision.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or should it be ur/ur_*.h ? @intel/unified-runtime-reviewers

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ping @intel/unified-runtime-reviewers to answer the question above. @AlexeySachkov just in case as well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we ever intend for UR to be used directly by an application so we can eliminate that as a concern. In the UR repo the API header just lives in the root include so ur/ur_api.h would look a little weird from that perspective

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If UR is not intended to be used by end users, then I think some generic _deps is good enough and it will be less confusing than ur/ for those who work with it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if I prefer _deps/ur_api.h vs just ur_api.h, especially since the latter is the prior spelling of the includes. As such, _deps/* move should be in another PR, if at all.


#include <cstddef> // for size_t
#include <functional> // for hash
Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/backend.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <sycl/platform.hpp> // for platform, get_n...
#include <sycl/property_list.hpp> // for property_list
#include <sycl/queue.hpp> // for queue, get_native
#include <ur_api.h> // for ur_native_handle_t
#include <sycl/ur_api.h> // for ur_native_handle_t

#if SYCL_BACKEND_OPENCL
#include <sycl/detail/backend_traits_opencl.hpp> // for interop
Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/buffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <sycl/id.hpp>
#include <sycl/property_list.hpp>
#include <sycl/range.hpp>
#include <ur_api.h> // for ur_native_handle_t
#include <sycl/ur_api.h> // for ur_native_handle_t

#include <cstddef> // for size_t, nullptr_t
#include <functional> // for function
Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/context.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <sycl/detail/owner_less_base.hpp> // for OwnerLessBase
#include <sycl/platform.hpp> // for platform
#include <sycl/property_list.hpp> // for property_list
#include <ur_api.h> // for ur_native_handle_t
#include <sycl/ur_api.h> // for ur_native_handle_t

#ifdef __SYCL_INTERNAL_API
#include <sycl/detail/cl.h>
Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/detail/array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#include <sycl/detail/defines_elementary.hpp> // for __SYCL_ALWAYS_INLINE
#include <sycl/exception.hpp>
#include <ur_api.h> // for UR_RESULT_ERROR_INVALID_VALUE
#include <sycl/ur_api.h> // for UR_RESULT_ERROR_INVALID_VALUE

#include <stddef.h> // for size_t
#include <type_traits> // for enable_if_t
Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/detail/cg_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <sycl/nd_item.hpp> // for nd_item
#include <sycl/nd_range.hpp> // for nd_range
#include <sycl/range.hpp> // for range, operator*
#include <ur_api.h> // for UR_RESULT_ERROR_INVALID_WORK_GROUP_SIZE
#include <sycl/ur_api.h> // for UR_RESULT_ERROR_INVALID_WORK_GROUP_SIZE

#include <functional> // for function
#include <stddef.h> // for size_t
Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/detail/info_desc_helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#pragma once

#include <ur_api.h>
#include <sycl/ur_api.h>

#include <type_traits> // for true_type

Expand Down
12 changes: 6 additions & 6 deletions sycl/include/sycl/detail/ur.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <sycl/backend_types.hpp>
#include <sycl/detail/export.hpp>
#include <sycl/detail/os_util.hpp>
#include <ur_api.h>
#include <sycl/ur_api.h>

#include <memory>
#include <type_traits>
Expand Down Expand Up @@ -49,13 +49,13 @@ namespace detail {

enum class UrApiKind {
#define _UR_API(api) api,
#include <ur_api_funcs.def>
#include <sycl/ur_api_funcs.def>
#undef _UR_API
};

struct UrFuncPtrMapT {
#define _UR_API(api) decltype(&::api) pfn_##api = nullptr;
#include <ur_api_funcs.def>
#include <sycl/ur_api_funcs.def>
#undef _UR_API
};

Expand All @@ -66,7 +66,7 @@ void *GetWinProcAddress(void *module, const char *funcName);
inline void PopulateUrFuncPtrTable(UrFuncPtrMapT *funcs, void *module) {
#define _UR_API(api) \
funcs->pfn_##api = (decltype(&::api))GetWinProcAddress(module, #api);
#include <ur_api_funcs.def>
#include <sycl/ur_api_funcs.def>
#undef _UR_API
}

Expand All @@ -81,7 +81,7 @@ inline void PopulateUrFuncPtrTable(UrFuncPtrMapT *funcs, void *module) {
return (FuncPtrT)GetWinProcAddress(module, #api); \
} \
};
#include <ur_api_funcs.def>
#include <sycl/ur_api_funcs.def>
#undef _UR_API
#else
#define _UR_API(api) \
Expand All @@ -91,7 +91,7 @@ inline void PopulateUrFuncPtrTable(UrFuncPtrMapT *funcs, void *module) {
constexpr inline FuncPtrT getFuncPtr(const void *) { return &api; } \
constexpr inline FuncPtrT getFuncPtrFromModule(void *) { return &api; } \
};
#include <ur_api_funcs.def>
#include <sycl/ur_api_funcs.def>
#undef _UR_API
#endif

Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/device.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <sycl/info/info_desc.hpp>
#include <sycl/kernel_bundle_enums.hpp>
#include <sycl/platform.hpp>
#include <ur_api.h>
#include <sycl/ur_api.h>

#include <cstddef>
#include <memory>
Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/event.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <sycl/detail/export.hpp> // for __SYCL_EXPORT
#include <sycl/detail/info_desc_helpers.hpp> // for is_event_info_desc, is_...
#include <sycl/detail/owner_less_base.hpp> // for OwnerLessBase
#include <ur_api.h> // for ur_native_handle_t
#include <sycl/ur_api.h> // for ur_native_handle_t

#ifdef __SYCL_INTERNAL_API
#include <sycl/detail/cl.h>
Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/ext/oneapi/accessor_property_list.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <sycl/detail/property_list_base.hpp> // for PropertyListBase
#include <sycl/exception.hpp>
#include <sycl/property_list.hpp> // for property_list
#include <ur_api.h> // for UR_RESULT_ERROR_INVALID_VALUE
#include <sycl/ur_api.h> // for UR_RESULT_ERROR_INVALID_VALUE

#include <bitset> // for bitset
#include <memory> // for shared_ptr
Expand Down
Loading
Loading