Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion sycl/include/sycl/detail/array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

#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 <stddef.h> // for size_t
#include <type_traits> // for enable_if_t
Expand Down
1 change: 0 additions & 1 deletion sycl/include/sycl/detail/cg_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#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 <functional> // for function
#include <stddef.h> // for size_t
Expand Down
13 changes: 0 additions & 13 deletions sycl/include/sycl/detail/ur.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <sycl/detail/os_util.hpp>
#include <ur_api.h>

#include <memory>
#include <type_traits>
#include <vector>

Expand Down Expand Up @@ -103,9 +102,6 @@ __SYCL_EXPORT void contextSetExtendedDeleter(const sycl::context &constext,
void *user_data);
}

class Adapter;
using AdapterPtr = std::shared_ptr<Adapter>;

// TODO: To be removed as this was only introduced for esimd which was removed.
template <sycl::backend BE>
__SYCL_EXPORT void *getPluginOpaqueData(void *opaquedata_arg);
Expand All @@ -123,15 +119,6 @@ int unloadOsLibrary(void *Library);
// library, implementation is OS dependent.
void *getOsLibraryFuncAddress(void *Library, const std::string &FunctionName);

void *getURLoaderLibrary();

// Performs UR one-time initialization.
std::vector<AdapterPtr> &
initializeUr(ur_loader_config_handle_t LoaderConfig = nullptr);

// Get the adapter serving given backend.
template <backend BE> const AdapterPtr &getAdapter();

// The SYCL_UR_TRACE sets what we will trace.
// This is a bit-mask of various things we'd want to trace.
enum TraceLevel { TRACE_BASIC = 0x1, TRACE_CALLS = 0x2, TRACE_ALL = -1 };
Expand Down
1 change: 0 additions & 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,6 @@
#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 <bitset> // for bitset
#include <memory> // for shared_ptr
Expand Down
1 change: 0 additions & 1 deletion sycl/include/sycl/kernel_handler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#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 <ur_api.h> // for UR_RESULT_ERROR_INVALID_OPERATION

#ifdef __SYCL_DEVICE_ONLY__
#include <CL/__spirv/spirv_ops.hpp>
Expand Down
3 changes: 2 additions & 1 deletion sycl/source/backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@
#include "detail/kernel_id_impl.hpp"
#include "detail/platform_impl.hpp"
#include "detail/queue_impl.hpp"
#include "sycl/detail/impl_utils.hpp"
#include <detail/ur.hpp>
#include <sycl/backend.hpp>
#include <sycl/detail/common.hpp>
#include <sycl/detail/export.hpp>
#include <sycl/detail/impl_utils.hpp>
#include <sycl/detail/ur.hpp>
#include <sycl/exception.hpp>
#include <sycl/exception_list.hpp>
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/backend/level_zero.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#include <detail/adapter.hpp>
#include <detail/platform_impl.hpp>
#include <detail/queue_impl.hpp>
#include <detail/ur.hpp>
#include <sycl/backend.hpp>
#include <sycl/sycl.hpp>

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

#include <detail/backend_impl.hpp>
#include <detail/context_impl.hpp>
#include <detail/ur.hpp>
#include <sycl/context.hpp>
#include <sycl/detail/common.hpp>
#include <sycl/detail/ur.hpp>
#include <sycl/device.hpp>
#include <sycl/device_selector.hpp>
#include <sycl/exception.hpp>
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/adapter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
#pragma once

#include <detail/config.hpp>
#include <detail/ur.hpp>
#include <sycl/backend_types.hpp>
#include <sycl/detail/common.hpp>
#include <sycl/detail/iostream_proxy.hpp>
#include <sycl/detail/type_traits.hpp>
#include <sycl/detail/ur.hpp>

#include <ur_api.h>
#ifdef XPTI_ENABLE_INSTRUMENTATION
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/global_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
#include <detail/program_manager/program_manager.hpp>
#include <detail/scheduler/scheduler.hpp>
#include <detail/thread_pool.hpp>
#include <detail/ur.hpp>
#include <detail/xpti_registry.hpp>
#include <sycl/detail/device_filter.hpp>
#include <sycl/detail/spinlock.hpp>
#include <sycl/detail/ur.hpp>

#ifdef _WIN32
#include <windows.h>
Expand Down
3 changes: 1 addition & 2 deletions sycl/source/detail/platform_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//

#include "sycl/detail/ur.hpp"
#include "sycl/info/info_desc.hpp"
#include <detail/allowlist.hpp>
#include <detail/config.hpp>
#include <detail/device_impl.hpp>
Expand All @@ -20,6 +18,7 @@
#include <sycl/detail/ur.hpp>
#include <sycl/detail/util.hpp>
#include <sycl/device.hpp>
#include <sycl/info/info_desc.hpp>

#include <algorithm>
#include <cstring>
Expand Down
1 change: 0 additions & 1 deletion sycl/source/detail/program_manager/program_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <sycl/detail/kernel_properties.hpp>
#include <sycl/detail/os_util.hpp>
#include <sycl/detail/type_traits.hpp>
#include <sycl/detail/ur.hpp>
#include <sycl/detail/util.hpp>
#include <sycl/device.hpp>
#include <sycl/exception.hpp>
Expand Down
3 changes: 2 additions & 1 deletion sycl/source/detail/sycl_mem_obj_i.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@

#pragma once

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

#include <memory>

