Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 2 additions & 0 deletions sycl/include/sycl/kernel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,10 @@ 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;

Expand Down
5 changes: 4 additions & 1 deletion sycl/include/sycl/kernel_bundle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ class __SYCL_EXPORT device_image_plain {

bool has_kernel(const kernel_id &KernelID, const device &Dev) const noexcept;

protected:
ur_native_handle_t getNative() const;

protected:
std::shared_ptr<device_image_impl> impl;

template <class Obj>
Expand Down Expand Up @@ -207,6 +207,9 @@ class device_image : public detail::device_image_plain,
template <class T>
friend T detail::createSyclObjFromImpl(
std::add_lvalue_reference_t<const decltype(T::impl)> ImplObj);

// To allow calling device_image_plain::getNative()
template <bundle_state> friend class kernel_bundle;
};

namespace detail {
Expand Down
13 changes: 13 additions & 0 deletions sycl/include/sycl/queue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3549,7 +3549,12 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
bool khr_empty() const;
#endif

#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
// TODO: to be made private in the next ABI-breaking window
__SYCL_DEPRECATED(
"This is a non-standard method, use sycl::get_native instead")
ur_native_handle_t getNative(int32_t &NativeHandleDesc) const;
#endif

std::optional<event> ext_oneapi_get_last_event() const {
return static_cast<std::optional<event>>(ext_oneapi_get_last_event_impl());
Expand All @@ -3558,6 +3563,10 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
void ext_oneapi_set_external_event(const event &external_event);

private:
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
ur_native_handle_t getNative(int32_t &NativeHandleDesc) const;
#endif

std::shared_ptr<detail::queue_impl> impl;
queue(std::shared_ptr<detail::queue_impl> impl) : impl(impl) {}

Expand All @@ -3575,6 +3584,10 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
friend auto get_native(const SyclObjectT &Obj)
-> backend_return_t<BackendName, SyclObjectT>;

template <backend BackendName>
friend auto get_native(const queue &Obj)
-> backend_return_t<BackendName, queue>;

#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
#if __SYCL_USE_FALLBACK_ASSERT
friend event detail::submitAssertCapture(const queue &, event &,
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,9 @@ 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(); }

#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
// 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.
Expand Down
Loading