Skip to content

[SYCL][NFC] Cleanup includes of context.hpp #16265

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

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
4 changes: 3 additions & 1 deletion sycl/include/sycl/detail/backend_traits_cuda.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

#pragma once

#include <sycl/context.hpp>
#include <sycl/detail/backend_traits.hpp>
#include <sycl/device.hpp>
#include <sycl/event.hpp>
Expand All @@ -35,6 +34,9 @@ typedef unsigned int CUdeviceptr;

namespace sycl {
inline namespace _V1 {

class context;

namespace detail {

// TODO the interops for context, device, event, platform and program
Expand Down
4 changes: 3 additions & 1 deletion sycl/include/sycl/detail/backend_traits_hip.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

#pragma once

#include <sycl/context.hpp>
#include <sycl/detail/backend_traits.hpp>
#include <sycl/device.hpp>
#include <sycl/event.hpp>
Expand All @@ -29,6 +28,9 @@ typedef void *HIPdeviceptr;

namespace sycl {
inline namespace _V1 {

class context;

namespace detail {

// TODO the interops for context, device, event, platform and program
Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/detail/backend_traits_level_zero.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#pragma once

#include <sycl/backend_types.hpp> // for backend
#include <sycl/context.hpp> // for context
#include <sycl/detail/backend_traits.hpp> // for BackendI...
#include <sycl/device.hpp> // for device
#include <sycl/event.hpp> // for event
Expand Down Expand Up @@ -45,6 +44,7 @@ typedef struct _ze_module_handle_t *ze_module_handle_t;
namespace sycl {
inline namespace _V1 {
class queue;
class context;

namespace detail {

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

#include <sycl/backend_types.hpp> // for backend
#include <sycl/context.hpp> // for context
#include <sycl/detail/backend_traits.hpp> // for BackendInput, BackendReturn
#include <sycl/detail/cl.h> // for _cl_event, cl_event, cl_de...
#include <sycl/detail/ur.hpp> // for assertion and ur handles
Expand All @@ -35,6 +34,7 @@ template <bundle_state State> class kernel_bundle;
class queue;
template <typename T, int Dimensions, typename AllocatorT, typename Enable>
class buffer;
class context;

namespace detail {

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

#include <sycl/access/access.hpp>
#include <sycl/accessor.hpp>
#include <sycl/context.hpp>
#include <sycl/detail/cg_types.hpp>
#include <sycl/detail/cl.h>
#include <sycl/detail/common.hpp>
Expand Down Expand Up @@ -170,6 +169,7 @@ class kernel_impl;
class queue_impl;
class stream_impl;
class event_impl;
class context_impl;
template <typename DataT, int Dimensions, access::mode AccessMode,
access::target AccessTarget, access::placeholder IsPlaceholder>
class image_accessor;
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 @@ -12,7 +12,6 @@
#include <sycl/aliases.hpp> // for cl_float, cl_half
#include <sycl/backend_types.hpp> // for backend, backe...
#include <sycl/buffer.hpp> // for range
#include <sycl/context.hpp> // for context
#include <sycl/detail/aligned_allocator.hpp> // for aligned_allocator
#include <sycl/detail/backend_traits.hpp> // for InteropFeature...
#include <sycl/detail/common.hpp> // for convertToArrayOfN
Expand Down Expand Up @@ -43,6 +42,7 @@ inline namespace _V1 {

// forward declarations
class handler;
class context;

template <int D, typename A> class image;

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 @@ -9,7 +9,6 @@
#pragma once

#include <sycl/backend_types.hpp> // for backend, backend_return_t
#include <sycl/context.hpp> // for context
#include <sycl/detail/export.hpp> // for __SYCL_EXPORT
#include <sycl/detail/kernel_desc.hpp> // for get_spec_constant_symboli...
#include <sycl/detail/owner_less_base.hpp> // for OwnerLessBase
Expand Down Expand Up @@ -46,6 +45,7 @@ template <backend Backend> class backend_traits;
template <backend Backend, bundle_state State>
auto get_native(const kernel_bundle<State> &Obj)
-> backend_return_t<Backend, kernel_bundle<State>>;
class context;

namespace detail {
class kernel_id_impl;
Expand Down
1 change: 0 additions & 1 deletion sycl/include/sycl/queue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <sycl/async_handler.hpp> // for async_handler
#include <sycl/backend_types.hpp> // for backend, backe...
#include <sycl/buffer.hpp> // for buffer
#include <sycl/context.hpp> // for context
#include <sycl/detail/assert_happened.hpp> // for AssertHappened
#include <sycl/detail/cg_types.hpp> // for check_fn_signa...
#include <sycl/detail/common.hpp> // for code_location
Expand Down
4 changes: 3 additions & 1 deletion sycl/include/sycl/usm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#pragma once

#include <sycl/builtins.hpp>
#include <sycl/context.hpp>
#include <sycl/detail/common.hpp>
#include <sycl/detail/export.hpp>
#include <sycl/device.hpp>
Expand All @@ -21,6 +20,9 @@

namespace sycl {
inline namespace _V1 {

class context;

///
// Explicit USM
///
Expand Down
1 change: 1 addition & 0 deletions sycl/source/platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <detail/global_handler.hpp>
#include <detail/platform_impl.hpp>
#include <detail/ur.hpp>
#include <sycl/context.hpp>
#include <sycl/device.hpp>
#include <sycl/device_selector.hpp>
#include <sycl/image.hpp>
Expand Down
Loading