Skip to content

Commit aff7fbb

Browse files
[SYCL][ABI-break] Remove deprecated interop_task (#10246)
1 parent 52edb37 commit aff7fbb

26 files changed

+63
-615
lines changed

sycl/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ set(SYCL_MAJOR_VERSION 7)
3636
set(SYCL_MINOR_VERSION 0)
3737
set(SYCL_PATCH_VERSION 0)
3838

39-
set(SYCL_DEV_ABI_VERSION 6)
39+
set(SYCL_DEV_ABI_VERSION 7)
4040
if (SYCL_ADD_DEV_VERSION_POSTFIX)
4141
set(SYCL_VERSION_POSTFIX "-${SYCL_DEV_ABI_VERSION}")
4242
endif()

sycl/include/sycl/backend.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ get_native<backend::ext_oneapi_cuda, device>(const device &Obj) {
204204
}
205205
#endif
206206

207-
// Native handle of an accessor should be accessed through interop_handler
208207
template <backend BackendName, typename DataT, int Dimensions,
209208
access::mode AccessMode, access::target AccessTarget,
210209
access::placeholder IsPlaceholder>

sycl/include/sycl/detail/backend_traits_cuda.hpp

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
#pragma once
1616

17-
#include <sycl/accessor.hpp>
1817
#include <sycl/context.hpp>
1918
#include <sycl/detail/backend_traits.hpp>
2019
#include <sycl/device.hpp>
@@ -41,9 +40,7 @@ namespace detail {
4140

4241
// TODO the interops for context, device, event, platform and program
4342
// may be removed after removing the deprecated 'get_native()' methods
44-
// from the corresponding classes. The interop<backend, queue> specialization
45-
// is also used in the get_queue() method of the deprecated class
46-
// interop_handler and also can be removed after API cleanup.
43+
// from the corresponding classes.
4744
template <> struct interop<backend::ext_oneapi_cuda, context> {
4845
using type = CUcontext;
4946
};
@@ -60,23 +57,6 @@ template <> struct interop<backend::ext_oneapi_cuda, queue> {
6057
using type = CUstream;
6158
};
6259

63-
// TODO the interops for accessor is used in the already deprecated class
64-
// interop_handler and can be removed after API cleanup.
65-
template <typename DataT, int Dimensions, access::mode AccessMode>
66-
struct interop<backend::ext_oneapi_cuda,
67-
accessor<DataT, Dimensions, AccessMode, access::target::device,
68-
access::placeholder::false_t>> {
69-
using type = CUdeviceptr;
70-
};
71-
72-
template <typename DataT, int Dimensions, access::mode AccessMode>
73-
struct interop<
74-
backend::ext_oneapi_cuda,
75-
accessor<DataT, Dimensions, AccessMode, access::target::constant_buffer,
76-
access::placeholder::false_t>> {
77-
using type = CUdeviceptr;
78-
};
79-
8060
template <typename DataT, int Dimensions, typename AllocatorT>
8161
struct BackendInput<backend::ext_oneapi_cuda,
8262
buffer<DataT, Dimensions, AllocatorT>> {

sycl/include/sycl/detail/backend_traits_hip.hpp

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
#pragma once
1616

17-
#include <sycl/accessor.hpp>
1817
#include <sycl/context.hpp>
1918
#include <sycl/detail/backend_traits.hpp>
2019
#include <sycl/device.hpp>
@@ -35,9 +34,7 @@ namespace detail {
3534

3635
// TODO the interops for context, device, event, platform and program
3736
// may be removed after removing the deprecated 'get_native()' methods
38-
// from the corresponding classes. The interop<backend, queue> specialization
39-
// is also used in the get_queue() method of the deprecated class
40-
// interop_handler and also can be removed after API cleanup.
37+
// from the corresponding classes.
4138
template <> struct interop<backend::ext_oneapi_hip, context> {
4239
using type = HIPcontext;
4340
};
@@ -54,23 +51,6 @@ template <> struct interop<backend::ext_oneapi_hip, queue> {
5451
using type = HIPstream;
5552
};
5653

57-
// TODO the interops for accessor is used in the already deprecated class
58-
// interop_handler and can be removed after API cleanup.
59-
template <typename DataT, int Dimensions, access::mode AccessMode>
60-
struct interop<backend::ext_oneapi_hip,
61-
accessor<DataT, Dimensions, AccessMode, access::target::device,
62-
access::placeholder::false_t>> {
63-
using type = HIPdeviceptr;
64-
};
65-
66-
template <typename DataT, int Dimensions, access::mode AccessMode>
67-
struct interop<
68-
backend::ext_oneapi_hip,
69-
accessor<DataT, Dimensions, AccessMode, access::target::constant_buffer,
70-
access::placeholder::false_t>> {
71-
using type = HIPdeviceptr;
72-
};
73-
7454
template <typename DataT, int Dimensions, typename AllocatorT>
7555
struct BackendInput<backend::ext_oneapi_hip,
7656
buffer<DataT, Dimensions, AllocatorT>> {

sycl/include/sycl/detail/backend_traits_level_zero.hpp

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
#pragma once
1717

18-
#include <sycl/accessor.hpp>
1918
#include <sycl/context.hpp>
2019
#include <sycl/detail/backend_traits.hpp>
2120
#include <sycl/detail/defines.hpp>
@@ -46,9 +45,7 @@ class device_impl;
4645

4746
// TODO the interops for context, device, event, platform and program
4847
// may be removed after removing the deprecated 'get_native()' methods
49-
// from the corresponding classes. The interop<backend, queue> specialization
50-
// is also used in the get_queue() method of the deprecated class
51-
// interop_handler and also can be removed after API cleanup.
48+
// from the corresponding classes.
5249
template <> struct interop<backend::ext_oneapi_level_zero, context> {
5350
using type = ze_context_handle_t;
5451
};
@@ -70,30 +67,6 @@ template <> struct interop<backend::ext_oneapi_level_zero, platform> {
7067
using type = ze_driver_handle_t;
7168
};
7269

73-
// TODO the interops for accessor is used in the already deprecated class
74-
// interop_handler and can be removed after API cleanup.
75-
template <typename DataT, int Dimensions, access::mode AccessMode>
76-
struct interop<backend::ext_oneapi_level_zero,
77-
accessor<DataT, Dimensions, AccessMode, access::target::device,
78-
access::placeholder::false_t>> {
79-
using type = char *;
80-
};
81-
82-
template <typename DataT, int Dimensions, access::mode AccessMode>
83-
struct interop<
84-
backend::ext_oneapi_level_zero,
85-
accessor<DataT, Dimensions, AccessMode, access::target::constant_buffer,
86-
access::placeholder::false_t>> {
87-
using type = char *;
88-
};
89-
90-
template <typename DataT, int Dimensions, access::mode AccessMode>
91-
struct interop<backend::ext_oneapi_level_zero,
92-
accessor<DataT, Dimensions, AccessMode, access::target::image,
93-
access::placeholder::false_t>> {
94-
using type = ze_image_handle_t;
95-
};
96-
9770
template <> struct interop<backend::ext_oneapi_level_zero, kernel> {
9871
using type = ze_kernel_handle_t;
9972
};

sycl/include/sycl/detail/backend_traits_opencl.hpp

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
#pragma once
1717

18-
#include <sycl/accessor.hpp>
1918
#include <sycl/context.hpp>
2019
#include <sycl/detail/backend_traits.hpp>
2120
#include <sycl/detail/defines.hpp>
@@ -31,9 +30,7 @@ namespace detail {
3130

3231
// TODO the interops for context, device, event, platform and program
3332
// may be removed after removing the deprecated 'get_native()' methods
34-
// from the corresponding classes. The interop<backend, queue> specialization
35-
// is also used in the get_queue() method of the deprecated class
36-
// interop_handler and also can be removed after API cleanup.
33+
// from the corresponding classes.
3734
template <> struct interop<backend::opencl, context> {
3835
using type = cl_context;
3936
};
@@ -50,29 +47,6 @@ template <> struct interop<backend::opencl, platform> {
5047
using type = cl_platform_id;
5148
};
5249

53-
// TODO the interops for accessor is used in the already deprecated class
54-
// interop_handler and can be removed after API cleanup.
55-
template <typename DataT, int Dimensions, access::mode AccessMode>
56-
struct interop<backend::opencl,
57-
accessor<DataT, Dimensions, AccessMode, access::target::device,
58-
access::placeholder::false_t>> {
59-
using type = cl_mem;
60-
};
61-
62-
template <typename DataT, int Dimensions, access::mode AccessMode>
63-
struct interop<backend::opencl, accessor<DataT, Dimensions, AccessMode,
64-
access::target::constant_buffer,
65-
access::placeholder::false_t>> {
66-
using type = cl_mem;
67-
};
68-
69-
template <typename DataT, int Dimensions, access::mode AccessMode>
70-
struct interop<backend::opencl,
71-
accessor<DataT, Dimensions, AccessMode, access::target::image,
72-
access::placeholder::false_t>> {
73-
using type = cl_mem;
74-
};
75-
7650
template <typename DataT, int Dimensions, typename AllocatorT>
7751
struct BackendInput<backend::opencl, buffer<DataT, Dimensions, AllocatorT>> {
7852
using type = cl_mem;

sycl/include/sycl/detail/cg.hpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#include <sycl/group.hpp>
2121
#include <sycl/id.hpp>
2222
#include <sycl/interop_handle.hpp>
23-
#include <sycl/interop_handler.hpp>
2423
#include <sycl/kernel.hpp>
2524
#include <sycl/nd_item.hpp>
2625
#include <sycl/range.hpp>
@@ -66,7 +65,6 @@ class CG {
6665
CopyUSM = 10,
6766
FillUSM = 11,
6867
PrefetchUSM = 12,
69-
CodeplayInteropTask = 13,
7068
CodeplayHostTask = 14,
7169
AdviseUSM = 15,
7270
Copy2DUSM = 16,
@@ -330,17 +328,6 @@ class CGAdviseUSM : public CG {
330328
pi_mem_advice getAdvice() { return MAdvice; }
331329
};
332330

333-
class CGInteropTask : public CG {
334-
public:
335-
std::unique_ptr<InteropTask> MInteropTask;
336-
337-
CGInteropTask(std::unique_ptr<InteropTask> InteropTask,
338-
CG::StorageInitHelper CGData, CGTYPE Type,
339-
detail::code_location loc = {})
340-
: CG(Type, std::move(CGData), std::move(loc)),
341-
MInteropTask(std::move(InteropTask)) {}
342-
};
343-
344331
class CGHostTask : public CG {
345332
public:
346333
std::unique_ptr<HostTask> MHostTask;

sycl/include/sycl/detail/cg_types.hpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include <sycl/group.hpp>
1414
#include <sycl/id.hpp>
1515
#include <sycl/interop_handle.hpp>
16-
#include <sycl/interop_handler.hpp>
1716
#include <sycl/kernel.hpp>
1817
#include <sycl/kernel_handler.hpp>
1918
#include <sycl/nd_item.hpp>
@@ -217,14 +216,6 @@ class HostKernelBase {
217216
virtual ~HostKernelBase() = default;
218217
};
219218

220-
class InteropTask {
221-
std::function<void(sycl::interop_handler)> MFunc;
222-
223-
public:
224-
InteropTask(std::function<void(sycl::interop_handler)> Func) : MFunc(Func) {}
225-
void call(sycl::interop_handler &h) { MFunc(h); }
226-
};
227-
228219
class HostTask {
229220
std::function<void()> MHostTask;
230221
std::function<void(interop_handle)> MInteropTask;

sycl/include/sycl/handler.hpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1901,17 +1901,6 @@ class __SYCL_EXPORT handler {
19011901
#endif
19021902
}
19031903

1904-
/// Invokes a lambda on the host. Dependencies are satisfied on the host.
1905-
///
1906-
/// \param Func is a lambda that is executed on the host
1907-
template <typename FuncT>
1908-
__SYCL_DEPRECATED("interop_task() is deprecated, use host_task() instead")
1909-
void interop_task(FuncT Func) {
1910-
1911-
MInteropTask.reset(new detail::InteropTask(std::move(Func)));
1912-
setType(detail::CG::CodeplayInteropTask);
1913-
}
1914-
19151904
/// Defines and invokes a SYCL kernel function for the specified range.
19161905
///
19171906
/// \param Kernel is a SYCL kernel that is executed on a SYCL device
@@ -2966,8 +2955,6 @@ class __SYCL_EXPORT handler {
29662955
std::unique_ptr<detail::HostKernelBase> MHostKernel;
29672956
/// Storage for lambda/function when using HostTask
29682957
std::unique_ptr<detail::HostTask> MHostTask;
2969-
// Storage for a lambda or function when using InteropTasks
2970-
std::unique_ptr<detail::InteropTask> MInteropTask;
29712958
/// The list of valid SYCL events that need to complete
29722959
/// before barrier command can be executed
29732960
std::vector<detail::EventImplPtr> MEventsWaitWithBarrier;

sycl/include/sycl/interop_handler.hpp

Lines changed: 0 additions & 79 deletions
This file was deleted.

sycl/source/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ set(SYCL_SOURCES
218218
"handler.cpp"
219219
"image.cpp"
220220
"interop_handle.cpp"
221-
"interop_handler.cpp"
222221
"kernel.cpp"
223222
"kernel_bundle.cpp"
224223
"platform.cpp"

sycl/source/detail/graph_impl.hpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,6 @@ class node_impl {
123123
case sycl::detail::CG::Kernel:
124124
case sycl::detail::CG::RunOnHostIntel:
125125
return createCGCopy<sycl::detail::CGExecKernel>();
126-
case sycl::detail::CG::CodeplayInteropTask:
127-
assert(false);
128-
break;
129-
// TODO: Uncomment this once we implement support for interop task so we can
130-
// test required changes to the CG class.
131-
132-
// return createCGCopy<sycl::detail::CGInteropTask>();
133126
case sycl::detail::CG::CopyAccToPtr:
134127
case sycl::detail::CG::CopyPtrToAcc:
135128
case sycl::detail::CG::CopyAccToAcc:

0 commit comments

Comments
 (0)