Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -121,22 +121,6 @@ namespace sycl {
class kernel {
public:

// Only available if Param is max_work_item_sizes<1>
template <typename Param>
id<1> ext_oneapi_get_info(sycl::queue q) const;

// Only available if Param is max_work_item_sizes<2>
template <typename Param>
id<2> ext_oneapi_get_info(sycl::queue q) const;

// Only available if Param is max_work_item_sizes<3>
template <typename Param>
id<3> ext_oneapi_get_info(sycl::queue q) const;

// Only available if Param is max_work_group_size
template <typename Param>
size_t ext_oneapi_get_info(sycl::queue q) const;

// Only available if Param is max_num_work_groups
template <typename Param>
uint32_t ext_oneapi_get_info(sycl::queue q, sycl::range<1> r, size_t bytes = 0) const;
Expand Down Expand Up @@ -177,10 +161,6 @@ class kernel {

namespace ext::oneapi::experimental::info::kernel {

template <uint32_t Dimensions>
struct max_work_item_sizes;

struct max_work_group_size;
struct max_num_work_groups;

struct max_sub_group_size;
Expand Down Expand Up @@ -212,46 +192,6 @@ developers should check that the values returned by these queries is not

'''

[source,c++]
----
template <typename Param>
id<1> ext_oneapi_get_info(sycl::queue q) const; // (1)

template <typename Param>
id<2> ext_oneapi_get_info(sycl::queue q) const; // (2)

template <typename Param>
id<3> ext_oneapi_get_info(sycl::queue q) const; // (3)
----
_Constraints (1)_: `Param` is `max_work_item_sizes<1>`.

_Constraints (2)_: `Param` is `max_work_item_sizes<2>`.

_Constraints (3)_: `Param` is `max_work_item_sizes<3>`.

_Returns_: The maximum number of work-items that are permitted in each
dimension of a work-group, when the kernel is submitted to the specified queue,
accounting for any kernel properties or features.
If the kernel can be submitted to the specified queue without an error, the
minimum value returned by this query is 1, otherwise it is 0.

'''

[source,c++]
----
template <typename Param>
size_t ext_oneapi_get_info(sycl::queue q) const;
----
_Constraints_: `Param` is `max_work_group_size`.

_Returns_: The maximum number of work-items that are permitted in a work-group,
when the kernel is submitted to the specified queue, accounting for any
kernel properties or features.
If the kernel can be submitted to the specified queue without an error, the
minimum value returned by this query is 1, otherwise it is 0.

'''

[source,c++]
----
template <typename Param>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
__SYCL_PARAM_TRAITS_SPEC(ext::oneapi::experimental, kernel_queue_specific, max_num_work_groups, size_t,)
__SYCL_PARAM_TRAITS_SPEC(ext::oneapi::experimental, kernel_queue_specific, max_work_group_size, size_t,)
__SYCL_PARAM_TRAITS_SPEC(ext::oneapi::experimental, kernel_queue_specific, max_sub_group_size, uint32_t,)
__SYCL_PARAM_TRAITS_SPEC(ext::oneapi::experimental, kernel_queue_specific, num_sub_groups, uint32_t,)
__SYCL_PARAM_TRAITS_TEMPLATE_PARTIAL_SPEC(ext::oneapi::experimental, kernel_queue_specific, max_work_item_sizes, sycl::id,)
5 changes: 0 additions & 5 deletions sycl/include/sycl/kernel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,6 @@ class __SYCL_EXPORT kernel : public detail::OwnerLessBase<kernel> {

ur_native_handle_t getNative() const;

#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
__SYCL_DEPRECATED("Use getNative() member function")
ur_native_handle_t getNativeImpl() const;
#endif

std::shared_ptr<detail::kernel_impl> impl;

template <class Obj>
Expand Down
68 changes: 0 additions & 68 deletions sycl/source/detail/kernel_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,18 +115,6 @@ class kernel_impl {
typename Param::return_type get_info(const device &Device,
const range<3> &WGSize) const;

#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
// This function is unused and should be removed in the next ABI breaking.

/// Query queue/launch-specific information from a kernel using the
/// info::kernel_queue_specific descriptor for a specific Queue.
///
/// \param Queue is a valid SYCL queue.
/// \return depends on information being queried.
template <typename Param>
typename Param::return_type ext_oneapi_get_info(queue Queue) const;
#endif // __INTEL_PREVIEW_BREAKING_CHANGES

/// Query queue/launch-specific information from a kernel using the
/// info::kernel_queue_specific descriptor for a specific Queue and values.
/// max_num_work_groups is the only valid descriptor for this function.
Expand Down Expand Up @@ -457,62 +445,6 @@ inline typename ext::intel::info::kernel_device_specific::spill_memory_size::
getAdapter());
}

#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
// These functions are unused and should be removed in the next ABI breaking.

template <>
inline typename syclex::info::kernel_queue_specific::max_work_group_size::
return_type
kernel_impl::ext_oneapi_get_info<
syclex::info::kernel_queue_specific::max_work_group_size>(
queue Queue) const {
adapter_impl &Adapter = getAdapter();
const auto DeviceNativeHandle =
getSyclObjImpl(Queue.get_device())->getHandleRef();

size_t KernelWGSize = 0;
Adapter.call<UrApiKind::urKernelGetGroupInfo>(
MKernel, DeviceNativeHandle, UR_KERNEL_GROUP_INFO_WORK_GROUP_SIZE,
sizeof(size_t), &KernelWGSize, nullptr);
return KernelWGSize;
}

template <int Dimensions>
inline sycl::id<Dimensions>
generate_id(const sycl::range<Dimensions> &DevMaxWorkItemSizes,
const size_t DevWgSize) {
sycl::id<Dimensions> Ret;
for (int i = 0; i < Dimensions; i++) {
// DevMaxWorkItemSizes values are inverted, see
// sycl/source/detail/device_info.hpp:582
Ret[i] = std::min(DevMaxWorkItemSizes[i], DevWgSize);
}
return Ret;
}

#define ADD_TEMPLATE_METHOD_SPEC(Num) \
template <> \
inline typename syclex::info::kernel_queue_specific::max_work_item_sizes< \
Num>::return_type \
kernel_impl::ext_oneapi_get_info< \
syclex::info::kernel_queue_specific::max_work_item_sizes<Num>>( \
queue Queue) const { \
const auto Dev = Queue.get_device(); \
const auto DeviceWgSize = \
get_info<info::kernel_device_specific::work_group_size>(Dev); \
const auto DeviceMaxWorkItemSizes = \
Dev.get_info<info::device::max_work_item_sizes<Num>>(); \
return generate_id<Num>(DeviceMaxWorkItemSizes, DeviceWgSize); \
} // namespace detail

ADD_TEMPLATE_METHOD_SPEC(1)
ADD_TEMPLATE_METHOD_SPEC(2)
ADD_TEMPLATE_METHOD_SPEC(3)

#undef ADD_TEMPLATE_METHOD_SPEC

#endif // __INTEL_PREVIEW_BREAKING_CHANGES

#define ADD_TEMPLATE_METHOD_SPEC(QueueSpec, Num, Kind, Reg) \
template <> \
inline typename syclex::info::kernel_queue_specific::QueueSpec::return_type \
Expand Down
90 changes: 0 additions & 90 deletions sycl/source/kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,6 @@ template __SYCL_EXPORT uint32_t
kernel::get_info<info::kernel_device_specific::max_sub_group_size>(
const device &, const sycl::range<3> &) const;

#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
// This function is unused and should be removed in the next ABI-breaking
// window.
template <typename Param>
typename detail::is_kernel_queue_specific_info_desc<Param>::return_type
kernel::ext_oneapi_get_info(queue Queue) const {
return impl->ext_oneapi_get_info<Param>(std::move(Queue));
}
#endif // __INTEL_PREVIEW_BREAKING_CHANGES

template <typename Param>
typename detail::is_kernel_queue_specific_info_desc<Param>::return_type
kernel::ext_oneapi_get_info(queue Queue, const range<1> &WorkGroupSize,
Expand Down Expand Up @@ -158,36 +148,6 @@ kernel::ext_oneapi_get_info(queue Queue, const range<3> &WorkGroupSize,
DynamicLocalMemorySize);
}

#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
// These functions are unused and should be removed in the next ABI-breaking
// window.

template __SYCL_EXPORT typename ext::oneapi::experimental::info::
kernel_queue_specific::max_work_group_size::return_type
kernel::ext_oneapi_get_info<ext::oneapi::experimental::info::
kernel_queue_specific::max_work_group_size>(
queue Queue) const;

template __SYCL_EXPORT typename ext::oneapi::experimental::info::
kernel_queue_specific::max_work_item_sizes<1>::return_type
kernel::ext_oneapi_get_info<
ext::oneapi::experimental::info::kernel_queue_specific::
max_work_item_sizes<1>>(queue Queue) const;

template __SYCL_EXPORT typename ext::oneapi::experimental::info::
kernel_queue_specific::max_work_item_sizes<2>::return_type
kernel::ext_oneapi_get_info<
ext::oneapi::experimental::info::kernel_queue_specific::
max_work_item_sizes<2>>(queue Queue) const;

template __SYCL_EXPORT typename ext::oneapi::experimental::info::
kernel_queue_specific::max_work_item_sizes<3>::return_type
kernel::ext_oneapi_get_info<
ext::oneapi::experimental::info::kernel_queue_specific::
max_work_item_sizes<3>>(queue Queue) const;

#endif // __INTEL_PREVIEW_BREAKING_CHANGES

template __SYCL_EXPORT typename ext::oneapi::experimental::info::
kernel_queue_specific::max_sub_group_size::return_type
kernel::ext_oneapi_get_info<ext::oneapi::experimental::info::
Expand Down Expand Up @@ -245,55 +205,5 @@ kernel::kernel(std::shared_ptr<detail::kernel_impl> Impl) : impl(Impl) {}

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

#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
ur_native_handle_t kernel::getNativeImpl() const { return impl->getNative(); }

// The following query was deprecated since it doesn't include a way to specify
// the invdividual dimensions of the work group. All of the contents of this
// #ifndef block should be removed during the next ABI breaking window.
namespace ext::oneapi::experimental::info::kernel_queue_specific {
struct max_num_work_group_sync {
using return_type = size_t;
};
} // namespace ext::oneapi::experimental::info::kernel_queue_specific
template <>
struct detail::is_kernel_queue_specific_info_desc<
ext::oneapi::experimental::info::kernel_queue_specific::
max_num_work_group_sync> : std::true_type {
using return_type = ext::oneapi::experimental::info::kernel_queue_specific::
max_num_work_group_sync::return_type;
};
template <>
__SYCL2020_DEPRECATED(
"The 'max_num_work_group_sync' query is deprecated. See "
"'sycl_ext_oneapi_launch_queries' for the new 'max_num_work_groups' query.")
__SYCL_EXPORT typename ext::oneapi::experimental::info::kernel_queue_specific::
max_num_work_group_sync::return_type kernel::ext_oneapi_get_info<
ext::oneapi::experimental::info::kernel_queue_specific::
max_num_work_group_sync>(queue Queue, const range<3> &WorkGroupSize,
size_t DynamicLocalMemorySize) const {
return ext_oneapi_get_info<ext::oneapi::experimental::info::
kernel_queue_specific::max_num_work_groups>(
std::move(Queue), WorkGroupSize, DynamicLocalMemorySize);
}
template <>
__SYCL2020_DEPRECATED(
"The 'max_num_work_group_sync' query is deprecated. See "
"'sycl_ext_oneapi_launch_queries' for the new 'max_num_work_groups' query.")
__SYCL_EXPORT typename ext::oneapi::experimental::info::kernel_queue_specific::
max_num_work_group_sync::return_type kernel::ext_oneapi_get_info<
ext::oneapi::experimental::info::kernel_queue_specific::
max_num_work_group_sync>(queue Queue) const {
auto Device = Queue.get_device();
const auto MaxWorkGroupSize =
get_info<info::kernel_device_specific::work_group_size>(Device);
const sycl::range<3> WorkGroupSize{MaxWorkGroupSize, 1, 1};
return ext_oneapi_get_info<ext::oneapi::experimental::info::
kernel_queue_specific::max_num_work_groups>(
std::move(Queue), WorkGroupSize,
/* DynamicLocalMemorySize */ 0);
}
#endif

} // namespace _V1
} // namespace sycl

This file was deleted.

Loading
Loading