Skip to content

Commit

Permalink
Move ur_* headers to the top level include/
Browse files Browse the repository at this point in the history
  • Loading branch information
aelovikov-intel committed Sep 23, 2024
1 parent c995635 commit 00b70cd
Show file tree
Hide file tree
Showing 36 changed files with 47 additions and 46 deletions.
12 changes: 6 additions & 6 deletions sycl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,9 @@ add_custom_command(
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
COMMAND ${CMAKE_COMMAND} -E copy ${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_api.h ${SYCL_INCLUDE_BUILD_DIR}/sycl
COMMAND ${CMAKE_COMMAND} -E copy ${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_api_funcs.def ${SYCL_INCLUDE_BUILD_DIR}/sycl
COMMAND ${CMAKE_COMMAND} -E copy ${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_print.hpp ${SYCL_INCLUDE_BUILD_DIR}/sycl
COMMAND ${CMAKE_COMMAND} -E copy ${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_api.h ${SYCL_INCLUDE_BUILD_DIR}
COMMAND ${CMAKE_COMMAND} -E copy ${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_api_funcs.def ${SYCL_INCLUDE_BUILD_DIR}
COMMAND ${CMAKE_COMMAND} -E copy ${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_print.hpp ${SYCL_INCLUDE_BUILD_DIR}
COMMENT "Copying SYCL headers ...")

# Copy SYCL headers from source to install directory
Expand All @@ -260,11 +260,11 @@ install(DIRECTORY "${sycl_inc_dir}/std" DESTINATION ${SYCL_INCLUDE_DIR} COMPONEN
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)
install(FILES "${sycl_inc_dir}/syclcompat.hpp" DESTINATION ${SYCL_INCLUDE_DIR} COMPONENT sycl-headers)
install(FILES "${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_api.h" DESTINATION ${SYCL_INCLUDE_DIR}/sycl
install(FILES "${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_api.h" DESTINATION ${SYCL_INCLUDE_DIR}
COMPONENT sycl-headers)
install(FILES "${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_api_funcs.def" DESTINATION ${SYCL_INCLUDE_DIR}/sycl
install(FILES "${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_api_funcs.def" DESTINATION ${SYCL_INCLUDE_DIR}
COMPONENT sycl-headers)
install(FILES "${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_print.hpp" DESTINATION ${SYCL_INCLUDE_DIR}/sycl
install(FILES "${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_print.hpp" DESTINATION ${SYCL_INCLUDE_DIR}
COMPONENT sycl-headers)

if (WIN32)
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 <sycl/ur_api.h> // for UR_RESULT_ERRO...
#include <ur_api.h> // for UR_RESULT_ERRO...

#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 <sycl/ur_api.h> // for ur_native_handle_t
#include <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 <sycl/ur_api.h> // for ur_native_handle_t
#include <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 <sycl/ur_api.h> // for ur_native_handle_t
#include <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 <sycl/ur_api.h> // for UR_RESULT_ERROR_INVALID_VALUE
#include <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 <sycl/ur_api.h> // for UR_RESULT_ERROR_INVALID_WORK_GROUP_SIZE
#include <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 <sycl/ur_api.h>
#include <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 <sycl/ur_api.h>
#include <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 <sycl/ur_api_funcs.def>
#include <ur_api_funcs.def>
#undef _UR_API
};

struct UrFuncPtrMapT {
#define _UR_API(api) decltype(&::api) pfn_##api = nullptr;
#include <sycl/ur_api_funcs.def>
#include <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 <sycl/ur_api_funcs.def>
#include <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 <sycl/ur_api_funcs.def>
#include <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 <sycl/ur_api_funcs.def>
#include <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 <sycl/ur_api.h>
#include <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 <sycl/ur_api.h> // for ur_native_handle_t
#include <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 <sycl/ur_api.h> // for UR_RESULT_ERROR_INVALID_VALUE
#include <ur_api.h> // for UR_RESULT_ERROR_INVALID_VALUE

#include <bitset> // for bitset
#include <memory> // for shared_ptr
Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/ext/oneapi/bindless_images_interop.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#pragma once

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

#include <stddef.h> // for size_t

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#pragma once

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

namespace sycl {
inline namespace _V1 {
Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/ext/oneapi/bindless_images_sampler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#pragma once

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

namespace sycl {
inline namespace _V1 {
Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/image.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <sycl/range.hpp> // for range, rangeTo...
#include <sycl/sampler.hpp> // for image_sampler
#include <sycl/types.hpp> // for vec
#include <sycl/ur_api.h> // for ur_native_hand...
#include <ur_api.h> // for ur_native_hand...

#include <cstddef> // for size_t, nullptr_t
#include <functional> // for function
Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/info/info_desc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#pragma once

#include <sycl/detail/defines_elementary.hpp> // for __SYCL2020_DEPRECATED
#include <sycl/ur_api.h>
#include <ur_api.h>

// FIXME: .def files included to this file use all sorts of SYCL objects like
// id, range, traits, etc. We have to include some headers before including .def
Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/interop_handle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <sycl/ext/oneapi/accessor_property_list.hpp> // for accessor_property_list
#include <sycl/image.hpp> // for image
#include <sycl/properties/buffer_properties.hpp> // for buffer
#include <sycl/ur_api.h> // for ur_mem_handle_t, ur...
#include <ur_api.h> // for ur_mem_handle_t, ur...

#include <memory> // for shared_ptr
#include <stdint.h> // for int32_t
Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/kernel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <sycl/device.hpp> // for device
#include <sycl/kernel_bundle_enums.hpp> // for bundle_state
#include <sycl/range.hpp> // for range
#include <sycl/ur_api.h> // for ur_native_handle_t
#include <ur_api.h> // for ur_native_handle_t
#include <variant> // for hash

namespace sycl {
Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/kernel_bundle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <sycl/kernel.hpp> // for kernel, kernel_bundle
#include <sycl/kernel_bundle_enums.hpp> // for bundle_state
#include <sycl/property_list.hpp> // for property_list
#include <sycl/ur_api.h> // for ur_native_handle_t
#include <ur_api.h> // for ur_native_handle_t

#include <sycl/ext/oneapi/experimental/free_function_traits.hpp>
#include <sycl/ext/oneapi/properties/properties.hpp> // PropertyT
Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/kernel_handler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <sycl/detail/defines.hpp> // for __SYCL_TYPE
#include <sycl/detail/defines_elementary.hpp> // for __SYCL_ALWAYS_INLINE
#include <sycl/exception.hpp> // for feature_not_supported
#include <sycl/ur_api.h> // for UR_RESULT_ERROR_INVALID_OPERATION
#include <ur_api.h> // for UR_RESULT_ERROR_INVALID_OPERATION

#ifdef __SYCL_DEVICE_ONLY__
#include <CL/__spirv/spirv_ops.hpp>
Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/memory_enums.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#pragma once

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

#include <atomic> // for memory_order
#include <vector> // for vector
Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/platform.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <sycl/detail/util.hpp>
#include <sycl/device_selector.hpp>
#include <sycl/info/info_desc.hpp>
#include <sycl/ur_api.h>
#include <ur_api.h>

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

#include <sycl/detail/common.hpp>

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

namespace sycl {
inline namespace _V1 {
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/device_binary_image.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <sycl/detail/common.hpp>
#include <sycl/detail/os_util.hpp>
#include <sycl/detail/ur.hpp>
#include <sycl/ur_api.h>
#include <ur_api.h>

#include <sycl/detail/iostream_proxy.hpp>

Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/error_handling/error_handling.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#include <detail/cg.hpp>
#include <detail/device_impl.hpp>
#include <sycl/ur_api.h>
#include <ur_api.h>

namespace sycl {
inline namespace _V1 {
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/mem_alloc_helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#pragma once

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

namespace sycl {
inline namespace _V1 {
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/memory_manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <sycl/property_list.hpp>
#include <sycl/range.hpp>

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

#include <memory>
#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/platform_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <detail/platform_util.hpp>
#include <sycl/detail/os_util.hpp>
#include <sycl/exception.hpp>
#include <sycl/ur_api.h>
#include <ur_api.h>

#if defined(__SYCL_RT_OS_LINUX)
#include <errno.h>
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/plugin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <sycl/detail/type_traits.hpp>
#include <sycl/detail/ur.hpp>

#include <sycl/ur_api.h>
#include <ur_api.h>
#ifdef XPTI_ENABLE_INSTRUMENTATION
// Include the headers necessary for emitting traces using the trace framework
#include "xpti/xpti_trace_framework.h"
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/spec_constant_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <sycl/detail/iostream_proxy.hpp>
#include <sycl/detail/util.hpp>
#include <sycl/exception.hpp>
#include <sycl/ur_api.h>
#include <ur_api.h>

#include <cstring>

Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/sycl_mem_obj_i.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#pragma once

#include <sycl/detail/ur.hpp>
#include <sycl/ur_api.h>
#include <ur_api.h>

namespace sycl {
inline namespace _V1 {
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/ur.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
#include <sycl/detail/device_filter.hpp>
#include <sycl/detail/stl_type_traits.hpp>
#include <sycl/detail/ur.hpp>
#include <sycl/ur_api.h>
#include <sycl/version.hpp>
#include <ur_api.h>

#include <bitset>
#include <cstdarg>
Expand Down
3 changes: 2 additions & 1 deletion sycl/test/include_deps/deps_known.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ function deps() {

clang++ -fsycl -fsycl-device-only -include "$HEADER" -c -x c++ /dev/null -o /dev/null -MD -MF - \
| sed 's@: /dev/null@: /dev/null\n@' \
| grep 'include/sycl\|/dev/null\|CL/\|:' \
| grep 'include/sycl\|/dev/null\|CL/\|ur_\|:' \
| sed 's@.*/include/sycl/@@' \
| sed 's@.*/include/CL/@CL/@' \
| sed 's@.*/include/ur_@ur_@' \
| sed 's/ \\//'
}

Expand Down
2 changes: 1 addition & 1 deletion sycl/tools/sycl-trace/ur_trace_collector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "xpti/xpti_trace_framework.h"

#include <sycl/detail/spinlock.hpp>
#include <sycl/ur_print.hpp>
#include <ur_print.hpp>

#include <iostream>
#include <mutex>
Expand Down
2 changes: 1 addition & 1 deletion sycl/tools/xpti_helpers/usm_analyzer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include "xpti/xpti_trace_framework.h"

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

#include <iostream>
#include <map>
Expand Down

0 comments on commit 00b70cd

Please sign in to comment.