From 4cb0518de717b1a8d45d9ea8b94a077062b9d331 Mon Sep 17 00:00:00 2001 From: Kseniya Tikhomirova Date: Fri, 5 Jul 2024 07:17:33 +0200 Subject: [PATCH] [ABI Break][SYCL] Remove deprecated is_host() for SYCL objects and related handler ctor param (#14258) Host device support is deprecated long time ago. Removes: 1) is_host() API deprecated long time ago, SYCL2020 deprecations group. 2) remove isHost ctor param and corresponding field from handler class. Handler instance is always created by RT. User deals with handler instance by creating kernel lambda which accepts handler as parameter and then calls methods of handler. --------- Signed-off-by: Tikhomirova, Kseniya --- sycl/include/sycl/context.hpp | 7 -- .../sycl/detail/image_accessor_util.hpp | 6 +- sycl/include/sycl/device.hpp | 13 +- sycl/include/sycl/device_selector.hpp | 12 -- sycl/include/sycl/event.hpp | 7 -- sycl/include/sycl/group_barrier.hpp | 2 +- sycl/include/sycl/handler.hpp | 115 +----------------- sycl/include/sycl/kernel.hpp | 10 +- sycl/include/sycl/kernel_handler.hpp | 8 +- sycl/include/sycl/platform.hpp | 7 -- sycl/include/sycl/queue.hpp | 5 - sycl/include/sycl/reduction.hpp | 2 +- sycl/include/sycl/stream.hpp | 5 - sycl/source/context.cpp | 5 - sycl/source/detail/platform_impl.cpp | 3 - sycl/source/detail/queue_impl.cpp | 2 +- sycl/source/detail/stream_impl.cpp | 6 - sycl/source/detail/stream_impl.hpp | 6 - sycl/source/device.cpp | 5 - sycl/source/device_selector.cpp | 8 -- sycl/source/event.cpp | 5 - sycl/source/handler.cpp | 17 +-- sycl/source/kernel.cpp | 5 - sycl/source/platform.cpp | 5 - sycl/source/queue.cpp | 5 - sycl/test/abi/layout_handler.cpp | 33 +++-- sycl/test/abi/sycl_symbols_linux.dump | 11 -- sycl/test/abi/sycl_symbols_windows.dump | 18 --- sycl/test/abi/symbol_size_alignment.cpp | 4 +- sycl/test/invoke_simd/invoke_simd.cpp | 7 +- sycl/test/warnings/sycl_2020_deprecations.cpp | 14 --- .../arg_mask/EliminatedArgMask.cpp | 2 +- .../scheduler/AccessorDefaultCtor.cpp | 2 +- .../scheduler/EnqueueWithDependsOnDeps.cpp | 2 +- sycl/unittests/scheduler/GraphCleanup.cpp | 4 +- sycl/unittests/scheduler/KernelFusion.cpp | 2 +- .../scheduler/SchedulerTestUtils.hpp | 8 +- .../scheduler/StreamInitDependencyOnHost.cpp | 4 +- 38 files changed, 48 insertions(+), 334 deletions(-) diff --git a/sycl/include/sycl/context.hpp b/sycl/include/sycl/context.hpp index 89b054a2193d3..2b874cbfca9d4 100644 --- a/sycl/include/sycl/context.hpp +++ b/sycl/include/sycl/context.hpp @@ -215,13 +215,6 @@ class __SYCL_EXPORT context : public detail::OwnerLessBase { cl_context get() const; #endif - /// Checks if this context is a SYCL host context. - /// - /// \return true if this context is a SYCL host context. - __SYCL2020_DEPRECATED( - "is_host() is deprecated as the host device is no longer supported.") - bool is_host() const; - /// Returns the backend associated with this context. /// /// \return the backend associated with this context. diff --git a/sycl/include/sycl/detail/image_accessor_util.hpp b/sycl/include/sycl/detail/image_accessor_util.hpp index 1de4e5808a7da..03b3ce762b87b 100644 --- a/sycl/include/sycl/detail/image_accessor_util.hpp +++ b/sycl/include/sycl/detail/image_accessor_util.hpp @@ -5,8 +5,8 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// This file includes some utilities that are used by image accessors on host -// device +// This file includes some utilities that are used by image accessors in host +// code // #pragma once @@ -685,7 +685,7 @@ convertWriteData(const half4 WriteData, } // imageWriteHostImpl method is called by the write API in image accessors for -// host device. Steps: +// host code. Steps: // 1. Calculates the offset from the base ptr of the image where the pixel // denoted by Coord is located.(getImageOffset method.) // 2. Converts the ptr to the appropriate datatype based on diff --git a/sycl/include/sycl/device.hpp b/sycl/include/sycl/device.hpp index da5686a0818d2..80bf15bd10583 100644 --- a/sycl/include/sycl/device.hpp +++ b/sycl/include/sycl/device.hpp @@ -119,13 +119,6 @@ class __SYCL_EXPORT device : public detail::OwnerLessBase { cl_device_id get() const; #endif - /// Check if device is a host device - /// - /// \return true if SYCL device is a host device - __SYCL2020_DEPRECATED( - "is_host() is deprecated as the host device is no longer supported.") - bool is_host() const; - /// Check if device is a CPU device /// /// \return true if SYCL device is a CPU device @@ -145,8 +138,7 @@ class __SYCL_EXPORT device : public detail::OwnerLessBase { /// /// If this SYCL device is an OpenCL device then the SYCL platform /// must encapsulate the OpenCL cl_plaform_id associated with the - /// underlying OpenCL cl_device_id of this SYCL device. If this SYCL device - /// is a host device then the SYCL platform must be a host platform. + /// underlying OpenCL cl_device_id of this SYCL device. /// The value returned must be equal to that returned by /// get_info(). /// @@ -240,9 +232,6 @@ class __SYCL_EXPORT device : public detail::OwnerLessBase { /// Query available SYCL devices /// - /// The returned std::vector must contain a single SYCL device - /// that is a host device, permitted by the deviceType parameter - /// /// \param deviceType is one of the values described in A.3 of SYCL Spec /// \return a std::vector containing all SYCL devices available in the system /// of the device type specified diff --git a/sycl/include/sycl/device_selector.hpp b/sycl/include/sycl/device_selector.hpp index 49cb513b4a4fa..911a8e321b6d3 100644 --- a/sycl/include/sycl/device_selector.hpp +++ b/sycl/include/sycl/device_selector.hpp @@ -94,18 +94,6 @@ __SYCL2020_DEPRECATED("Use the callable sycl::accelerator_selector_v instead.") int operator()(const device &dev) const override; }; -/// Selects SYCL host device. -/// -/// \sa device -/// -/// \ingroup sycl_api_dev_sel -class __SYCL_EXPORT -__SYCL2020_DEPRECATED("Host device is no longer supported.") host_selector - : public device_selector { -public: - int operator()(const device &dev) const override; -}; - // -------------- SYCL 2020 // SYCL 2020 standalone selectors diff --git a/sycl/include/sycl/event.hpp b/sycl/include/sycl/event.hpp index 8e966b5e3302e..c4ed0c045aa9e 100644 --- a/sycl/include/sycl/event.hpp +++ b/sycl/include/sycl/event.hpp @@ -70,13 +70,6 @@ class __SYCL_EXPORT event : public detail::OwnerLessBase { bool operator!=(const event &rhs) const; - /// Checks if this event is a SYCL host event. - /// - /// \return true if this event is a SYCL host event. - __SYCL2020_DEPRECATED( - "is_host() is deprecated as the host device is no longer supported.") - bool is_host() const; - /// Return the list of events that this event waits for. /// /// Only direct dependencies are returned. Already completed events are not diff --git a/sycl/include/sycl/group_barrier.hpp b/sycl/include/sycl/group_barrier.hpp index 1f34d5603889b..8e400993d611d 100644 --- a/sycl/include/sycl/group_barrier.hpp +++ b/sycl/include/sycl/group_barrier.hpp @@ -31,7 +31,7 @@ group_barrier(Group G, memory_scope FenceScope = Group::fence_scope) { (void)G; (void)FenceScope; throw sycl::exception(make_error_code(errc::feature_not_supported), - "Barriers are not supported on host device"); + "Barriers are not supported on host"); #endif } diff --git a/sycl/include/sycl/handler.hpp b/sycl/include/sycl/handler.hpp index b43d3dcd78e5a..7f5a1153f4fd0 100644 --- a/sycl/include/sycl/handler.hpp +++ b/sycl/include/sycl/handler.hpp @@ -465,32 +465,9 @@ class __SYCL_EXPORT handler { /// Constructs SYCL handler from queue. /// /// \param Queue is a SYCL queue. - /// \param IsHost indicates if this handler is created for SYCL host device. - /// TODO: Unused. Remove with ABI break. - handler(std::shared_ptr Queue, bool /*Unused*/); - - /// Constructs SYCL handler from the associated queue and the submission's - /// primary and secondary queue. - /// - /// \param Queue is a SYCL queue. This is equal to either PrimaryQueue or - /// SecondaryQueue. - /// \param PrimaryQueue is the primary SYCL queue of the submission. - /// \param SecondaryQueue is the secondary SYCL queue of the submission. This - /// is null if no secondary queue is associated with the submission. - /// TODO: Unused. Remove with ABI break. - handler(std::shared_ptr Queue, - std::shared_ptr PrimaryQueue, - std::shared_ptr SecondaryQueue, - bool /* Unused */); - - /// Constructs SYCL handler from queue. - /// - /// \param Queue is a SYCL queue. - /// \param IsHost indicates if this handler is created for SYCL host device. /// \param CallerNeedsEvent indicates if the event resulting from this handler /// is needed by the caller. - handler(std::shared_ptr Queue, - bool /* ABI break: remove */, bool CallerNeedsEvent); + handler(std::shared_ptr Queue, bool CallerNeedsEvent); /// Constructs SYCL handler from the associated queue and the submission's /// primary and secondary queue. @@ -500,13 +477,12 @@ class __SYCL_EXPORT handler { /// \param PrimaryQueue is the primary SYCL queue of the submission. /// \param SecondaryQueue is the secondary SYCL queue of the submission. This /// is null if no secondary queue is associated with the submission. - /// \param IsHost indicates if this handler is created for SYCL host device. /// \param CallerNeedsEvent indicates if the event resulting from this handler /// is needed by the caller. handler(std::shared_ptr Queue, std::shared_ptr PrimaryQueue, std::shared_ptr SecondaryQueue, - bool /* ABI break: remove */, bool CallerNeedsEvent); + bool CallerNeedsEvent); /// Constructs SYCL handler from Graph. /// @@ -652,9 +628,6 @@ class __SYCL_EXPORT handler { ~handler() = default; - // TODO: Private and unusued. Remove when ABI break is allowed. - bool is_host() { return false; } - #ifdef __SYCL_DEVICE_ONLY__ // In device compilation accessor isn't inherited from host base classes, so // can't detect by it. Since we don't expect it to be ever called in device @@ -784,12 +757,6 @@ class __SYCL_EXPORT handler { &DynamicParamBase, int ArgIndex); - // TODO: Unusued. Remove when ABI break is allowed. - void verifyKernelInvoc(const kernel &Kernel) { - std::ignore = Kernel; - return; - } - /* The kernel passed to StoreLambda can take an id, an item or an nd_item as * its argument. Since esimd plugin directly invokes the kernel (doesn’t use * piKernelSetArg), the kernel argument type must be known to the plugin. @@ -1110,7 +1077,6 @@ class __SYCL_EXPORT handler { /// /// \param Src is a source SYCL accessor. /// \param Dst is a destination SYCL accessor. - // ABI break: to remove whole method template - std::enable_if_t<(Dim > 0)> - copyAccToPtrHost(accessor Src, - TDst *Dst) { - range Range = Src.get_range(); - parallel_for<__copyAcc2Ptr>( - Range, [=](id Index) { - const size_t LinearIndex = detail::getLinearIndex(Index, Range); - using TSrcNonConst = typename std::remove_const_t; - (reinterpret_cast(Dst))[LinearIndex] = Src[Index]; - }); - } - - // ABI break: to remove whole method - /// Copies 1 element accessed by 0-dimensional accessor Src into the memory - /// pointed by Dst. - /// - /// \param Src is a source SYCL accessor. - /// \param Dst is a pointer to destination memory. - template - std::enable_if_t - copyAccToPtrHost(accessor Src, - TDst *Dst) { - single_task<__copyAcc2Ptr>( - [=]() { - using TSrcNonConst = typename std::remove_const_t; - *(reinterpret_cast(Dst)) = *(Src.get_pointer()); - }); - } - - // ABI break: to remove whole method - /// Copies the memory pointed by Src into the memory accessed by Dst. - /// - /// \param Src is a pointer to source memory. - /// \param Dst is a destination SYCL accessor. - template - std::enable_if_t<(Dim > 0)> - copyPtrToAccHost(TSrc *Src, - accessor Dst) { - range Range = Dst.get_range(); - parallel_for<__copyPtr2Acc>( - Range, [=](id Index) { - const size_t LinearIndex = detail::getLinearIndex(Index, Range); - Dst[Index] = (reinterpret_cast(Src))[LinearIndex]; - }); - } - - // ABI break: to remove whole method - /// Copies 1 element pointed by Src to memory accessed by 0-dimensional - /// accessor Dst. - /// - /// \param Src is a pointer to source memory. - /// \param Dst is a destination SYCL accessor. - template - std::enable_if_t - copyPtrToAccHost(TSrc *Src, - accessor Dst) { - single_task<__copyPtr2Acc>( - [=]() { - *(Dst.get_pointer()) = *(reinterpret_cast(Src)); - }); - } -#endif // __SYCL_DEVICE_ONLY__ - constexpr static bool isConstOrGlobal(access::target AccessTarget) { return AccessTarget == access::target::device || AccessTarget == access::target::constant_buffer; @@ -3426,8 +3317,6 @@ class __SYCL_EXPORT handler { /// Storage for the CG created when handling graph nodes added explicitly. std::unique_ptr MGraphNodeCG; - bool MIsHost = false; // ABI break: to remove - detail::code_location MCodeLoc = {}; bool MIsFinalized = false; event MLastEvent; diff --git a/sycl/include/sycl/kernel.hpp b/sycl/include/sycl/kernel.hpp index a4afbb2040bce..dec5e9547a7ae 100644 --- a/sycl/include/sycl/kernel.hpp +++ b/sycl/include/sycl/kernel.hpp @@ -101,21 +101,13 @@ class __SYCL_EXPORT kernel : public detail::OwnerLessBase { /// Get a valid OpenCL kernel handle /// /// If this kernel encapsulates an instance of OpenCL kernel, a valid - /// cl_kernel will be returned. If this kernel is a host kernel, - /// an invalid_object_error exception will be thrown. + /// cl_kernel will be returned. /// /// \return a valid cl_kernel instance #ifdef __SYCL_INTERNAL_API cl_kernel get() const; #endif - /// Check if the associated SYCL context is a SYCL host context. - /// - /// \return true if this SYCL kernel is a host kernel. - __SYCL2020_DEPRECATED( - "is_host() is deprecated as the host device is no longer supported.") - bool is_host() const; - /// Get the context that this kernel is defined for. /// /// The value returned must be equal to that returned by diff --git a/sycl/include/sycl/kernel_handler.hpp b/sycl/include/sycl/kernel_handler.hpp index 50504fe5ae2cf..deb8308b2c8f5 100644 --- a/sycl/include/sycl/kernel_handler.hpp +++ b/sycl/include/sycl/kernel_handler.hpp @@ -49,11 +49,9 @@ class __SYCL_TYPE(kernel_handler) kernel_handler { #ifdef __SYCL_DEVICE_ONLY__ return getSpecializationConstantOnDevice(); #else - // TODO: add support of host device - throw sycl::feature_not_supported( - "kernel_handler::get_specialization_constant() is not yet supported by " - "host device.", - PI_ERROR_INVALID_OPERATION); + throw sycl::feature_not_supported("kernel_handler::get_specialization_" + "constant() is not supported on host", + PI_ERROR_INVALID_OPERATION); #endif // __SYCL_DEVICE_ONLY__ } diff --git a/sycl/include/sycl/platform.hpp b/sycl/include/sycl/platform.hpp index 6c8db5d4623c4..7d174f18a291d 100644 --- a/sycl/include/sycl/platform.hpp +++ b/sycl/include/sycl/platform.hpp @@ -159,13 +159,6 @@ class __SYCL_EXPORT platform : public detail::OwnerLessBase { "use platform::has() function with aspects APIs instead") bool has_extension(const std::string &ExtensionName) const; - /// Checks if this SYCL platform is a host platform. - /// - /// \return true if this SYCL platform is a host platform. - __SYCL2020_DEPRECATED( - "is_host() is deprecated as the host device is no longer supported.") - bool is_host() const; - /// Returns all SYCL devices associated with this platform. /// /// If this SYCL platform is a host platform, resulting vector contains only diff --git a/sycl/include/sycl/queue.hpp b/sycl/include/sycl/queue.hpp index 04b6969fe2b12..fbcf563ddfaa1 100644 --- a/sycl/include/sycl/queue.hpp +++ b/sycl/include/sycl/queue.hpp @@ -318,11 +318,6 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase { ext::oneapi::experimental::graph_state::modifiable> ext_oneapi_get_graph() const; - /// \return true if this queue is a SYCL host queue. - __SYCL2020_DEPRECATED( - "is_host() is deprecated as the host device is no longer supported.") - bool is_host() const; - /// Queries SYCL queue for information. /// /// The return type depends on information being queried. diff --git a/sycl/include/sycl/reduction.hpp b/sycl/include/sycl/reduction.hpp index 3e9fca6dd91fc..3e969837759b8 100644 --- a/sycl/include/sycl/reduction.hpp +++ b/sycl/include/sycl/reduction.hpp @@ -1178,7 +1178,7 @@ namespace reduction { inline void finalizeHandler(handler &CGH) { CGH.finalize(); } template void withAuxHandler(handler &CGH, FunctorTy Func) { event E = CGH.finalize(); - handler AuxHandler(CGH.MQueue, CGH.MIsHost, CGH.eventNeeded()); + handler AuxHandler(CGH.MQueue, CGH.eventNeeded()); if (!createSyclObjFromImpl(CGH.MQueue).is_in_order()) AuxHandler.depends_on(E); AuxHandler.saveCodeLoc(CGH.MCodeLoc); diff --git a/sycl/include/sycl/stream.hpp b/sycl/include/sycl/stream.hpp index c9083184fbb06..00236a0fdd816 100644 --- a/sycl/include/sycl/stream.hpp +++ b/sycl/include/sycl/stream.hpp @@ -1042,8 +1042,6 @@ class __SYCL_EXPORT __SYCL_SPECIAL_CLASS __SYCL_TYPE(stream) stream WIOffset = GlobalOffset[1].fetch_add(FlushBufferSize); // Initialize flush subbuffer's offset for each work item on device. - // Initialization on host device is performed via submition of additional - // host task. SetFlushBufOffset(GlobalFlushBuf, WIOffset, 0); } @@ -1052,9 +1050,6 @@ class __SYCL_EXPORT __SYCL_SPECIAL_CLASS __SYCL_TYPE(stream) stream // necessary if user hasn't yet flushed data on its own and kernel execution // is finished // NOTE: A call to this function will be generated by compiler - // NOTE: In the current implementation user should explicitly flush data on - // the host device. Data is not flushed automatically after kernel execution - // because of the missing feature in scheduler. flushBuffer(GlobalOffset, GlobalBuf, GlobalFlushBuf, WIOffset); } #endif diff --git a/sycl/source/context.cpp b/sycl/source/context.cpp index e4c7404c7b078..78f26a427834c 100644 --- a/sycl/source/context.cpp +++ b/sycl/source/context.cpp @@ -126,11 +126,6 @@ context::get_backend_info() const { cl_context context::get() const { return impl->get(); } -bool context::is_host() const { - assert(false && "context::is_host should not be called in implementation."); - return false; -} - backend context::get_backend() const noexcept { return impl->getBackend(); } platform context::get_platform() const { diff --git a/sycl/source/detail/platform_impl.cpp b/sycl/source/detail/platform_impl.cpp index 2b4dbf8c92fd2..1b085ed7bcaee 100644 --- a/sycl/source/detail/platform_impl.cpp +++ b/sycl/source/detail/platform_impl.cpp @@ -456,9 +456,6 @@ platform_impl::get_devices(info::device_type DeviceType) const { std::vector Res; ods_target_list *OdsTargetList = SYCLConfig::get(); - - // If any DeviceType other than host was requested for host platform, - // an empty vector will be returned. if (DeviceType == info::device_type::host) return Res; diff --git a/sycl/source/detail/queue_impl.cpp b/sycl/source/detail/queue_impl.cpp index 588254743701f..066bc83fb2427 100644 --- a/sycl/source/detail/queue_impl.cpp +++ b/sycl/source/detail/queue_impl.cpp @@ -354,7 +354,7 @@ event queue_impl::submit_impl(const std::function &CGF, bool CallerNeedsEvent, const detail::code_location &Loc, const SubmitPostProcessF *PostProcess) { - handler Handler(Self, PrimaryQueue, SecondaryQueue, false, CallerNeedsEvent); + handler Handler(Self, PrimaryQueue, SecondaryQueue, CallerNeedsEvent); Handler.saveCodeLoc(Loc); { diff --git a/sycl/source/detail/stream_impl.cpp b/sycl/source/detail/stream_impl.cpp index f74599a4353b9..d0094c025c844 100644 --- a/sycl/source/detail/stream_impl.cpp +++ b/sycl/source/detail/stream_impl.cpp @@ -97,12 +97,6 @@ void stream_impl::generateFlushCommand(handler &cgh) { }); } -// ABI break: remove -void stream_impl::initStreamHost(QueueImplPtr) {} - -// ABI break: remove -void stream_impl::flush(const EventImplPtr &) {} - } // namespace detail } // namespace _V1 } // namespace sycl diff --git a/sycl/source/detail/stream_impl.hpp b/sycl/source/detail/stream_impl.hpp index 59b4c77e057c3..efe78bc452b8f 100644 --- a/sycl/source/detail/stream_impl.hpp +++ b/sycl/source/detail/stream_impl.hpp @@ -37,12 +37,6 @@ class stream_impl { // buffer and offset in the flush buffer GlobalOffsetAccessorT accessGlobalOffset(handler &CGH); - // ABI break: remove - void initStreamHost(QueueImplPtr); - - // ABI break: remove - void flush(const EventImplPtr &); - size_t size() const noexcept; size_t get_work_item_buffer_size() const; diff --git a/sycl/source/device.cpp b/sycl/source/device.cpp index 423ff7be44121..a06e3a534ebc3 100644 --- a/sycl/source/device.cpp +++ b/sycl/source/device.cpp @@ -70,11 +70,6 @@ std::vector device::get_devices(info::device_type deviceType) { cl_device_id device::get() const { return impl->get(); } -bool device::is_host() const { - assert(false && "device::is_host should not be called in implementation."); - return false; -} - bool device::is_cpu() const { return impl->is_cpu(); } bool device::is_gpu() const { return impl->is_gpu(); } diff --git a/sycl/source/device_selector.cpp b/sycl/source/device_selector.cpp index e857dfdf539a4..c69910edc2841 100644 --- a/sycl/source/device_selector.cpp +++ b/sycl/source/device_selector.cpp @@ -232,14 +232,6 @@ __SYCL_EXPORT int accelerator_selector_v(const device &dev) { return Score; } -int host_selector::operator()(const device &dev) const { - // Host device has been removed and host_selector has been deprecated, so this - // should never be able to select a device. - std::ignore = dev; - traceDeviceSelector("info::device_type::host"); - return detail::REJECT_DEVICE_SCORE; -} - __SYCL_EXPORT detail::DSelectorInvocableType aspect_selector(const std::vector &RequireList, const std::vector &DenyList /* ={} */) { diff --git a/sycl/source/event.cpp b/sycl/source/event.cpp index 69d62f354ea4c..65d163df465df 100644 --- a/sycl/source/event.cpp +++ b/sycl/source/event.cpp @@ -37,11 +37,6 @@ bool event::operator==(const event &rhs) const { return rhs.impl == impl; } bool event::operator!=(const event &rhs) const { return !(*this == rhs); } -bool event::is_host() const { - assert(false && "event::is_host should not be called in implementation."); - return false; -} - void event::wait() { impl->wait(impl); } void event::wait(const std::vector &EventList) { diff --git a/sycl/source/handler.cpp b/sycl/source/handler.cpp index aee154fa19dbd..14aec10e67313 100644 --- a/sycl/source/handler.cpp +++ b/sycl/source/handler.cpp @@ -80,29 +80,18 @@ void *getValueFromDynamicParameter( } // namespace detail -/// TODO: Unused. Remove with ABI break. -handler::handler(std::shared_ptr Queue, bool) - : handler(Queue, false, /*CallerNeedsEvent=*/true) {} - -/// TODO: Unused. Remove with ABI break. handler::handler(std::shared_ptr Queue, - std::shared_ptr PrimaryQueue, - std::shared_ptr SecondaryQueue, bool) - : handler(Queue, PrimaryQueue, SecondaryQueue, false, - /*CallerNeedsEvent=*/true) {} - -handler::handler(std::shared_ptr Queue, bool, bool CallerNeedsEvent) - : handler(Queue, Queue, nullptr, false, CallerNeedsEvent) {} + : handler(Queue, Queue, nullptr, CallerNeedsEvent) {} handler::handler(std::shared_ptr Queue, std::shared_ptr PrimaryQueue, - std::shared_ptr SecondaryQueue, bool, + std::shared_ptr SecondaryQueue, bool CallerNeedsEvent) : MImpl(std::make_shared(std::move(PrimaryQueue), std::move(SecondaryQueue), CallerNeedsEvent)), - MQueue(std::move(Queue)), MIsHost(false) {} + MQueue(std::move(Queue)) {} handler::handler( std::shared_ptr Graph) diff --git a/sycl/source/kernel.cpp b/sycl/source/kernel.cpp index 625eb995c47d3..4461d26281150 100644 --- a/sycl/source/kernel.cpp +++ b/sycl/source/kernel.cpp @@ -30,11 +30,6 @@ kernel::kernel(cl_kernel ClKernel, const context &SyclContext) cl_kernel kernel::get() const { return impl->get(); } -bool kernel::is_host() const { - assert(false && "kernel::is_host should not be called in implementation."); - return false; -} - context kernel::get_context() const { return impl->get_info(); } diff --git a/sycl/source/platform.cpp b/sycl/source/platform.cpp index 179c8c09d0825..1b717c6093abc 100644 --- a/sycl/source/platform.cpp +++ b/sycl/source/platform.cpp @@ -40,11 +40,6 @@ bool platform::has_extension(const std::string &ExtensionName) const { return impl->has_extension(ExtensionName); } -bool platform::is_host() const { - assert(false && "platform::is_host should not be called in implementation."); - return false; -} - std::vector platform::get_devices(info::device_type DeviceType) const { return impl->get_devices(DeviceType); } diff --git a/sycl/source/queue.cpp b/sycl/source/queue.cpp index 9977b526349b3..d7201ae64c7ef 100644 --- a/sycl/source/queue.cpp +++ b/sycl/source/queue.cpp @@ -95,11 +95,6 @@ queue::ext_oneapi_get_graph() const { ext::oneapi::experimental::graph_state::modifiable>>(Graph); } -bool queue::is_host() const { - assert(false && "queue::is_host should not be called in implementation."); - return false; -} - void queue::throw_asynchronous() { impl->throw_asynchronous(); } event queue::memset(void *Ptr, int Value, size_t Count, diff --git a/sycl/test/abi/layout_handler.cpp b/sycl/test/abi/layout_handler.cpp index 7fa91db1db58d..710f6c4991782 100644 --- a/sycl/test/abi/layout_handler.cpp +++ b/sycl/test/abi/layout_handler.cpp @@ -171,20 +171,19 @@ void foo() { // CHECK-NEXT: 520 | struct std::_Tuple_impl<1, struct std::default_delete > (base) (empty) // CHECK: 520 | struct std::_Head_base<0, class sycl::detail::CG *> (base) // CHECK-NEXT: 520 | class sycl::detail::CG * _M_head_impl -// CHECK-NEXT: 528 | _Bool MIsHost -// CHECK-NEXT: 536 | struct sycl::detail::code_location MCodeLoc -// CHECK-NEXT: 536 | const char * MFileName -// CHECK-NEXT: 544 | const char * MFunctionName -// CHECK-NEXT: 552 | unsigned long MLineNo -// CHECK-NEXT: 560 | unsigned long MColumnNo -// CHECK-NEXT: 568 | _Bool MIsFinalized -// CHECK-NEXT: 576 | class sycl::event MLastEvent -// CHECK-NEXT: 576 | class sycl::detail::OwnerLessBase (base) (empty) -// CHECK-NEXT: 576 | class std::shared_ptr impl -// CHECK-NEXT: 576 | class std::__shared_ptr (base) -// CHECK-NEXT: 576 | class std::__shared_ptr_access (base) (empty) -// CHECK-NEXT: 576 | element_type * _M_ptr -// CHECK-NEXT: 584 | class std::__shared_count<> _M_refcount -// CHECK-NEXT: 584 | _Sp_counted_base<(_Lock_policy)2U> * _M_pi -// CHECK-NEXT: | [sizeof=592, dsize=592, align=8, -// CHECK-NEXT: | nvsize=592, nvalign=8] +// CHECK-NEXT: 528 | struct sycl::detail::code_location MCodeLoc +// CHECK-NEXT: 528 | const char * MFileName +// CHECK-NEXT: 536 | const char * MFunctionName +// CHECK-NEXT: 544 | unsigned long MLineNo +// CHECK-NEXT: 552 | unsigned long MColumnNo +// CHECK-NEXT: 560 | _Bool MIsFinalized +// CHECK-NEXT: 568 | class sycl::event MLastEvent +// CHECK-NEXT: 568 | class sycl::detail::OwnerLessBase (base) (empty) +// CHECK-NEXT: 568 | class std::shared_ptr impl +// CHECK-NEXT: 568 | class std::__shared_ptr (base) +// CHECK-NEXT: 568 | class std::__shared_ptr_access (base) (empty) +// CHECK-NEXT: 568 | element_type * _M_ptr +// CHECK-NEXT: 576 | class std::__shared_count<> _M_refcount +// CHECK-NEXT: 576 | _Sp_counted_base<(_Lock_policy)2U> * _M_pi +// CHECK-NEXT: | [sizeof=584, dsize=584, align=8, +// CHECK-NEXT: | nvsize=584, nvalign=8] diff --git a/sycl/test/abi/sycl_symbols_linux.dump b/sycl/test/abi/sycl_symbols_linux.dump index 997c0d8df57c2..029bbea8fa301 100644 --- a/sycl/test/abi/sycl_symbols_linux.dump +++ b/sycl/test/abi/sycl_symbols_linux.dump @@ -3540,14 +3540,10 @@ _ZN4sycl3_V17handler8finalizeEv _ZN4sycl3_V17handler8prefetchEPKvm _ZN4sycl3_V17handlerC1ESt10shared_ptrINS0_3ext6oneapi12experimental6detail10graph_implEE _ZN4sycl3_V17handlerC1ESt10shared_ptrINS0_6detail10queue_implEES5_S5_b -_ZN4sycl3_V17handlerC1ESt10shared_ptrINS0_6detail10queue_implEES5_S5_bb _ZN4sycl3_V17handlerC1ESt10shared_ptrINS0_6detail10queue_implEEb -_ZN4sycl3_V17handlerC1ESt10shared_ptrINS0_6detail10queue_implEEbb _ZN4sycl3_V17handlerC2ESt10shared_ptrINS0_3ext6oneapi12experimental6detail10graph_implEE _ZN4sycl3_V17handlerC2ESt10shared_ptrINS0_6detail10queue_implEES5_S5_b -_ZN4sycl3_V17handlerC2ESt10shared_ptrINS0_6detail10queue_implEES5_S5_bb _ZN4sycl3_V17handlerC2ESt10shared_ptrINS0_6detail10queue_implEEb -_ZN4sycl3_V17handlerC2ESt10shared_ptrINS0_6detail10queue_implEEbb _ZN4sycl3_V17samplerC1ENS0_29coordinate_normalization_modeENS0_15addressing_modeENS0_14filtering_modeERKNS0_13property_listE _ZN4sycl3_V17samplerC1EP11_cl_samplerRKNS0_7contextE _ZN4sycl3_V17samplerC2ENS0_29coordinate_normalization_modeENS0_15addressing_modeENS0_14filtering_modeERKNS0_13property_listE @@ -3590,7 +3586,6 @@ _ZN4sycl3_V19kernel_idC1EPKc _ZN4sycl3_V19kernel_idC2EPKc _ZNK4sycl3_V112cpu_selectorclERKNS0_6deviceE _ZNK4sycl3_V112gpu_selectorclERKNS0_6deviceE -_ZNK4sycl3_V113host_selectorclERKNS0_6deviceE _ZNK4sycl3_V114exception_list3endEv _ZNK4sycl3_V114exception_list4sizeEv _ZNK4sycl3_V114exception_list5beginEv @@ -3632,7 +3627,6 @@ _ZNK4sycl3_V15event16get_backend_infoINS0_4info8platform7versionEEENS0_6detail20 _ZNK4sycl3_V15event18get_profiling_infoINS0_4info15event_profiling11command_endEEENS0_6detail28is_event_profiling_info_descIT_E11return_typeEv _ZNK4sycl3_V15event18get_profiling_infoINS0_4info15event_profiling13command_startEEENS0_6detail28is_event_profiling_info_descIT_E11return_typeEv _ZNK4sycl3_V15event18get_profiling_infoINS0_4info15event_profiling14command_submitEEENS0_6detail28is_event_profiling_info_descIT_E11return_typeEv -_ZNK4sycl3_V15event7is_hostEv _ZNK4sycl3_V15event8get_infoINS0_4info5event15reference_countEEENS0_6detail18is_event_info_descIT_E11return_typeEv _ZNK4sycl3_V15event8get_infoINS0_4info5event24command_execution_statusEEENS0_6detail18is_event_info_descIT_E11return_typeEv _ZNK4sycl3_V15event9getNativeEv @@ -3674,7 +3668,6 @@ _ZNK4sycl3_V15queue20ext_oneapi_get_stateEv _ZNK4sycl3_V15queue25ext_oneapi_get_last_eventEv _ZNK4sycl3_V15queue28ext_codeplay_supports_fusionEv _ZNK4sycl3_V15queue3getEv -_ZNK4sycl3_V15queue7is_hostEv _ZNK4sycl3_V15queue8get_infoINS0_4info5queue15reference_countEEENS0_6detail18is_queue_info_descIT_E11return_typeEv _ZNK4sycl3_V15queue8get_infoINS0_4info5queue6deviceEEENS0_6detail18is_queue_info_descIT_E11return_typeEv _ZNK4sycl3_V15queue8get_infoINS0_4info5queue7contextEEENS0_6detail18is_queue_info_descIT_E11return_typeEv @@ -4010,7 +4003,6 @@ _ZNK4sycl3_V16device3getEv _ZNK4sycl3_V16device3hasENS0_6aspectE _ZNK4sycl3_V16device6is_cpuEv _ZNK4sycl3_V16device6is_gpuEv -_ZNK4sycl3_V16device7is_hostEv _ZNK4sycl3_V16device9getNativeEv _ZNK4sycl3_V16kernel11get_backendEv _ZNK4sycl3_V16kernel11get_contextEv @@ -4026,7 +4018,6 @@ _ZNK4sycl3_V16kernel16get_backend_infoINS0_4info8platform7versionEEENS0_6detail2 _ZNK4sycl3_V16kernel17get_kernel_bundleEv _ZNK4sycl3_V16kernel19ext_oneapi_get_infoINS0_3ext6oneapi12experimental4info21kernel_queue_specific23max_num_work_group_syncEEENT_11return_typeERKNS0_5queueE _ZNK4sycl3_V16kernel3getEv -_ZNK4sycl3_V16kernel7is_hostEv _ZNK4sycl3_V16kernel8get_infoINS0_4info22kernel_device_specific15work_group_sizeEEENS0_6detail35is_kernel_device_specific_info_descIT_E11return_typeERKNS0_6deviceE _ZNK4sycl3_V16kernel8get_infoINS0_4info22kernel_device_specific16global_work_sizeEEENS0_6detail35is_kernel_device_specific_info_descIT_E11return_typeERKNS0_6deviceE _ZNK4sycl3_V16kernel8get_infoINS0_4info22kernel_device_specific16private_mem_sizeEEENS0_6detail35is_kernel_device_specific_info_descIT_E11return_typeERKNS0_6deviceE @@ -4120,7 +4111,6 @@ _ZNK4sycl3_V17context16get_backend_infoINS0_4info6device15backend_versionEEENS0_ _ZNK4sycl3_V17context16get_backend_infoINS0_4info6device7versionEEENS0_6detail20is_backend_info_descIT_E11return_typeEv _ZNK4sycl3_V17context16get_backend_infoINS0_4info8platform7versionEEENS0_6detail20is_backend_info_descIT_E11return_typeEv _ZNK4sycl3_V17context3getEv -_ZNK4sycl3_V17context7is_hostEv _ZNK4sycl3_V17context8get_infoINS0_4info7context15reference_countEEENS0_6detail20is_context_info_descIT_E11return_typeEv _ZNK4sycl3_V17context8get_infoINS0_4info7context31atomic_fence_order_capabilitiesEEENS0_6detail20is_context_info_descIT_E11return_typeEv _ZNK4sycl3_V17context8get_infoINS0_4info7context31atomic_fence_scope_capabilitiesEEENS0_6detail20is_context_info_descIT_E11return_typeEv @@ -4188,7 +4178,6 @@ _ZNK4sycl3_V18platform30ext_oneapi_get_default_contextEv _ZNK4sycl3_V18platform32ext_oneapi_get_composite_devicesEv _ZNK4sycl3_V18platform3getEv _ZNK4sycl3_V18platform3hasENS0_6aspectE -_ZNK4sycl3_V18platform7is_hostEv _ZNK4sycl3_V18platform9getNativeEv _ZNK4sycl3_V19exception11get_contextEv _ZNK4sycl3_V19exception11has_contextEv diff --git a/sycl/test/abi/sycl_symbols_windows.dump b/sycl/test/abi/sycl_symbols_windows.dump index 136f094ef937a..de8a65e885348 100644 --- a/sycl/test/abi/sycl_symbols_windows.dump +++ b/sycl/test/abi/sycl_symbols_windows.dump @@ -567,13 +567,8 @@ ??0half@host_half_impl@detail@_V1@sycl@@QEAA@AEBM@Z ??0half@host_half_impl@detail@_V1@sycl@@QEAA@G@Z ??0handler@_V1@sycl@@AEAA@V?$shared_ptr@Vgraph_impl@detail@experimental@oneapi@ext@_V1@sycl@@@std@@@Z -??0handler@_V1@sycl@@AEAA@V?$shared_ptr@Vqueue_impl@detail@_V1@sycl@@@std@@00_N1@Z ??0handler@_V1@sycl@@AEAA@V?$shared_ptr@Vqueue_impl@detail@_V1@sycl@@@std@@00_N@Z -??0handler@_V1@sycl@@AEAA@V?$shared_ptr@Vqueue_impl@detail@_V1@sycl@@@std@@_N1@Z ??0handler@_V1@sycl@@AEAA@V?$shared_ptr@Vqueue_impl@detail@_V1@sycl@@@std@@_N@Z -??0host_selector@_V1@sycl@@QEAA@$$QEAV012@@Z -??0host_selector@_V1@sycl@@QEAA@AEBV012@@Z -??0host_selector@_V1@sycl@@QEAA@XZ ??0image_mem@experimental@oneapi@ext@_V1@sycl@@QEAA@$$QEAV012345@@Z ??0image_mem@experimental@oneapi@ext@_V1@sycl@@QEAA@AEBUimage_descriptor@12345@AEBVdevice@45@AEBVcontext@45@@Z ??0image_mem@experimental@oneapi@ext@_V1@sycl@@QEAA@AEBUimage_descriptor@12345@AEBVqueue@45@@Z @@ -674,7 +669,6 @@ ??1fusion_wrapper@experimental@codeplay@ext@_V1@sycl@@QEAA@XZ ??1gpu_selector@_V1@sycl@@UEAA@XZ ??1handler@_V1@sycl@@AEAA@XZ -??1host_selector@_V1@sycl@@UEAA@XZ ??1image_mem@experimental@oneapi@ext@_V1@sycl@@QEAA@XZ ??1image_mem_impl@detail@experimental@oneapi@ext@_V1@sycl@@QEAA@XZ ??1image_plain@detail@_V1@sycl@@QEAA@XZ @@ -754,8 +748,6 @@ ??4gpu_selector@_V1@sycl@@QEAAAEAV012@$$QEAV012@@Z ??4gpu_selector@_V1@sycl@@QEAAAEAV012@AEBV012@@Z ??4half@host_half_impl@detail@_V1@sycl@@QEAAAEAV01234@AEBV01234@@Z -??4host_selector@_V1@sycl@@QEAAAEAV012@$$QEAV012@@Z -??4host_selector@_V1@sycl@@QEAAAEAV012@AEBV012@@Z ??4image_mem@experimental@oneapi@ext@_V1@sycl@@QEAAAEAV012345@$$QEAV012345@@Z ??4image_mem@experimental@oneapi@ext@_V1@sycl@@QEAAAEAV012345@AEBV012345@@Z ??4image_plain@detail@_V1@sycl@@QEAAAEAV0123@$$QEAV0123@@Z @@ -820,7 +812,6 @@ ??Rfilter_selector@ONEAPI@_V1@sycl@@UEBAHAEBVdevice@23@@Z ??Rfilter_selector@oneapi@ext@_V1@sycl@@UEBAHAEBVdevice@34@@Z ??Rgpu_selector@_V1@sycl@@UEBAHAEBVdevice@12@@Z -??Rhost_selector@_V1@sycl@@UEBAHAEBVdevice@12@@Z ??Xhalf@host_half_impl@detail@_V1@sycl@@QEAAAEAV01234@AEBV01234@@Z ??Yhalf@host_half_impl@detail@_V1@sycl@@QEAAAEAV01234@AEBV01234@@Z ??Zhalf@host_half_impl@detail@_V1@sycl@@QEAAAEAV01234@AEBV01234@@Z @@ -834,7 +825,6 @@ ??_7filter_selector@ONEAPI@_V1@sycl@@6B@ ??_7filter_selector@oneapi@ext@_V1@sycl@@6B@ ??_7gpu_selector@_V1@sycl@@6B@ -??_7host_selector@_V1@sycl@@6B@ ??_8exception@_V1@sycl@@7B@ ??_Dexception@_V1@sycl@@QEAAXXZ ??_Fcontext@_V1@sycl@@QEAAXXZ @@ -4296,13 +4286,6 @@ ?is_compatible@_V1@sycl@@YA_NAEBV?$vector@Vkernel_id@_V1@sycl@@V?$allocator@Vkernel_id@_V1@sycl@@@std@@@std@@AEBVdevice@12@@Z ?is_cpu@device@_V1@sycl@@QEBA_NXZ ?is_gpu@device@_V1@sycl@@QEBA_NXZ -?is_host@context@_V1@sycl@@QEBA_NXZ -?is_host@device@_V1@sycl@@QEBA_NXZ -?is_host@event@_V1@sycl@@QEBA_NXZ -?is_host@handler@_V1@sycl@@AEAA_NXZ -?is_host@kernel@_V1@sycl@@QEBA_NXZ -?is_host@platform@_V1@sycl@@QEBA_NXZ -?is_host@queue@_V1@sycl@@QEBA_NXZ ?is_in_fusion_mode@fusion_wrapper@experimental@codeplay@ext@_V1@sycl@@QEBA_NXZ ?is_in_order@queue@_V1@sycl@@QEBA_NXZ ?is_source_kernel_bundle_supported@detail@experimental@oneapi@ext@_V1@sycl@@YA_NW4backend@56@W4source_language@23456@@Z @@ -4478,7 +4461,6 @@ ?updateValue@dynamic_parameter_base@detail@experimental@oneapi@ext@_V1@sycl@@IEAAXPEBX_K@Z ?use_kernel_bundle@handler@_V1@sycl@@QEAAXAEBV?$kernel_bundle@$01@23@@Z ?verifyDeviceHasProgressGuarantee@handler@_V1@sycl@@AEAAXW4forward_progress_guarantee@experimental@oneapi@ext@23@W4execution_scope@56723@1@Z -?verifyKernelInvoc@handler@_V1@sycl@@AEAAXAEBVkernel@23@@Z ?verifyUsedKernelBundle@handler@_V1@sycl@@AEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z ?verifyUsedKernelBundleInternal@handler@_V1@sycl@@AEAAXVstring_view@detail@23@@Z ?wait@event@_V1@sycl@@QEAAXXZ diff --git a/sycl/test/abi/symbol_size_alignment.cpp b/sycl/test/abi/symbol_size_alignment.cpp index ba1c683d55ad5..0d3d43faf3f35 100644 --- a/sycl/test/abi/symbol_size_alignment.cpp +++ b/sycl/test/abi/symbol_size_alignment.cpp @@ -52,9 +52,9 @@ int main() { check(); check(); #ifdef _MSC_VER - check(); + check(); #else - check(); + check(); #endif check, 16, 8>(); check(); diff --git a/sycl/test/invoke_simd/invoke_simd.cpp b/sycl/test/invoke_simd/invoke_simd.cpp index 087834eb7b089..33017aa2d9337 100644 --- a/sycl/test/invoke_simd/invoke_simd.cpp +++ b/sycl/test/invoke_simd/invoke_simd.cpp @@ -46,17 +46,14 @@ ESIMD_CALLEE(float *A, esimd::simd b, int i) SYCL_ESIMD_FUNCTION { float SPMD_CALLEE(float *A, float b, int i) { return A[i] + b; } class ESIMDSelector : public device_selector { - // Require GPU device unless HOST is requested in ONEAPI_DEVICE_SELECTOR env + // Require GPU device virtual int operator()(const device &device) const { if (const char *dev_filter = getenv("ONEAPI_DEVICE_SELECTOR")) { std::string filter_string(dev_filter); if (filter_string.find("gpu") != std::string::npos) return device.is_gpu() ? 1000 : -1; - if (filter_string.find("host") != std::string::npos) - return device.is_host() ? 1000 : -1; std::cerr - << "Supported 'ONEAPI_DEVICE_SELECTOR' env var values are 'gpu' and " - "'host', '" + << "Supported 'ONEAPI_DEVICE_SELECTOR' env var value is 'gpu', '" << filter_string << "' does not contain such substrings.\n"; return -1; } diff --git a/sycl/test/warnings/sycl_2020_deprecations.cpp b/sycl/test/warnings/sycl_2020_deprecations.cpp index 6839499c14ebf..b89b72b001bf2 100644 --- a/sycl/test/warnings/sycl_2020_deprecations.cpp +++ b/sycl/test/warnings/sycl_2020_deprecations.cpp @@ -183,8 +183,6 @@ int main() { sycl::gpu_selector gs; // expected-warning@+1{{'accelerator_selector' is deprecated: Use the callable sycl::accelerator_selector_v instead.}} sycl::accelerator_selector as; - // expected-warning@+1{{'host_selector' is deprecated: Host device is no longer supported.}} - sycl::host_selector hs; // expected-warning@+1{{Use SYCL 2020 callable device selectors instead.}} class user_defined_device_selector : public sycl::device_selector { @@ -201,8 +199,6 @@ int main() { // expected-warning@+1{{SYCL 1.2.1 device selectors are deprecated. Please use SYCL 2020 device selectors instead.}} sycl::device ad{as}; // expected-warning@+1{{SYCL 1.2.1 device selectors are deprecated. Please use SYCL 2020 device selectors instead.}} - sycl::device hd{hs}; - // expected-warning@+1{{SYCL 1.2.1 device selectors are deprecated. Please use SYCL 2020 device selectors instead.}} sycl::device udd{uds}; // expected-warning@+1{{SYCL 1.2.1 device selectors are deprecated. Please use SYCL 2020 device selectors instead.}} @@ -214,8 +210,6 @@ int main() { // expected-warning@+1{{SYCL 1.2.1 device selectors are deprecated. Please use SYCL 2020 device selectors instead.}} sycl::platform ap{as}; // expected-warning@+1{{SYCL 1.2.1 device selectors are deprecated. Please use SYCL 2020 device selectors instead.}} - sycl::platform hp{hs}; - // expected-warning@+1{{SYCL 1.2.1 device selectors are deprecated. Please use SYCL 2020 device selectors instead.}} sycl::platform udp{uds}; // expected-warning@+1{{SYCL 1.2.1 device selectors are deprecated. Please use SYCL 2020 device selectors instead.}} @@ -227,8 +221,6 @@ int main() { // expected-warning@+1{{SYCL 1.2.1 device selectors are deprecated. Please use SYCL 2020 device selectors instead.}} sycl::queue aq1{as}; // expected-warning@+1{{SYCL 1.2.1 device selectors are deprecated. Please use SYCL 2020 device selectors instead.}} - sycl::queue hq1{hs}; - // expected-warning@+1{{SYCL 1.2.1 device selectors are deprecated. Please use SYCL 2020 device selectors instead.}} sycl::queue udq1{uds}; sycl::context ctx; @@ -242,8 +234,6 @@ int main() { // expected-warning@+1{{SYCL 1.2.1 device selectors are deprecated. Please use SYCL 2020 device selectors instead.}} sycl::queue aq2{ctx, as}; // expected-warning@+1{{SYCL 1.2.1 device selectors are deprecated. Please use SYCL 2020 device selectors instead.}} - sycl::queue hq2{ctx, hs}; - // expected-warning@+1{{SYCL 1.2.1 device selectors are deprecated. Please use SYCL 2020 device selectors instead.}} sycl::queue udq2{ctx, uds}; auto ah = [](sycl::exception_list) {}; @@ -257,8 +247,6 @@ int main() { // expected-warning@+1{{SYCL 1.2.1 device selectors are deprecated. Please use SYCL 2020 device selectors instead.}} sycl::queue aq3{as, ah}; // expected-warning@+1{{SYCL 1.2.1 device selectors are deprecated. Please use SYCL 2020 device selectors instead.}} - sycl::queue hq3{hs, ah}; - // expected-warning@+1{{SYCL 1.2.1 device selectors are deprecated. Please use SYCL 2020 device selectors instead.}} sycl::queue udq3{uds, ah}; // expected-warning@+1{{SYCL 1.2.1 device selectors are deprecated. Please use SYCL 2020 device selectors instead.}} @@ -270,8 +258,6 @@ int main() { // expected-warning@+1{{SYCL 1.2.1 device selectors are deprecated. Please use SYCL 2020 device selectors instead.}} sycl::queue aq4{ctx, as, ah}; // expected-warning@+1{{SYCL 1.2.1 device selectors are deprecated. Please use SYCL 2020 device selectors instead.}} - sycl::queue hq4{ctx, hs, ah}; - // expected-warning@+1{{SYCL 1.2.1 device selectors are deprecated. Please use SYCL 2020 device selectors instead.}} sycl::queue udq4{ctx, uds, ah}; Queue.submit([&](sycl::handler &CGH) { diff --git a/sycl/unittests/program_manager/arg_mask/EliminatedArgMask.cpp b/sycl/unittests/program_manager/arg_mask/EliminatedArgMask.cpp index b4d4e7cdb7535..649e7a6126729 100644 --- a/sycl/unittests/program_manager/arg_mask/EliminatedArgMask.cpp +++ b/sycl/unittests/program_manager/arg_mask/EliminatedArgMask.cpp @@ -111,7 +111,7 @@ class MockHandler : public sycl::handler { public: MockHandler(std::shared_ptr Queue) - : sycl::handler(Queue, /* IsHost */ false, /*CallerNeedsEvent*/ true) {} + : sycl::handler(Queue, /*CallerNeedsEvent*/ true) {} std::unique_ptr finalize() { auto CGH = static_cast(this); diff --git a/sycl/unittests/scheduler/AccessorDefaultCtor.cpp b/sycl/unittests/scheduler/AccessorDefaultCtor.cpp index bf200ec660fb9..4b91b8c3063d3 100644 --- a/sycl/unittests/scheduler/AccessorDefaultCtor.cpp +++ b/sycl/unittests/scheduler/AccessorDefaultCtor.cpp @@ -21,7 +21,7 @@ TEST_F(SchedulerTest, AccDefaultCtorDoesntAffectDepGraph) { std::vector ToEnqueue; - MockHandlerCustomFinalize MockCGH(QueueDevImpl, false, + MockHandlerCustomFinalize MockCGH(QueueDevImpl, /*CallerNeedsEvent=*/true); sycl::accessor diff --git a/sycl/unittests/scheduler/EnqueueWithDependsOnDeps.cpp b/sycl/unittests/scheduler/EnqueueWithDependsOnDeps.cpp index 31d4e92bf89a8..d58d48f2f6ad0 100644 --- a/sycl/unittests/scheduler/EnqueueWithDependsOnDeps.cpp +++ b/sycl/unittests/scheduler/EnqueueWithDependsOnDeps.cpp @@ -56,7 +56,7 @@ class DependsOnTests : public ::testing::Test { std::vector ToEnqueue; // Emulating processing of command group function - MockHandlerCustomFinalize MockCGH(QueueDevImpl, false, + MockHandlerCustomFinalize MockCGH(QueueDevImpl, /*CallerNeedsEvent=*/true); for (auto EventImpl : Events) diff --git a/sycl/unittests/scheduler/GraphCleanup.cpp b/sycl/unittests/scheduler/GraphCleanup.cpp index 94be957e03051..186768b3fd823 100644 --- a/sycl/unittests/scheduler/GraphCleanup.cpp +++ b/sycl/unittests/scheduler/GraphCleanup.cpp @@ -327,7 +327,7 @@ TEST_F(SchedulerTest, StreamBufferDeallocation) { AttachSchedulerWrapper AttachScheduler{MSPtr}; detail::EventImplPtr EventImplPtr; { - MockHandlerCustomFinalize MockCGH(QueueImplPtr, false, + MockHandlerCustomFinalize MockCGH(QueueImplPtr, /*CallerNeedsEvent=*/true); kernel_bundle KernelBundle = sycl::get_kernel_bundle( @@ -390,7 +390,7 @@ TEST_F(SchedulerTest, AuxiliaryResourcesDeallocation) { detail::EventImplPtr EventImplPtr; bool MockAuxResourceDeleted = false; { - MockHandlerCustomFinalize MockCGH(QueueImplPtr, false, + MockHandlerCustomFinalize MockCGH(QueueImplPtr, /*CallerNeedsEvent=*/true); kernel_bundle KernelBundle = sycl::get_kernel_bundle( diff --git a/sycl/unittests/scheduler/KernelFusion.cpp b/sycl/unittests/scheduler/KernelFusion.cpp index 5503749ea71d7..025f8ece059eb 100644 --- a/sycl/unittests/scheduler/KernelFusion.cpp +++ b/sycl/unittests/scheduler/KernelFusion.cpp @@ -22,7 +22,7 @@ template detail::Command *CreateTaskCommand(MockScheduler &MS, detail::QueueImplPtr DevQueue, buffer &buf) { - MockHandlerCustomFinalize MockCGH(DevQueue, false, + MockHandlerCustomFinalize MockCGH(DevQueue, /*CallerNeedsEvent=*/true); auto acc = buf.get_access(static_cast(MockCGH)); diff --git a/sycl/unittests/scheduler/SchedulerTestUtils.hpp b/sycl/unittests/scheduler/SchedulerTestUtils.hpp index 4974501a66581..9d89a970c9a09 100644 --- a/sycl/unittests/scheduler/SchedulerTestUtils.hpp +++ b/sycl/unittests/scheduler/SchedulerTestUtils.hpp @@ -225,9 +225,9 @@ sycl::detail::Requirement getMockRequirement(const MemObjT &MemObj) { class MockHandler : public sycl::handler { public: - MockHandler(std::shared_ptr Queue, bool IsHost, + MockHandler(std::shared_ptr Queue, bool CallerNeedsEvent) - : sycl::handler(Queue, IsHost, CallerNeedsEvent) {} + : sycl::handler(Queue, CallerNeedsEvent) {} // Methods using sycl::handler::addReduction; using sycl::handler::getType; @@ -293,8 +293,8 @@ class MockHandler : public sycl::handler { class MockHandlerCustomFinalize : public MockHandler { public: MockHandlerCustomFinalize(std::shared_ptr Queue, - bool IsHost, bool CallerNeedsEvent) - : MockHandler(Queue, IsHost, CallerNeedsEvent) {} + bool CallerNeedsEvent) + : MockHandler(Queue, CallerNeedsEvent) {} std::unique_ptr finalize() { std::unique_ptr CommandGroup; diff --git a/sycl/unittests/scheduler/StreamInitDependencyOnHost.cpp b/sycl/unittests/scheduler/StreamInitDependencyOnHost.cpp index af11192c31851..d4f65caddf56c 100644 --- a/sycl/unittests/scheduler/StreamInitDependencyOnHost.cpp +++ b/sycl/unittests/scheduler/StreamInitDependencyOnHost.cpp @@ -21,9 +21,9 @@ inline constexpr auto DisableCleanupName = class MockHandlerStreamInit : public MockHandler { public: - MockHandlerStreamInit(std::shared_ptr Queue, bool IsHost, + MockHandlerStreamInit(std::shared_ptr Queue, bool CallerNeedsEvent) - : MockHandler(Queue, IsHost, CallerNeedsEvent) {} + : MockHandler(Queue, CallerNeedsEvent) {} std::unique_ptr finalize() { std::unique_ptr CommandGroup; switch (getType()) {