namespace sycl {
inline namespace _V1 {

Expand Down
1 change: 1 addition & 0 deletions sycl/source/detail/sycl_mem_obj_t.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ namespace detail {
class context_impl;
class event_impl;
class Adapter;
using AdapterPtr = std::shared_ptr<Adapter>;

using ContextImplPtr = std::shared_ptr<context_impl>;
using EventImplPtr = std::shared_ptr<event_impl>;
Expand Down
3 changes: 2 additions & 1 deletion sycl/source/detail/ur.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
///
/// \ingroup sycl_ur

#include "context_impl.hpp"
#include "ur.hpp"
#include <detail/adapter.hpp>
#include <detail/config.hpp>
#include <detail/context_impl.hpp>
#include <detail/global_handler.hpp>
#include <detail/xpti_registry.hpp>
#include <sycl/context.hpp>
Expand Down
41 changes: 41 additions & 0 deletions sycl/source/detail/ur.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
//==---------- ur.hpp - Unified Runtime integration helpers ----------------==//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

/// \file
///
/// C++ utilities for Unified Runtime integration.
///
/// \ingroup sycl_ur

#pragma once

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

#include <memory>
#include <vector>

namespace sycl {
inline namespace _V1 {
namespace detail {
class Adapter;
using AdapterPtr = std::shared_ptr<Adapter>;

namespace ur {
void *getURLoaderLibrary();

// Performs UR one-time initialization.
std::vector<AdapterPtr> &
initializeUr(ur_loader_config_handle_t LoaderConfig = nullptr);

// Get the adapter serving given backend.
template <backend BE> const AdapterPtr &getAdapter();
} // namespace ur
} // namespace detail
} // namespace _V1
} // namespace sycl
2 changes: 1 addition & 1 deletion sycl/source/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
#include <detail/config.hpp>
#include <detail/device_impl.hpp>
#include <detail/kernel_compiler/kernel_compiler_opencl.hpp>
#include <detail/ur.hpp>
#include <sycl/detail/device_filter.hpp>
#include <sycl/detail/export.hpp>
#include <sycl/detail/ur.hpp>
#include <sycl/device.hpp>
#include <sycl/device_selector.hpp>
#include <sycl/info/info_desc.hpp>
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#include <detail/backend_impl.hpp>
#include <detail/kernel_bundle_impl.hpp>
#include <detail/kernel_impl.hpp>
#include <detail/ur.hpp>
#include <sycl/detail/export.hpp>
#include <sycl/detail/ur.hpp>
#include <sycl/kernel.hpp>

namespace sycl {
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <detail/config.hpp>
#include <detail/global_handler.hpp>
#include <detail/platform_impl.hpp>
#include <sycl/detail/ur.hpp>
#include <detail/ur.hpp>
#include <sycl/device.hpp>
#include <sycl/device_selector.hpp>
#include <sycl/image.hpp>
Expand Down
2 changes: 1 addition & 1 deletion sycl/test/include_deps/sycl_accessor.hpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
// CHECK-NEXT: detail/array.hpp
// CHECK-NEXT: exception.hpp
// CHECK-NEXT: detail/string.hpp
// CHECK-NEXT: ur_api.h
// CHECK-NEXT: detail/common.hpp
// CHECK-NEXT: detail/is_device_copyable.hpp
// CHECK-NEXT: detail/owner_less_base.hpp
Expand All @@ -77,6 +76,7 @@
// CHECK-NEXT: properties/property_traits.hpp
// CHECK-NEXT: id.hpp
// CHECK-NEXT: range.hpp
// CHECK-NEXT: ur_api.h
// CHECK-NEXT: detail/accessor_iterator.hpp
// CHECK-NEXT: detail/generic_type_traits.hpp
// CHECK-NEXT: ext/oneapi/bfloat16.hpp
Expand Down
2 changes: 1 addition & 1 deletion sycl/test/include_deps/sycl_buffer.hpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
// CHECK-NEXT: detail/array.hpp
// CHECK-NEXT: exception.hpp
// CHECK-NEXT: detail/string.hpp
// CHECK-NEXT: ur_api.h
// CHECK-NEXT: detail/common.hpp
// CHECK-NEXT: stl_wrappers/cassert
// CHECK-NEXT: stl_wrappers/assert.h
Expand All @@ -38,4 +37,5 @@
// CHECK-NEXT: properties/property_traits.hpp
// CHECK-NEXT: id.hpp
// CHECK-NEXT: range.hpp
// CHECK-NEXT: ur_api.h
// CHECK-EMPTY:
2 changes: 1 addition & 1 deletion sycl/test/include_deps/sycl_detail_core.hpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
// CHECK-NEXT: detail/array.hpp
// CHECK-NEXT: exception.hpp
// CHECK-NEXT: detail/string.hpp
// CHECK-NEXT: ur_api.h
// CHECK-NEXT: detail/common.hpp
// CHECK-NEXT: detail/is_device_copyable.hpp
// CHECK-NEXT: detail/owner_less_base.hpp
Expand All @@ -78,6 +77,7 @@
// CHECK-NEXT: properties/property_traits.hpp
// CHECK-NEXT: id.hpp
// CHECK-NEXT: range.hpp
// CHECK-NEXT: ur_api.h
// CHECK-NEXT: detail/accessor_iterator.hpp
// CHECK-NEXT: detail/generic_type_traits.hpp
// CHECK-NEXT: ext/oneapi/bfloat16.hpp
Expand Down
1 change: 1 addition & 0 deletions sycl/unittests/helpers/UrMock.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <detail/adapter.hpp>
#include <detail/global_handler.hpp>
#include <detail/platform_impl.hpp>
#include <detail/ur.hpp>
#include <sycl/detail/common.hpp>
#include <sycl/device.hpp>
#include <sycl/device_selector.hpp>
Expand Down
Loading