Skip to content

Commit 536f641

Browse files
committed
[SYCL][ABI-break] Remove unused sycl::kernel methods
1 parent 237242d commit 536f641

File tree

10 files changed

+0
-475
lines changed

10 files changed

+0
-475
lines changed

sycl/doc/extensions/proposed/sycl_ext_oneapi_launch_queries.asciidoc

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -121,22 +121,6 @@ namespace sycl {
121121
class kernel {
122122
public:
123123
124-
// Only available if Param is max_work_item_sizes<1>
125-
template <typename Param>
126-
id<1> ext_oneapi_get_info(sycl::queue q) const;
127-
128-
// Only available if Param is max_work_item_sizes<2>
129-
template <typename Param>
130-
id<2> ext_oneapi_get_info(sycl::queue q) const;
131-
132-
// Only available if Param is max_work_item_sizes<3>
133-
template <typename Param>
134-
id<3> ext_oneapi_get_info(sycl::queue q) const;
135-
136-
// Only available if Param is max_work_group_size
137-
template <typename Param>
138-
size_t ext_oneapi_get_info(sycl::queue q) const;
139-
140124
// Only available if Param is max_num_work_groups
141125
template <typename Param>
142126
uint32_t ext_oneapi_get_info(sycl::queue q, sycl::range<1> r, size_t bytes = 0) const;
@@ -177,10 +161,6 @@ class kernel {
177161
178162
namespace ext::oneapi::experimental::info::kernel {
179163
180-
template <uint32_t Dimensions>
181-
struct max_work_item_sizes;
182-
183-
struct max_work_group_size;
184164
struct max_num_work_groups;
185165
186166
struct max_sub_group_size;
@@ -212,46 +192,6 @@ developers should check that the values returned by these queries is not
212192

213193
'''
214194

215-
[source,c++]
216-
----
217-
template <typename Param>
218-
id<1> ext_oneapi_get_info(sycl::queue q) const; // (1)
219-
220-
template <typename Param>
221-
id<2> ext_oneapi_get_info(sycl::queue q) const; // (2)
222-
223-
template <typename Param>
224-
id<3> ext_oneapi_get_info(sycl::queue q) const; // (3)
225-
----
226-
_Constraints (1)_: `Param` is `max_work_item_sizes<1>`.
227-
228-
_Constraints (2)_: `Param` is `max_work_item_sizes<2>`.
229-
230-
_Constraints (3)_: `Param` is `max_work_item_sizes<3>`.
231-
232-
_Returns_: The maximum number of work-items that are permitted in each
233-
dimension of a work-group, when the kernel is submitted to the specified queue,
234-
accounting for any kernel properties or features.
235-
If the kernel can be submitted to the specified queue without an error, the
236-
minimum value returned by this query is 1, otherwise it is 0.
237-
238-
'''
239-
240-
[source,c++]
241-
----
242-
template <typename Param>
243-
size_t ext_oneapi_get_info(sycl::queue q) const;
244-
----
245-
_Constraints_: `Param` is `max_work_group_size`.
246-
247-
_Returns_: The maximum number of work-items that are permitted in a work-group,
248-
when the kernel is submitted to the specified queue, accounting for any
249-
kernel properties or features.
250-
If the kernel can be submitted to the specified queue without an error, the
251-
minimum value returned by this query is 1, otherwise it is 0.
252-
253-
'''
254-
255195
[source,c++]
256196
----
257197
template <typename Param>
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
__SYCL_PARAM_TRAITS_SPEC(ext::oneapi::experimental, kernel_queue_specific, max_num_work_groups, size_t,)
2-
__SYCL_PARAM_TRAITS_SPEC(ext::oneapi::experimental, kernel_queue_specific, max_work_group_size, size_t,)
32
__SYCL_PARAM_TRAITS_SPEC(ext::oneapi::experimental, kernel_queue_specific, max_sub_group_size, uint32_t,)
43
__SYCL_PARAM_TRAITS_SPEC(ext::oneapi::experimental, kernel_queue_specific, num_sub_groups, uint32_t,)
5-
__SYCL_PARAM_TRAITS_TEMPLATE_PARTIAL_SPEC(ext::oneapi::experimental, kernel_queue_specific, max_work_item_sizes, sycl::id,)

sycl/include/sycl/kernel.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,6 @@ class __SYCL_EXPORT kernel : public detail::OwnerLessBase<kernel> {
243243

244244
ur_native_handle_t getNative() const;
245245

246-
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
247-
__SYCL_DEPRECATED("Use getNative() member function")
248-
ur_native_handle_t getNativeImpl() const;
249-
#endif
250-
251246
std::shared_ptr<detail::kernel_impl> impl;
252247

253248
template <class Obj>

sycl/source/detail/kernel_impl.hpp

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -115,18 +115,6 @@ class kernel_impl {
115115
typename Param::return_type get_info(const device &Device,
116116
const range<3> &WGSize) const;
117117

118-
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
119-
// This function is unused and should be removed in the next ABI breaking.
120-
121-
/// Query queue/launch-specific information from a kernel using the
122-
/// info::kernel_queue_specific descriptor for a specific Queue.
123-
///
124-
/// \param Queue is a valid SYCL queue.
125-
/// \return depends on information being queried.
126-
template <typename Param>
127-
typename Param::return_type ext_oneapi_get_info(queue Queue) const;
128-
#endif // __INTEL_PREVIEW_BREAKING_CHANGES
129-
130118
/// Query queue/launch-specific information from a kernel using the
131119
/// info::kernel_queue_specific descriptor for a specific Queue and values.
132120
/// max_num_work_groups is the only valid descriptor for this function.
@@ -457,62 +445,6 @@ inline typename ext::intel::info::kernel_device_specific::spill_memory_size::
457445
getAdapter());
458446
}
459447

460-
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
461-
// These functions are unused and should be removed in the next ABI breaking.
462-
463-
template <>
464-
inline typename syclex::info::kernel_queue_specific::max_work_group_size::
465-
return_type
466-
kernel_impl::ext_oneapi_get_info<
467-
syclex::info::kernel_queue_specific::max_work_group_size>(
468-
queue Queue) const {
469-
adapter_impl &Adapter = getAdapter();
470-
const auto DeviceNativeHandle =
471-
getSyclObjImpl(Queue.get_device())->getHandleRef();
472-
473-
size_t KernelWGSize = 0;
474-
Adapter.call<UrApiKind::urKernelGetGroupInfo>(
475-
MKernel, DeviceNativeHandle, UR_KERNEL_GROUP_INFO_WORK_GROUP_SIZE,
476-
sizeof(size_t), &KernelWGSize, nullptr);
477-
return KernelWGSize;
478-
}
479-
480-
template <int Dimensions>
481-
inline sycl::id<Dimensions>
482-
generate_id(const sycl::range<Dimensions> &DevMaxWorkItemSizes,
483-
const size_t DevWgSize) {
484-
sycl::id<Dimensions> Ret;
485-
for (int i = 0; i < Dimensions; i++) {
486-
// DevMaxWorkItemSizes values are inverted, see
487-
// sycl/source/detail/device_info.hpp:582
488-
Ret[i] = std::min(DevMaxWorkItemSizes[i], DevWgSize);
489-
}
490-
return Ret;
491-
}
492-
493-
#define ADD_TEMPLATE_METHOD_SPEC(Num) \
494-
template <> \
495-
inline typename syclex::info::kernel_queue_specific::max_work_item_sizes< \
496-
Num>::return_type \
497-
kernel_impl::ext_oneapi_get_info< \
498-
syclex::info::kernel_queue_specific::max_work_item_sizes<Num>>( \
499-
queue Queue) const { \
500-
const auto Dev = Queue.get_device(); \
501-
const auto DeviceWgSize = \
502-
get_info<info::kernel_device_specific::work_group_size>(Dev); \
503-
const auto DeviceMaxWorkItemSizes = \
504-
Dev.get_info<info::device::max_work_item_sizes<Num>>(); \
505-
return generate_id<Num>(DeviceMaxWorkItemSizes, DeviceWgSize); \
506-
} // namespace detail
507-
508-
ADD_TEMPLATE_METHOD_SPEC(1)
509-
ADD_TEMPLATE_METHOD_SPEC(2)
510-
ADD_TEMPLATE_METHOD_SPEC(3)
511-
512-
#undef ADD_TEMPLATE_METHOD_SPEC
513-
514-
#endif // __INTEL_PREVIEW_BREAKING_CHANGES
515-
516448
#define ADD_TEMPLATE_METHOD_SPEC(QueueSpec, Num, Kind, Reg) \
517449
template <> \
518450
inline typename syclex::info::kernel_queue_specific::QueueSpec::return_type \

sycl/source/kernel.cpp

Lines changed: 0 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,6 @@ template __SYCL_EXPORT uint32_t
106106
kernel::get_info<info::kernel_device_specific::max_sub_group_size>(
107107
const device &, const sycl::range<3> &) const;
108108

109-
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
110-
// This function is unused and should be removed in the next ABI-breaking
111-
// window.
112-
template <typename Param>
113-
typename detail::is_kernel_queue_specific_info_desc<Param>::return_type
114-
kernel::ext_oneapi_get_info(queue Queue) const {
115-
return impl->ext_oneapi_get_info<Param>(std::move(Queue));
116-
}
117-
#endif // __INTEL_PREVIEW_BREAKING_CHANGES
118-
119109
template <typename Param>
120110
typename detail::is_kernel_queue_specific_info_desc<Param>::return_type
121111
kernel::ext_oneapi_get_info(queue Queue, const range<1> &WorkGroupSize,
@@ -158,36 +148,6 @@ kernel::ext_oneapi_get_info(queue Queue, const range<3> &WorkGroupSize,
158148
DynamicLocalMemorySize);
159149
}
160150

161-
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
162-
// These functions are unused and should be removed in the next ABI-breaking
163-
// window.
164-
165-
template __SYCL_EXPORT typename ext::oneapi::experimental::info::
166-
kernel_queue_specific::max_work_group_size::return_type
167-
kernel::ext_oneapi_get_info<ext::oneapi::experimental::info::
168-
kernel_queue_specific::max_work_group_size>(
169-
queue Queue) const;
170-
171-
template __SYCL_EXPORT typename ext::oneapi::experimental::info::
172-
kernel_queue_specific::max_work_item_sizes<1>::return_type
173-
kernel::ext_oneapi_get_info<
174-
ext::oneapi::experimental::info::kernel_queue_specific::
175-
max_work_item_sizes<1>>(queue Queue) const;
176-
177-
template __SYCL_EXPORT typename ext::oneapi::experimental::info::
178-
kernel_queue_specific::max_work_item_sizes<2>::return_type
179-
kernel::ext_oneapi_get_info<
180-
ext::oneapi::experimental::info::kernel_queue_specific::
181-
max_work_item_sizes<2>>(queue Queue) const;
182-
183-
template __SYCL_EXPORT typename ext::oneapi::experimental::info::
184-
kernel_queue_specific::max_work_item_sizes<3>::return_type
185-
kernel::ext_oneapi_get_info<
186-
ext::oneapi::experimental::info::kernel_queue_specific::
187-
max_work_item_sizes<3>>(queue Queue) const;
188-
189-
#endif // __INTEL_PREVIEW_BREAKING_CHANGES
190-
191151
template __SYCL_EXPORT typename ext::oneapi::experimental::info::
192152
kernel_queue_specific::max_sub_group_size::return_type
193153
kernel::ext_oneapi_get_info<ext::oneapi::experimental::info::
@@ -245,55 +205,5 @@ kernel::kernel(std::shared_ptr<detail::kernel_impl> Impl) : impl(Impl) {}
245205

246206
ur_native_handle_t kernel::getNative() const { return impl->getNative(); }
247207

248-
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
249-
ur_native_handle_t kernel::getNativeImpl() const { return impl->getNative(); }
250-
251-
// The following query was deprecated since it doesn't include a way to specify
252-
// the invdividual dimensions of the work group. All of the contents of this
253-
// #ifndef block should be removed during the next ABI breaking window.
254-
namespace ext::oneapi::experimental::info::kernel_queue_specific {
255-
struct max_num_work_group_sync {
256-
using return_type = size_t;
257-
};
258-
} // namespace ext::oneapi::experimental::info::kernel_queue_specific
259-
template <>
260-
struct detail::is_kernel_queue_specific_info_desc<
261-
ext::oneapi::experimental::info::kernel_queue_specific::
262-
max_num_work_group_sync> : std::true_type {
263-
using return_type = ext::oneapi::experimental::info::kernel_queue_specific::
264-
max_num_work_group_sync::return_type;
265-
};
266-
template <>
267-
__SYCL2020_DEPRECATED(
268-
"The 'max_num_work_group_sync' query is deprecated. See "
269-
"'sycl_ext_oneapi_launch_queries' for the new 'max_num_work_groups' query.")
270-
__SYCL_EXPORT typename ext::oneapi::experimental::info::kernel_queue_specific::
271-
max_num_work_group_sync::return_type kernel::ext_oneapi_get_info<
272-
ext::oneapi::experimental::info::kernel_queue_specific::
273-
max_num_work_group_sync>(queue Queue, const range<3> &WorkGroupSize,
274-
size_t DynamicLocalMemorySize) const {
275-
return ext_oneapi_get_info<ext::oneapi::experimental::info::
276-
kernel_queue_specific::max_num_work_groups>(
277-
std::move(Queue), WorkGroupSize, DynamicLocalMemorySize);
278-
}
279-
template <>
280-
__SYCL2020_DEPRECATED(
281-
"The 'max_num_work_group_sync' query is deprecated. See "
282-
"'sycl_ext_oneapi_launch_queries' for the new 'max_num_work_groups' query.")
283-
__SYCL_EXPORT typename ext::oneapi::experimental::info::kernel_queue_specific::
284-
max_num_work_group_sync::return_type kernel::ext_oneapi_get_info<
285-
ext::oneapi::experimental::info::kernel_queue_specific::
286-
max_num_work_group_sync>(queue Queue) const {
287-
auto Device = Queue.get_device();
288-
const auto MaxWorkGroupSize =
289-
get_info<info::kernel_device_specific::work_group_size>(Device);
290-
const sycl::range<3> WorkGroupSize{MaxWorkGroupSize, 1, 1};
291-
return ext_oneapi_get_info<ext::oneapi::experimental::info::
292-
kernel_queue_specific::max_num_work_groups>(
293-
std::move(Queue), WorkGroupSize,
294-
/* DynamicLocalMemorySize */ 0);
295-
}
296-
#endif
297-
298208
} // namespace _V1
299209
} // namespace sycl

sycl/test-e2e/Experimental/launch_queries/max_work_group_size.cpp

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

0 commit comments

Comments
 (0)