Skip to content

Commit 237242d

Browse files
[SYCL][ABI-break] Remove deprecated graph APIs and cleanup ABI entry points (#20767)
Co-authored-by: Steffen Larsen <[email protected]>
1 parent 0644bf3 commit 237242d

File tree

52 files changed

+79
-198
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+79
-198
lines changed

sycl/include/sycl/ext/oneapi/experimental/graph/dynamic.hpp

Lines changed: 4 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -74,25 +74,12 @@ class __SYCL_EXPORT dynamic_command_group {
7474
namespace detail {
7575
class __SYCL_EXPORT dynamic_parameter_base {
7676
public:
77-
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
7877
dynamic_parameter_base(size_t ParamSize, const void *Data);
7978
dynamic_parameter_base();
80-
#else
81-
dynamic_parameter_base() = default;
82-
#endif
8379

8480
dynamic_parameter_base(
8581
const std::shared_ptr<detail::dynamic_parameter_impl> &impl);
8682

87-
dynamic_parameter_base(const sycl::ext::oneapi::experimental::command_graph<
88-
graph_state::modifiable>
89-
Graph);
90-
91-
dynamic_parameter_base(const sycl::ext::oneapi::experimental::command_graph<
92-
graph_state::modifiable>
93-
Graph,
94-
size_t ParamSize, const void *Data);
95-
9683
/// Common Reference Semantics
9784
friend bool operator==(const dynamic_parameter_base &LHS,
9885
const dynamic_parameter_base &RHS) {
@@ -126,13 +113,7 @@ class __SYCL_EXPORT dynamic_work_group_memory_base
126113
public:
127114
dynamic_work_group_memory_base() = default;
128115

129-
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
130116
dynamic_work_group_memory_base(size_t BufferSizeInBytes);
131-
#endif
132-
// TODO: Remove in next ABI breaking window
133-
dynamic_work_group_memory_base(
134-
const experimental::command_graph<graph_state::modifiable> Graph,
135-
size_t BufferSizeInBytes);
136117

137118
protected:
138119
void updateWorkGroupMem(size_t NewBufferSizeInBytes);
@@ -171,7 +152,6 @@ class __SYCL_SPECIAL_CLASS __SYCL_TYPE(dynamic_work_group_memory)
171152
// closed.
172153
dynamic_work_group_memory() = default;
173154

174-
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
175155
#ifndef __SYCL_DEVICE_ONLY__
176156
/// Constructs a new dynamic_work_group_memory object.
177157
/// @param Num Number of elements in the unbounded array DataT.
@@ -181,30 +161,6 @@ class __SYCL_SPECIAL_CLASS __SYCL_TYPE(dynamic_work_group_memory)
181161
#else
182162
dynamic_work_group_memory(size_t /*Num*/) {}
183163
#endif
184-
#endif
185-
186-
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
187-
__SYCL_DEPRECATED("Dynamic_work_group_memory constructors taking a graph "
188-
"object have been deprecated "
189-
"and will be removed in the next ABI breaking window.")
190-
#endif
191-
192-
#ifndef __SYCL_DEVICE_ONLY__
193-
/// Constructs a new dynamic_work_group_memory object.
194-
/// @param Graph The graph associated with this object.
195-
/// @param Num Number of elements in the unbounded array DataT.
196-
dynamic_work_group_memory(
197-
const experimental::command_graph<graph_state::modifiable> &Graph,
198-
size_t Num)
199-
: detail::dynamic_work_group_memory_base(
200-
Graph, Num * sizeof(std::remove_extent_t<DataT>)) {}
201-
202-
#else
203-
dynamic_work_group_memory(
204-
const experimental::command_graph<graph_state::modifiable> &
205-
/* Graph */,
206-
size_t /* Num */) {}
207-
#endif
208164

209165
work_group_memory<DataT, PropertyListT> get() const {
210166
#ifndef __SYCL_DEVICE_ONLY__
@@ -259,21 +215,16 @@ class __SYCL_SPECIAL_CLASS __SYCL_TYPE(dynamic_local_accessor)
259215

260216
#ifndef __SYCL_DEVICE_ONLY__
261217
/// Constructs a new dynamic_local_accessor object.
262-
/// @param Graph The graph associated with this object.
263218
/// @param AllocationSize The size of the local accessor.
264219
/// @param PropList List of properties for the underlying accessor.
265-
dynamic_local_accessor(
266-
const experimental::command_graph<graph_state::modifiable> & /* Graph */,
267-
range<Dimensions> AllocationSize, const property_list &PropList = {})
220+
dynamic_local_accessor(range<Dimensions> AllocationSize,
221+
const property_list &PropList = {})
268222
: detail::dynamic_local_accessor_base(
269223
detail::convertToArrayOfN<3, 1>(AllocationSize), Dimensions,
270224
sizeof(DataT), PropList) {}
271225
#else
272-
dynamic_local_accessor(
273-
const experimental::command_graph<graph_state::modifiable> &
274-
/* Graph */,
275-
range<Dimensions> /* AllocationSize */,
276-
const property_list & /*PropList */ = {}) {}
226+
dynamic_local_accessor(range<Dimensions> /* AllocationSize */,
227+
const property_list & /*PropList */ = {}) {}
277228
#endif
278229

279230
local_accessor<DataT, Dimensions> get() const {
@@ -320,26 +271,11 @@ class dynamic_parameter : public detail::dynamic_parameter_base {
320271
: sycl::detail::kernel_param_kind_t::kind_std_layout;
321272

322273
public:
323-
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
324274
/// Constructs a new dynamic parameter.
325275
/// @param Graph The graph associated with this parameter.
326276
/// @param Param A reference value for this parameter used for CTAD.
327277
dynamic_parameter(const ValueT &Param)
328278
: detail::dynamic_parameter_base(sizeof(ValueT), &Param) {}
329-
#endif
330-
331-
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
332-
__SYCL_DEPRECATED("Dynamic_parameter constructors taking a graph object have "
333-
"been deprecated "
334-
"and will be removed in the next ABI breaking window.")
335-
#endif
336-
/// Constructs a new dynamic parameter.
337-
/// @param Graph The graph associated with this parameter.
338-
/// @param Param A reference value for this parameter used for CTAD.
339-
dynamic_parameter(
340-
const experimental::command_graph<graph_state::modifiable> &Graph,
341-
const ValueT &Param)
342-
: detail::dynamic_parameter_base(Graph, sizeof(ValueT), &Param) {}
343279

344280
/// Updates this dynamic parameter and all registered nodes with a new value.
345281
/// @param NewValue The new value for the parameter.

sycl/include/sycl/ext/oneapi/experimental/graph/modifiable_graph.hpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,9 @@ class __SYCL_EXPORT modifiable_command_graph
147147
/// @param path The path to write the DOT file to.
148148
/// @param verbose If true, print additional information about the nodes such
149149
/// as kernel args or memory access where applicable.
150-
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
151150
void print_graph(const std::string path, bool verbose = false) const {
152151
print_graph(sycl::detail::string_view{path}, verbose);
153152
}
154-
#else
155-
void print_graph(const std::string path, bool verbose = false) const;
156-
#endif
157153

158154
/// Get a list of all nodes contained in this graph.
159155
std::vector<node> get_nodes() const;
@@ -216,23 +212,6 @@ class __SYCL_EXPORT modifiable_command_graph
216212
static void checkNodePropertiesAndThrow(const property_list &Properties);
217213
};
218214

219-
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
220-
#ifdef __SYCL_GRAPH_IMPL_CPP
221-
// Magic combination found by trial and error:
222-
__SYCL_EXPORT
223-
#if _WIN32
224-
inline
225-
#endif
226-
#else
227-
inline
228-
#endif
229-
void
230-
modifiable_command_graph::print_graph(const std::string path,
231-
bool verbose) const {
232-
print_graph(sycl::detail::string_view{path}, verbose);
233-
}
234-
#endif
235-
236215
} // namespace detail
237216
} // namespace experimental
238217
} // namespace oneapi

sycl/source/detail/graph/dynamic_impl.cpp

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,15 @@ namespace oneapi {
2626
namespace experimental {
2727
namespace detail {
2828

29-
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
3029
dynamic_parameter_base::dynamic_parameter_base()
3130
: impl(std::make_shared<dynamic_parameter_impl>()) {}
32-
#endif
3331

3432
dynamic_parameter_base::dynamic_parameter_base(
3533
const std::shared_ptr<detail::dynamic_parameter_impl> &impl)
3634
: impl(impl) {}
3735

38-
dynamic_parameter_base::dynamic_parameter_base(
39-
const command_graph<graph_state::modifiable>)
40-
: impl(std::make_shared<dynamic_parameter_impl>()) {}
41-
dynamic_parameter_base::dynamic_parameter_base(
42-
const command_graph<graph_state::modifiable>, size_t ParamSize,
43-
const void *Data)
36+
dynamic_parameter_base::dynamic_parameter_base(size_t ParamSize,
37+
const void *Data)
4438
: impl(std::make_shared<dynamic_parameter_impl>(ParamSize, Data)) {}
4539

4640
void dynamic_parameter_base::updateValue(const void *NewValue, size_t Size) {
@@ -57,16 +51,7 @@ void dynamic_parameter_base::updateAccessor(
5751
impl->updateAccessor(Acc);
5852
}
5953

60-
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
61-
dynamic_work_group_memory_base::dynamic_work_group_memory_base(
62-
size_t BufferSizeInBytes)
63-
: dynamic_parameter_base(
64-
std::make_shared<dynamic_work_group_memory_impl>(BufferSizeInBytes)) {
65-
}
66-
#endif
67-
6854
dynamic_work_group_memory_base::dynamic_work_group_memory_base(
69-
const experimental::command_graph<graph_state::modifiable> /* Graph */,
7055
size_t BufferSizeInBytes)
7156
: dynamic_parameter_base(
7257
std::make_shared<dynamic_work_group_memory_impl>(BufferSizeInBytes)) {

sycl/source/detail/graph/graph_impl.hpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -268,13 +268,6 @@ class graph_impl : public std::enable_shared_from_this<graph_impl> {
268268
/// @return Context associated with graph.
269269
sycl::context getContext() const { return MContext; }
270270

271-
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
272-
/// Query for the context impl tied to this graph.
273-
/// @return shared_ptr ref for the context impl associated with graph.
274-
const std::shared_ptr<sycl::detail::context_impl> &getContextImplPtr() const {
275-
return sycl::detail::getSyclObjImpl(MContext);
276-
}
277-
#endif
278271
sycl::detail::context_impl &getContextImpl() const {
279272
return *sycl::detail::getSyclObjImpl(MContext);
280273
}

sycl/test-e2e/Graph/Update/FreeFunctionKernels/dyn_work_group_memory_basic.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ int main() {
1919
std::vector<int> HostDataA(Size);
2020

2121
exp_ext::command_graph Graph{Ctxt, Queue.get_device()};
22-
exp_ext::dynamic_work_group_memory<int[]> DynLocalMem{Graph, LocalSize};
22+
exp_ext::dynamic_work_group_memory<int[]> DynLocalMem{LocalSize};
2323

2424
Queue.memset(PtrA, 0, Size * sizeof(int)).wait();
2525

sycl/test-e2e/Graph/Update/FreeFunctionKernels/update_before_finalize.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ int main() {
2323
Queue.memset(PtrA, 0, Size * sizeof(int)).wait();
2424
Queue.memset(PtrB, 0, Size * sizeof(int)).wait();
2525

26-
exp_ext::dynamic_parameter InputParam(Graph, PtrA);
26+
exp_ext::dynamic_parameter InputParam(PtrA);
2727

2828
kernel_bundle Bundle = get_kernel_bundle<bundle_state::executable>(Ctxt);
2929
kernel_id Kernel_id = exp_ext::get_kernel_id<ff_0>();

sycl/test-e2e/Graph/Update/FreeFunctionKernels/update_with_indices_multiple_exec_graphs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ int main() {
2424
Queue.memset(PtrA, 0, Size * sizeof(int)).wait();
2525
Queue.memset(PtrB, 0, Size * sizeof(int)).wait();
2626

27-
exp_ext::dynamic_parameter InputParam(Graph, PtrA);
27+
exp_ext::dynamic_parameter InputParam(PtrA);
2828

2929
kernel_bundle Bundle = get_kernel_bundle<bundle_state::executable>(Ctxt);
3030
kernel_id Kernel_id = exp_ext::get_kernel_id<ff_1>();

sycl/test-e2e/Graph/Update/FreeFunctionKernels/update_with_indices_ordering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ int main() {
3333
Queue.memset(PtrA, 0, N * sizeof(int)).wait();
3434
Queue.memset(PtrB, 0, N * sizeof(int)).wait();
3535

36-
exp_ext::dynamic_parameter InputParam(Graph, PtrA);
36+
exp_ext::dynamic_parameter InputParam(PtrA);
3737

3838
kernel_bundle Bundle = get_kernel_bundle<bundle_state::executable>(Ctxt);
3939
kernel_id Kernel_id = exp_ext::get_kernel_id<ff_2>();

sycl/test-e2e/Graph/Update/FreeFunctionKernels/update_with_indices_ptr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ int main() {
2323
Queue.memset(PtrA, 0, Size * sizeof(int)).wait();
2424
Queue.memset(PtrB, 0, Size * sizeof(int)).wait();
2525

26-
exp_ext::dynamic_parameter InputParam(Graph, PtrA);
26+
exp_ext::dynamic_parameter InputParam(PtrA);
2727

2828
kernel_bundle Bundle = get_kernel_bundle<bundle_state::executable>(Ctxt);
2929
kernel_id Kernel_id = exp_ext::get_kernel_id<ff_0>();

sycl/test-e2e/Graph/Update/FreeFunctionKernels/update_with_indices_ptr_3D.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ int main() {
2828
Queue.memset(PtrA, 0, N * sizeof(int)).wait();
2929
Queue.memset(PtrB, 0, N * sizeof(int)).wait();
3030

31-
exp_ext::dynamic_parameter DynParam(Graph, PtrA);
31+
exp_ext::dynamic_parameter DynParam(PtrA);
3232

3333
nd_range<3> NDRange{GlobalWorkSize, LocalWorkSize};
3434

0 commit comments

Comments
 (0)