diff --git a/sycl/CMakeLists.txt b/sycl/CMakeLists.txt index ecc47d71c770a..b02a3c03d062c 100644 --- a/sycl/CMakeLists.txt +++ b/sycl/CMakeLists.txt @@ -36,7 +36,7 @@ set(SYCL_MAJOR_VERSION 7) set(SYCL_MINOR_VERSION 0) set(SYCL_PATCH_VERSION 0) -set(SYCL_DEV_ABI_VERSION 6) +set(SYCL_DEV_ABI_VERSION 7) if (SYCL_ADD_DEV_VERSION_POSTFIX) set(SYCL_VERSION_POSTFIX "-${SYCL_DEV_ABI_VERSION}") endif() diff --git a/sycl/include/sycl/backend.hpp b/sycl/include/sycl/backend.hpp index a33cc4367f8fc..6ebb66da93619 100644 --- a/sycl/include/sycl/backend.hpp +++ b/sycl/include/sycl/backend.hpp @@ -204,7 +204,6 @@ get_native(const device &Obj) { } #endif -// Native handle of an accessor should be accessed through interop_handler template diff --git a/sycl/include/sycl/detail/backend_traits_cuda.hpp b/sycl/include/sycl/detail/backend_traits_cuda.hpp index e28d0538e2227..ac75566573627 100644 --- a/sycl/include/sycl/detail/backend_traits_cuda.hpp +++ b/sycl/include/sycl/detail/backend_traits_cuda.hpp @@ -14,7 +14,6 @@ #pragma once -#include #include #include #include @@ -41,9 +40,7 @@ namespace detail { // TODO the interops for context, device, event, platform and program // may be removed after removing the deprecated 'get_native()' methods -// from the corresponding classes. The interop specialization -// is also used in the get_queue() method of the deprecated class -// interop_handler and also can be removed after API cleanup. +// from the corresponding classes. template <> struct interop { using type = CUcontext; }; @@ -60,23 +57,6 @@ template <> struct interop { using type = CUstream; }; -// TODO the interops for accessor is used in the already deprecated class -// interop_handler and can be removed after API cleanup. -template -struct interop> { - using type = CUdeviceptr; -}; - -template -struct interop< - backend::ext_oneapi_cuda, - accessor> { - using type = CUdeviceptr; -}; - template struct BackendInput> { diff --git a/sycl/include/sycl/detail/backend_traits_hip.hpp b/sycl/include/sycl/detail/backend_traits_hip.hpp index 087e9debc328e..90a5913ac0774 100644 --- a/sycl/include/sycl/detail/backend_traits_hip.hpp +++ b/sycl/include/sycl/detail/backend_traits_hip.hpp @@ -14,7 +14,6 @@ #pragma once -#include #include #include #include @@ -35,9 +34,7 @@ namespace detail { // TODO the interops for context, device, event, platform and program // may be removed after removing the deprecated 'get_native()' methods -// from the corresponding classes. The interop specialization -// is also used in the get_queue() method of the deprecated class -// interop_handler and also can be removed after API cleanup. +// from the corresponding classes. template <> struct interop { using type = HIPcontext; }; @@ -54,23 +51,6 @@ template <> struct interop { using type = HIPstream; }; -// TODO the interops for accessor is used in the already deprecated class -// interop_handler and can be removed after API cleanup. -template -struct interop> { - using type = HIPdeviceptr; -}; - -template -struct interop< - backend::ext_oneapi_hip, - accessor> { - using type = HIPdeviceptr; -}; - template struct BackendInput> { diff --git a/sycl/include/sycl/detail/backend_traits_level_zero.hpp b/sycl/include/sycl/detail/backend_traits_level_zero.hpp index b68df391ae56f..3db321833276b 100644 --- a/sycl/include/sycl/detail/backend_traits_level_zero.hpp +++ b/sycl/include/sycl/detail/backend_traits_level_zero.hpp @@ -15,7 +15,6 @@ #pragma once -#include #include #include #include @@ -46,9 +45,7 @@ class device_impl; // TODO the interops for context, device, event, platform and program // may be removed after removing the deprecated 'get_native()' methods -// from the corresponding classes. The interop specialization -// is also used in the get_queue() method of the deprecated class -// interop_handler and also can be removed after API cleanup. +// from the corresponding classes. template <> struct interop { using type = ze_context_handle_t; }; @@ -70,30 +67,6 @@ template <> struct interop { using type = ze_driver_handle_t; }; -// TODO the interops for accessor is used in the already deprecated class -// interop_handler and can be removed after API cleanup. -template -struct interop> { - using type = char *; -}; - -template -struct interop< - backend::ext_oneapi_level_zero, - accessor> { - using type = char *; -}; - -template -struct interop> { - using type = ze_image_handle_t; -}; - template <> struct interop { using type = ze_kernel_handle_t; }; diff --git a/sycl/include/sycl/detail/backend_traits_opencl.hpp b/sycl/include/sycl/detail/backend_traits_opencl.hpp index fa186604219fe..190d01e89c564 100644 --- a/sycl/include/sycl/detail/backend_traits_opencl.hpp +++ b/sycl/include/sycl/detail/backend_traits_opencl.hpp @@ -15,7 +15,6 @@ #pragma once -#include #include #include #include @@ -31,9 +30,7 @@ namespace detail { // TODO the interops for context, device, event, platform and program // may be removed after removing the deprecated 'get_native()' methods -// from the corresponding classes. The interop specialization -// is also used in the get_queue() method of the deprecated class -// interop_handler and also can be removed after API cleanup. +// from the corresponding classes. template <> struct interop { using type = cl_context; }; @@ -50,29 +47,6 @@ template <> struct interop { using type = cl_platform_id; }; -// TODO the interops for accessor is used in the already deprecated class -// interop_handler and can be removed after API cleanup. -template -struct interop> { - using type = cl_mem; -}; - -template -struct interop> { - using type = cl_mem; -}; - -template -struct interop> { - using type = cl_mem; -}; - template struct BackendInput> { using type = cl_mem; diff --git a/sycl/include/sycl/detail/cg.hpp b/sycl/include/sycl/detail/cg.hpp index 445e578ac1778..f5680dedc52c6 100644 --- a/sycl/include/sycl/detail/cg.hpp +++ b/sycl/include/sycl/detail/cg.hpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -66,7 +65,6 @@ class CG { CopyUSM = 10, FillUSM = 11, PrefetchUSM = 12, - CodeplayInteropTask = 13, CodeplayHostTask = 14, AdviseUSM = 15, Copy2DUSM = 16, @@ -330,17 +328,6 @@ class CGAdviseUSM : public CG { pi_mem_advice getAdvice() { return MAdvice; } }; -class CGInteropTask : public CG { -public: - std::unique_ptr MInteropTask; - - CGInteropTask(std::unique_ptr InteropTask, - CG::StorageInitHelper CGData, CGTYPE Type, - detail::code_location loc = {}) - : CG(Type, std::move(CGData), std::move(loc)), - MInteropTask(std::move(InteropTask)) {} -}; - class CGHostTask : public CG { public: std::unique_ptr MHostTask; diff --git a/sycl/include/sycl/detail/cg_types.hpp b/sycl/include/sycl/detail/cg_types.hpp index f0725069f1f75..4b433cc222687 100644 --- a/sycl/include/sycl/detail/cg_types.hpp +++ b/sycl/include/sycl/detail/cg_types.hpp @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include @@ -217,14 +216,6 @@ class HostKernelBase { virtual ~HostKernelBase() = default; }; -class InteropTask { - std::function MFunc; - -public: - InteropTask(std::function Func) : MFunc(Func) {} - void call(sycl::interop_handler &h) { MFunc(h); } -}; - class HostTask { std::function MHostTask; std::function MInteropTask; diff --git a/sycl/include/sycl/handler.hpp b/sycl/include/sycl/handler.hpp index 38b5aca077c8d..6312baa3e8628 100644 --- a/sycl/include/sycl/handler.hpp +++ b/sycl/include/sycl/handler.hpp @@ -1901,17 +1901,6 @@ class __SYCL_EXPORT handler { #endif } - /// Invokes a lambda on the host. Dependencies are satisfied on the host. - /// - /// \param Func is a lambda that is executed on the host - template - __SYCL_DEPRECATED("interop_task() is deprecated, use host_task() instead") - void interop_task(FuncT Func) { - - MInteropTask.reset(new detail::InteropTask(std::move(Func))); - setType(detail::CG::CodeplayInteropTask); - } - /// Defines and invokes a SYCL kernel function for the specified range. /// /// \param Kernel is a SYCL kernel that is executed on a SYCL device @@ -2966,8 +2955,6 @@ class __SYCL_EXPORT handler { std::unique_ptr MHostKernel; /// Storage for lambda/function when using HostTask std::unique_ptr MHostTask; - // Storage for a lambda or function when using InteropTasks - std::unique_ptr MInteropTask; /// The list of valid SYCL events that need to complete /// before barrier command can be executed std::vector MEventsWaitWithBarrier; diff --git a/sycl/include/sycl/interop_handler.hpp b/sycl/include/sycl/interop_handler.hpp deleted file mode 100644 index fc7bf6754bd30..0000000000000 --- a/sycl/include/sycl/interop_handler.hpp +++ /dev/null @@ -1,79 +0,0 @@ -//==------- interop_handler.hpp - Argument for codeplay_introp_task --------==// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#pragma once - -#include - -namespace sycl { -__SYCL_INLINE_VER_NAMESPACE(_V1) { - -// Interoperability handler -// -class __SYCL_DEPRECATED("interop_handler class is deprecated, use" - " interop_handle instead with host-task") - interop_handler { - // Make accessor class friend to access the detail mem objects - template - friend class accessor; - -public: - using QueueImplPtr = std::shared_ptr; - using ReqToMem = std::pair; - - interop_handler(std::vector MemObjs, QueueImplPtr Queue) - : MQueue(std::move(Queue)), MMemObjs(std::move(MemObjs)) {} - - template - auto get_queue() const -> typename detail::interop::type { - int32_t NativeHandleDesc; - return reinterpret_cast::type>( - GetNativeQueue(NativeHandleDesc)); - } - - template - auto get_mem(accessor - Acc) const -> - typename detail::interop>::type { - detail::AccessorBaseHost *AccBase = (detail::AccessorBaseHost *)&Acc; - return getMemImpl( - detail::getSyclObjImpl(*AccBase).get()); - } - -private: - QueueImplPtr MQueue; - std::vector MMemObjs; - - template - auto - getMemImpl(detail::AccessorImplHost *Req) const -> typename detail::interop< - BackendName, - accessor>::type { - return (typename detail::interop< - BackendName, accessor>::type)GetNativeMem(Req); - } - - __SYCL_EXPORT pi_native_handle - GetNativeMem(detail::AccessorImplHost *Req) const; - __SYCL_EXPORT pi_native_handle - GetNativeQueue(int32_t &NativeHandleDesc) const; -}; - -} // __SYCL_INLINE_VER_NAMESPACE(_V1) -} // namespace sycl diff --git a/sycl/source/CMakeLists.txt b/sycl/source/CMakeLists.txt index 9820fe2e37c2f..79f4535ae0175 100644 --- a/sycl/source/CMakeLists.txt +++ b/sycl/source/CMakeLists.txt @@ -218,7 +218,6 @@ set(SYCL_SOURCES "handler.cpp" "image.cpp" "interop_handle.cpp" - "interop_handler.cpp" "kernel.cpp" "kernel_bundle.cpp" "platform.cpp" diff --git a/sycl/source/detail/graph_impl.hpp b/sycl/source/detail/graph_impl.hpp index ba528dcec6765..967daf60c86ec 100644 --- a/sycl/source/detail/graph_impl.hpp +++ b/sycl/source/detail/graph_impl.hpp @@ -123,13 +123,6 @@ class node_impl { case sycl::detail::CG::Kernel: case sycl::detail::CG::RunOnHostIntel: return createCGCopy(); - case sycl::detail::CG::CodeplayInteropTask: - assert(false); - break; - // TODO: Uncomment this once we implement support for interop task so we can - // test required changes to the CG class. - - // return createCGCopy(); case sycl::detail::CG::CopyAccToPtr: case sycl::detail::CG::CopyPtrToAcc: case sycl::detail::CG::CopyAccToAcc: diff --git a/sycl/source/detail/queue_impl.cpp b/sycl/source/detail/queue_impl.cpp index d0d59de2f7876..b0e1f23285eac 100644 --- a/sycl/source/detail/queue_impl.cpp +++ b/sycl/source/detail/queue_impl.cpp @@ -96,8 +96,7 @@ event queue_impl::memset(const std::shared_ptr &Self, : std::unique_lock(); // If the last submitted command in the in-order queue is host_task then // wait for it before submitting usm command. - if (isInOrder() && (MLastCGType == CG::CGTYPE::CodeplayHostTask || - MLastCGType == CG::CGTYPE::CodeplayInteropTask)) + if (isInOrder() && MLastCGType == CG::CGTYPE::CodeplayHostTask) MLastEvent.wait(); sycl::detail::pi::PiEvent NativeEvent{}; @@ -159,8 +158,7 @@ event queue_impl::memcpy(const std::shared_ptr &Self, : std::unique_lock(); // If the last submitted command in the in-order queue is host_task then // wait for it before submitting usm command. - if (isInOrder() && (MLastCGType == CG::CGTYPE::CodeplayHostTask || - MLastCGType == CG::CGTYPE::CodeplayInteropTask)) + if (isInOrder() && MLastCGType == CG::CGTYPE::CodeplayHostTask) MLastEvent.wait(); sycl::detail::pi::PiEvent NativeEvent{}; @@ -202,8 +200,7 @@ event queue_impl::mem_advise(const std::shared_ptr &Self, : std::unique_lock(); // If the last submitted command in the in-order queue is host_task then // wait for it before submitting usm command. - if (isInOrder() && (MLastCGType == CG::CGTYPE::CodeplayHostTask || - MLastCGType == CG::CGTYPE::CodeplayInteropTask)) + if (isInOrder() && MLastCGType == CG::CGTYPE::CodeplayHostTask) MLastEvent.wait(); sycl::detail::pi::PiEvent NativeEvent{}; @@ -247,8 +244,7 @@ event queue_impl::memcpyToDeviceGlobal( : std::unique_lock(); // If the last submitted command in the in-order queue is host_task then // wait for it before submitting usm command. - if (isInOrder() && (MLastCGType == CG::CGTYPE::CodeplayHostTask || - MLastCGType == CG::CGTYPE::CodeplayInteropTask)) + if (isInOrder() && MLastCGType == CG::CGTYPE::CodeplayHostTask) MLastEvent.wait(); sycl::detail::pi::PiEvent NativeEvent{}; @@ -293,8 +289,7 @@ event queue_impl::memcpyFromDeviceGlobal( : std::unique_lock(); // If the last submitted command in the in-order queue is host_task then // wait for it before submitting usm command. - if (isInOrder() && (MLastCGType == CG::CGTYPE::CodeplayHostTask || - MLastCGType == CG::CGTYPE::CodeplayInteropTask)) + if (isInOrder() && MLastCGType == CG::CGTYPE::CodeplayHostTask) MLastEvent.wait(); sycl::detail::pi::PiEvent NativeEvent{}; diff --git a/sycl/source/detail/queue_impl.hpp b/sycl/source/detail/queue_impl.hpp index 47899f5038444..bfbf42b775542 100644 --- a/sycl/source/detail/queue_impl.hpp +++ b/sycl/source/detail/queue_impl.hpp @@ -680,8 +680,7 @@ class queue_impl { if (MIsInorder) { auto IsExpDepManaged = [](const CG::CGTYPE &Type) { - return (Type == CG::CGTYPE::CodeplayHostTask || - Type == CG::CGTYPE::CodeplayInteropTask); + return Type == CG::CGTYPE::CodeplayHostTask; }; // Accessing and changing of an event isn't atomic operation. diff --git a/sycl/source/detail/scheduler/commands.cpp b/sycl/source/detail/scheduler/commands.cpp index 4c0818503c2b9..e8dc63c4380d8 100644 --- a/sycl/source/detail/scheduler/commands.cpp +++ b/sycl/source/detail/scheduler/commands.cpp @@ -2795,36 +2795,6 @@ pi_int32 ExecCGCommand::enqueueImp() { Memset->getHeight(), Memset->getValue(), std::move(RawEvents), Event); return PI_SUCCESS; } - case CG::CGTYPE::CodeplayInteropTask: { - const PluginPtr &Plugin = MQueue->getPlugin(); - CGInteropTask *ExecInterop = (CGInteropTask *)MCommandGroup.get(); - // Wait for dependencies to complete before dispatching work on the host - // TODO: Use a callback to dispatch the interop task instead of waiting - // for - // the event - if (!RawEvents.empty()) { - Plugin->call(RawEvents.size(), &RawEvents[0]); - } - std::vector ReqMemObjs; - // Extract the Mem Objects for all Requirements, to ensure they are - // available if a user ask for them inside the interop task scope - const auto &HandlerReq = ExecInterop->getRequirements(); - std::for_each( - std::begin(HandlerReq), std::end(HandlerReq), [&](Requirement *Req) { - AllocaCommandBase *AllocaCmd = getAllocaForReq(Req); - auto MemArg = reinterpret_cast(AllocaCmd->getMemAllocation()); - interop_handler::ReqToMem ReqToMem = std::make_pair(Req, MemArg); - ReqMemObjs.emplace_back(ReqToMem); - }); - - std::sort(std::begin(ReqMemObjs), std::end(ReqMemObjs)); - interop_handler InteropHandler(std::move(ReqMemObjs), MQueue); - ExecInterop->MInteropTask->call(InteropHandler); - Plugin->call(MQueue->getHandleRef(), 0, - nullptr, Event); - - return PI_SUCCESS; - } case CG::CGTYPE::CodeplayHostTask: { CGHostTask *HostTask = static_cast(MCommandGroup.get()); diff --git a/sycl/source/handler.cpp b/sycl/source/handler.cpp index 5143f34292ef8..b58772a07e99a 100644 --- a/sycl/source/handler.cpp +++ b/sycl/source/handler.cpp @@ -286,10 +286,6 @@ event handler::finalize() { MImpl->MKernelCacheConfig, MCodeLoc)); break; } - case detail::CG::CodeplayInteropTask: - CommandGroup.reset(new detail::CGInteropTask( - std::move(MInteropTask), std::move(CGData), MCGType, MCodeLoc)); - break; case detail::CG::CopyAccToPtr: case detail::CG::CopyPtrToAcc: case detail::CG::CopyAccToAcc: diff --git a/sycl/source/interop_handler.cpp b/sycl/source/interop_handler.cpp deleted file mode 100644 index 7e586ea06f641..0000000000000 --- a/sycl/source/interop_handler.cpp +++ /dev/null @@ -1,38 +0,0 @@ -//==------- interop_handler.cpp - Argument for codeplay_introp_task --------==// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#include -#include -#include -#include - -namespace sycl { -__SYCL_INLINE_VER_NAMESPACE(_V1) { - -pi_native_handle -interop_handler::GetNativeQueue(int32_t &NativeHandleDesc) const { - return MQueue->getNative(NativeHandleDesc); -} - -pi_native_handle interop_handler::GetNativeMem(detail::Requirement *Req) const { - auto Iter = std::find_if(std::begin(MMemObjs), std::end(MMemObjs), - [=](ReqToMem Elem) { return (Elem.first == Req); }); - - if (Iter == std::end(MMemObjs)) { - throw("Invalid memory object used inside interop"); - } - - auto Plugin = MQueue->getPlugin(); - pi_native_handle Handle; - Plugin->call(Iter->second, - &Handle); - return Handle; -} - -} // __SYCL_INLINE_VER_NAMESPACE(_V1) -} // namespace sycl diff --git a/sycl/test-e2e/Basic/handler/interop_task.cpp b/sycl/test-e2e/Basic/handler/interop_task.cpp deleted file mode 100644 index e37d19169bf5e..0000000000000 --- a/sycl/test-e2e/Basic/handler/interop_task.cpp +++ /dev/null @@ -1,75 +0,0 @@ -// REQUIRES: opencl, opencl_icd -// RUN: %{build} -o %t.out %opencl_lib -// RUN: %{run} %t.out - -//==------- interop_task.cpp -----------------------------------------------==// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#include -#include - -#include "../../helpers.hpp" -#include -#include -#include - -int main() { - constexpr size_t BufSize = 4; - - int data1[BufSize] = {1, 1, 1, 1}; - - sycl::buffer DstBuf(sycl::range<1>{BufSize}); - sycl::buffer DstBuf2(sycl::range<1>{BufSize}); - - TestQueue Queue{sycl::default_selector_v}; - - Queue.submit([&](sycl::handler &CGH) { - auto DstAcc = DstBuf.get_access(CGH); - CGH.parallel_for(sycl::range<1>{BufSize}, - [=](sycl::id<1> ID) { DstAcc[ID] = 42; }); - }); - - Queue.submit([&](sycl::handler &CGH) { - auto DstAcc = DstBuf.get_access(CGH); - auto DstAcc2 = DstBuf2.get_access(CGH); - - CGH.interop_task([=](sycl::interop_handler ih) { - cl_command_queue clQueue = ih.get_queue(); - cl_mem src = ih.get_mem(DstAcc); - cl_mem dst2 = ih.get_mem(DstAcc2); - clEnqueueCopyBuffer(clQueue, src, dst2, 0, 0, sizeof(int) * BufSize, 0, - nullptr, nullptr); - }); - }); - - { - auto DstAcc = DstBuf.get_host_access(); - const int Expected = 42; - for (int I = 0; I < DstAcc.get_count(); ++I) - if (DstAcc[I] != Expected) { - std::cerr << "Mismatch. Elem " << I << ". Expected: " << Expected - << ", Got: " << DstAcc[I] << std::endl; - return 1; - } - } - - { - auto DstAcc2 = DstBuf2.get_host_access(); - const int Expected = 42; - for (int I = 0; I < DstAcc2.get_count(); ++I) - if (DstAcc2[I] != Expected) { - std::cerr << "Mismatch. Elem " << I << ". Expected: " << Expected - << ", Got: " << DstAcc2[I] << std::endl; - return 1; - } - } - - std::cout << "Success" << std::endl; - - return 0; -} diff --git a/sycl/test-e2e/Plugin/interop-level-zero-interop-task-mem-buffer.cpp b/sycl/test-e2e/Plugin/interop-level-zero-interop-task-mem-buffer.cpp deleted file mode 100644 index b33d7906ef590..0000000000000 --- a/sycl/test-e2e/Plugin/interop-level-zero-interop-task-mem-buffer.cpp +++ /dev/null @@ -1,50 +0,0 @@ -// REQUIRES: level_zero, level_zero_dev_kit -// RUN: %{build} %level_zero_options -o %t.out -// RUN: %{run} %t.out - -// Test for Level Zero interop_task for buffer. -// Level-Zero -#include -#include -// SYCL -#include -#include - -using namespace sycl; - -constexpr size_t SIZE = 16; - -int main() { - queue queue{}; - - try { - buffer buffer(SIZE); - - ze_context_handle_t ze_context = - get_native(queue.get_context()); - - queue - .submit([&](handler &cgh) { - auto buffer_acc = buffer.get_access(cgh); - cgh.interop_task([=](const interop_handler &ih) { - void *device_ptr = - ih.get_mem(buffer_acc); - ze_memory_allocation_properties_t memAllocProperties{}; - memAllocProperties.stype = - ZE_STRUCTURE_TYPE_MEMORY_ALLOCATION_PROPERTIES; - ze_result_t res = zeMemGetAllocProperties( - ze_context, device_ptr, &memAllocProperties, nullptr); - assert(res == ZE_RESULT_SUCCESS); - }); - }) - .wait(); - } catch (exception const &e) { - std::cout << "SYCL exception caught: " << e.what() << std::endl; - return e.get_cl_code(); - } catch (const char *msg) { - std::cout << "Exception caught: " << msg << std::endl; - return 1; - } - - return 0; -} diff --git a/sycl/test-e2e/Plugin/interop-level-zero-interop-task-mem-image.cpp b/sycl/test-e2e/Plugin/interop-level-zero-interop-task-mem-image.cpp deleted file mode 100644 index e265705a2fffc..0000000000000 --- a/sycl/test-e2e/Plugin/interop-level-zero-interop-task-mem-image.cpp +++ /dev/null @@ -1,47 +0,0 @@ -// REQUIRES: aspect-ext_intel_legacy_image -// REQUIRES: level_zero, level_zero_dev_kit -// RUN: %{build} %level_zero_options -o %t.out -// RUN: %{run} %t.out - -// Test for Level Zero interop_task for image. -// Level-Zero -#include -#include -// SYCL -#include -#include - -using namespace sycl; - -constexpr size_t SIZE = 16; - -int main() { - queue queue{}; - - try { - image<2> image(image_channel_order::rgba, image_channel_type::fp32, - {SIZE, SIZE}); - - ze_context_handle_t ze_context = - get_native(queue.get_context()); - - queue - .submit([&](handler &cgh) { - auto image_acc = image.get_access(cgh); - cgh.interop_task([=](const interop_handler &ih) { - ze_image_handle_t ze_image = - ih.get_mem(image_acc); - assert(ze_image != nullptr); - }); - }) - .wait(); - } catch (exception const &e) { - std::cout << "SYCL exception caught: " << e.what() << std::endl; - return e.get_cl_code(); - } catch (const char *msg) { - std::cout << "Exception caught: " << msg << std::endl; - return 1; - } - - return 0; -} diff --git a/sycl/test-e2e/Plugin/interop-opencl-interop-task-mem.cpp b/sycl/test-e2e/Plugin/interop-opencl-interop-task-mem.cpp deleted file mode 100644 index e4b338809e501..0000000000000 --- a/sycl/test-e2e/Plugin/interop-opencl-interop-task-mem.cpp +++ /dev/null @@ -1,54 +0,0 @@ -// REQUIRES: opencl, opencl_icd -// REQUIRES: aspect-ext_intel_legacy_image - -// RUN: %{build} -o %t.out %opencl_lib -// RUN: %{run} %t.out - -// Test for OpenCL interop_task. - -#include -#include -#include -#include - -using namespace sycl; - -constexpr size_t SIZE = 16; - -int main() { - queue queue{}; - - try { - buffer buffer(SIZE); - image<2> image(image_channel_order::rgba, image_channel_type::fp32, - {SIZE, SIZE}); - - queue - .submit([&](handler &cgh) { - auto buffer_acc = buffer.get_access(cgh); - auto image_acc = image.get_access(cgh); - cgh.interop_task([=](const interop_handler &ih) { - cl_mem buffer_mem = ih.get_mem(buffer_acc); - size_t size = 0; - clGetMemObjectInfo(buffer_mem, CL_MEM_SIZE, sizeof(size), - (void *)&size, nullptr); - assert(size == SIZE); - - cl_mem mem = ih.get_mem(image_acc); - size_t width = 0; - clGetImageInfo(mem, CL_IMAGE_WIDTH, sizeof(width), (void *)&width, - nullptr); - assert(width == SIZE); - }); - }) - .wait(); - } catch (exception const &e) { - std::cout << "SYCL exception caught: " << e.what() << std::endl; - return e.get_cl_code(); - } catch (const char *msg) { - std::cout << "Exception caught: " << msg << std::endl; - return 1; - } - - return 0; -} diff --git a/sycl/test/abi/layout_handler.cpp b/sycl/test/abi/layout_handler.cpp index 5df3b206ed4f6..1bd3e2b9e48b8 100644 --- a/sycl/test/abi/layout_handler.cpp +++ b/sycl/test/abi/layout_handler.cpp @@ -156,60 +156,53 @@ void foo() { // CHECK-NEXT: 464 | struct std::_Tuple_impl<1, struct std::default_delete > (base) (empty) // CHECK: 464 | struct std::_Head_base<0, class sycl::detail::HostTask *> (base) // CHECK-NEXT: 464 | class sycl::detail::HostTask * _M_head_impl -// CHECK-NEXT: 472 | class std::unique_ptr MInteropTask -// CHECK: 472 | class std::__uniq_ptr_impl > -// CHECK-NEXT: 472 | class std::tuple > _M_t -// CHECK-NEXT: 472 | struct std::_Tuple_impl<0, class sycl::detail::InteropTask *, struct std::default_delete > (base) -// CHECK-NEXT: 472 | struct std::_Tuple_impl<1, struct std::default_delete > (base) (empty) -// CHECK: 472 | struct std::_Head_base<0, class sycl::detail::InteropTask *> (base) -// CHECK-NEXT: 472 | class sycl::detail::InteropTask * _M_head_impl -// CHECK-NEXT: 480 | class std::vector > MEventsWaitWithBarrier -// CHECK-NEXT: 480 | struct std::_Vector_base, class std::allocator > > (base) -// CHECK-NEXT: 480 | struct std::_Vector_base, class std::allocator > >::_Vector_impl _M_impl -// CHECK-NEXT: 480 | class std::allocator > (base) (empty) -// CHECK-NEXT: 480 | class __gnu_cxx::new_allocator > (base) (empty) -// CHECK: 480 | pointer _M_start -// CHECK-NEXT: 488 | pointer _M_finish -// CHECK-NEXT: 496 | pointer _M_end_of_storage -// CHECK-NEXT: 504 | class std::shared_ptr MGraph -// CHECK-NEXT: 504 | class std::__shared_ptr (base) -// CHECK-NEXT: 504 | class std::__shared_ptr_access (base) (empty) -// CHECK-NEXT: 504 | element_type * _M_ptr -// CHECK-NEXT: 512 | class std::__shared_count<> _M_refcount -// CHECK-NEXT: 512 | _Sp_counted_base<(_Lock_policy)2U> * _M_pi -// CHECK-NEXT: 520 | class std::shared_ptr MExecGraph -// CHECK-NEXT: 520 | class std::__shared_ptr (base) -// CHECK-NEXT: 520 | class std::__shared_ptr_access (base) (empty) -// CHECK-NEXT: 520 | element_type * _M_ptr -// CHECK-NEXT: 528 | class std::__shared_count<> _M_refcount -// CHECK-NEXT: 528 | _Sp_counted_base<(_Lock_policy)2U> * _M_pi -// CHECK-NEXT: 536 | class std::shared_ptr MSubgraphNode -// CHECK-NEXT: 536 | class std::__shared_ptr (base) -// CHECK-NEXT: 536 | class std::__shared_ptr_access (base) (empty) -// CHECK-NEXT: 536 | element_type * _M_ptr -// CHECK-NEXT: 544 | class std::__shared_count<> _M_refcount -// CHECK-NEXT: 544 | _Sp_counted_base<(_Lock_policy)2U> * _M_pi -// CHECK-NEXT: 552 | class std::unique_ptr MGraphNodeCG -// CHECK: 552 | class std::__uniq_ptr_impl > -// CHECK-NEXT: 552 | class std::tuple > _M_t -// CHECK-NEXT: 552 | struct std::_Tuple_impl<0, class sycl::detail::CG *, struct std::default_delete > (base) -// CHECK-NEXT: 552 | struct std::_Tuple_impl<1, struct std::default_delete > (base) (empty) -// CHECK: 552 | struct std::_Head_base<0, class sycl::detail::CG *> (base) -// CHECK-NEXT: 552 | class sycl::detail::CG * _M_head_impl -// CHECK-NEXT: 560 | _Bool MIsHost -// CHECK-NEXT: 568 | struct sycl::detail::code_location MCodeLoc -// CHECK-NEXT: 568 | const char * MFileName -// CHECK-NEXT: 576 | const char * MFunctionName -// CHECK-NEXT: 584 | unsigned long MLineNo -// CHECK-NEXT: 592 | unsigned long MColumnNo -// CHECK-NEXT: 600 | _Bool MIsFinalized -// CHECK-NEXT: 608 | class sycl::event MLastEvent -// CHECK-NEXT: 608 | class sycl::detail::OwnerLessBase (base) (empty) -// CHECK-NEXT: 608 | class std::shared_ptr impl -// CHECK-NEXT: 608 | class std::__shared_ptr (base) -// CHECK-NEXT: 608 | class std::__shared_ptr_access (base) (empty) -// CHECK-NEXT: 608 | element_type * _M_ptr -// CHECK-NEXT: 616 | class std::__shared_count<> _M_refcount -// CHECK-NEXT: 616 | _Sp_counted_base<(_Lock_policy)2U> * _M_pi -// CHECK-NEXT: | [sizeof=624, dsize=624, align=8, -// CHECK-NEXT: | nvsize=624, nvalign=8] +// CHECK-NEXT: 472 | class std::vector > MEventsWaitWithBarrier +// CHECK-NEXT: 472 | struct std::_Vector_base, class std::allocator > > (base) +// CHECK-NEXT: 472 | struct std::_Vector_base, class std::allocator > >::_Vector_impl _M_impl +// CHECK-NEXT: 472 | class std::allocator > (base) (empty) +// CHECK-NEXT: 472 | class __gnu_cxx::new_allocator > (base) (empty) +// CHECK: 472 | pointer _M_start +// CHECK-NEXT: 480 | pointer _M_finish +// CHECK-NEXT: 488 | pointer _M_end_of_storage +// CHECK-NEXT: 496 | class std::shared_ptr MGraph +// CHECK-NEXT: 496 | class std::__shared_ptr (base) +// CHECK-NEXT: 496 | class std::__shared_ptr_access (base) (empty) +// CHECK-NEXT: 496 | element_type * _M_ptr +// CHECK-NEXT: 504 | class std::__shared_count<> _M_refcount +// CHECK-NEXT: 504 | _Sp_counted_base<(_Lock_policy)2U> * _M_pi +// CHECK-NEXT: 512 | class std::shared_ptr MExecGraph +// CHECK-NEXT: 512 | class std::__shared_ptr (base) +// CHECK-NEXT: 512 | class std::__shared_ptr_access (base) (empty) +// CHECK-NEXT: 512 | element_type * _M_ptr +// CHECK-NEXT: 520 | class std::__shared_count<> _M_refcount +// CHECK-NEXT: 520 | _Sp_counted_base<(_Lock_policy)2U> * _M_pi +// CHECK-NEXT: 528 | class std::shared_ptr MSubgraphNode +// CHECK-NEXT: 528 | class std::__shared_ptr (base) +// CHECK-NEXT: 528 | class std::__shared_ptr_access (base) (empty) +// CHECK-NEXT: 528 | element_type * _M_ptr +// CHECK-NEXT: 536 | class std::__shared_count<> _M_refcount +// CHECK-NEXT: 536 | _Sp_counted_base<(_Lock_policy)2U> * _M_pi +// CHECK-NEXT: 544 | class std::unique_ptr MGraphNodeCG +// CHECK: 544 | class std::__uniq_ptr_impl > +// CHECK-NEXT: 544 | class std::tuple > _M_t +// CHECK-NEXT: 544 | struct std::_Tuple_impl<0, class sycl::detail::CG *, struct std::default_delete > (base) +// CHECK-NEXT: 544 | struct std::_Tuple_impl<1, struct std::default_delete > (base) (empty) +// CHECK: 544 | struct std::_Head_base<0, class sycl::detail::CG *> (base) +// CHECK-NEXT: 544 | class sycl::detail::CG * _M_head_impl +// CHECK-NEXT: 552 | _Bool MIsHost +// CHECK-NEXT: 560 | struct sycl::detail::code_location MCodeLoc +// CHECK-NEXT: 560 | const char * MFileName +// CHECK-NEXT: 568 | const char * MFunctionName +// CHECK-NEXT: 576 | unsigned long MLineNo +// CHECK-NEXT: 584 | unsigned long MColumnNo +// CHECK-NEXT: 592 | _Bool MIsFinalized +// CHECK-NEXT: 600 | class sycl::event MLastEvent +// CHECK-NEXT: 600 | class sycl::detail::OwnerLessBase (base) (empty) +// CHECK-NEXT: 600 | class std::shared_ptr impl +// CHECK-NEXT: 600 | class std::__shared_ptr (base) +// CHECK-NEXT: 600 | class std::__shared_ptr_access (base) (empty) +// CHECK-NEXT: 600 | element_type * _M_ptr +// CHECK-NEXT: 608 | class std::__shared_count<> _M_refcount +// CHECK-NEXT: 608 | _Sp_counted_base<(_Lock_policy)2U> * _M_pi +// CHECK-NEXT: | [sizeof=616, dsize=616, align=8, +// CHECK-NEXT: | nvsize=616, nvalign=8] diff --git a/sycl/test/abi/sycl_symbols_linux.dump b/sycl/test/abi/sycl_symbols_linux.dump index d9f14ce84c069..9e4622b69a811 100644 --- a/sycl/test/abi/sycl_symbols_linux.dump +++ b/sycl/test/abi/sycl_symbols_linux.dump @@ -4096,8 +4096,6 @@ _ZNK4sycl3_V114interop_handle14getNativeQueueERi _ZNK4sycl3_V114interop_handle15getNativeDeviceEv _ZNK4sycl3_V114interop_handle16getNativeContextEv _ZNK4sycl3_V115device_selector13select_deviceEv -_ZNK4sycl3_V115interop_handler12GetNativeMemEPNS0_6detail16AccessorImplHostE -_ZNK4sycl3_V115interop_handler14GetNativeQueueERi _ZNK4sycl3_V116default_selectorclERKNS0_6deviceE _ZNK4sycl3_V120accelerator_selectorclERKNS0_6deviceE _ZNK4sycl3_V13ext6oneapi12experimental6detail24modifiable_command_graph8finalizeERKNS0_13property_listE diff --git a/sycl/test/abi/sycl_symbols_windows.dump b/sycl/test/abi/sycl_symbols_windows.dump index ddd1aad5c0d68..74453ae9d8406 100644 --- a/sycl/test/abi/sycl_symbols_windows.dump +++ b/sycl/test/abi/sycl_symbols_windows.dump @@ -801,8 +801,6 @@ ?DisableRangeRounding@handler@_V1@sycl@@AEAA_NXZ ?GDBMethodsAnchor@SampledImageAccessorBaseHost@detail@_V1@sycl@@IEAAXXZ ?GDBMethodsAnchor@UnsampledImageAccessorBaseHost@detail@_V1@sycl@@IEAAXXZ -?GetNativeMem@interop_handler@_V1@sycl@@AEBA_KPEAVAccessorImplHost@detail@23@@Z -?GetNativeQueue@interop_handler@_V1@sycl@@AEBA_KAEAH@Z ?GetRangeRoundingSettings@handler@_V1@sycl@@AEAAXAEA_K00@Z ?OffsetSize@stream_impl@detail@_V1@sycl@@0_KB ?PushBack@exception_list@_V1@sycl@@AEAAX$$QEAVexception_ptr@std@@@Z diff --git a/sycl/test/abi/symbol_size_alignment.cpp b/sycl/test/abi/symbol_size_alignment.cpp index 1d80680340bd1..fc9308d1682ca 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/warnings/interop_task_deprecation.cpp b/sycl/test/warnings/interop_task_deprecation.cpp deleted file mode 100644 index 4f99d91d1bf56..0000000000000 --- a/sycl/test/warnings/interop_task_deprecation.cpp +++ /dev/null @@ -1,21 +0,0 @@ -// RUN: %clangxx %fsycl-host-only -fsyntax-only -Xclang -verify -Xclang -verify-ignore-unexpected=note %s - -#include - -using namespace sycl; - -int main() { - queue Q; - buffer B(range<1>{1}); - Q.submit([&](handler &H) { - auto Acc = B.get_access(H); - // expected-warning@+1 {{interop_handler class is deprecated, use interop_handle instead with host-task}} - auto L = [Acc](interop_handler IH) { - // empty - }; - // expected-warning@+2 {{interop_task() is deprecated, use host_task() instead}} - // expected-warning@+1 {{interop_task() is deprecated, use host_task() instead}} - H.interop_task(L); - }); - return 0; -}