From 90cdcfcdf47b5d7edb46e0e9fe398e36ca11144f Mon Sep 17 00:00:00 2001 From: Vladimir Lazarev Date: Tue, 17 Dec 2019 15:11:16 +0300 Subject: [PATCH] [SYCL][NFC] Use Impl objects instead of SYCL objects Switch to use shared pointers to impl objects in fields of *_impl classes to avoid duplication of object creation and avoiding default constructors calls and creation context for unpredictable devices. Signed-off-by: Vladimir Lazarev --- sycl/include/CL/sycl/context.hpp | 6 ++++ sycl/include/CL/sycl/detail/context_impl.hpp | 5 +-- sycl/include/CL/sycl/detail/kernel_impl.hpp | 20 ++++++----- sycl/include/CL/sycl/detail/program_impl.hpp | 38 +++++++++++--------- sycl/include/CL/sycl/detail/queue_impl.hpp | 38 +++++++++++--------- sycl/include/CL/sycl/program.hpp | 9 +++-- sycl/source/context.cpp | 2 ++ sycl/source/detail/context_impl.cpp | 8 ++--- sycl/source/detail/kernel_impl.cpp | 21 ++++++----- sycl/source/detail/scheduler/scheduler.cpp | 3 +- sycl/source/kernel.cpp | 3 +- sycl/source/ordered_queue.cpp | 11 +++--- sycl/source/queue.cpp | 10 +++--- 13 files changed, 100 insertions(+), 74 deletions(-) diff --git a/sycl/include/CL/sycl/context.hpp b/sycl/include/CL/sycl/context.hpp index 0c9926f26040f..aeaa42925d33f 100644 --- a/sycl/include/CL/sycl/context.hpp +++ b/sycl/include/CL/sycl/context.hpp @@ -122,6 +122,9 @@ class context { vector_class get_devices() const; private: + /// Constructs a SYCL context object from a valid context_impl instance. + context(shared_ptr_class Impl); + shared_ptr_class impl; template friend decltype(Obj::impl) detail::getSyclObjImpl(const Obj &SyclObject); @@ -130,6 +133,9 @@ class context { friend typename std::add_pointer::type detail::getRawSyclObjImpl(const T &SyclObject); + + template + friend T detail::createSyclObjFromImpl(decltype(T::impl) ImplObj); }; } // namespace sycl diff --git a/sycl/include/CL/sycl/detail/context_impl.hpp b/sycl/include/CL/sycl/detail/context_impl.hpp index 2c76ffccff5ca..2a31c8e90f9c2 100644 --- a/sycl/include/CL/sycl/detail/context_impl.hpp +++ b/sycl/include/CL/sycl/detail/context_impl.hpp @@ -11,10 +11,10 @@ #include #include #include +#include #include #include #include -#include #include #include @@ -25,6 +25,7 @@ namespace sycl { // Forward declaration class device; namespace detail { +using PlatformImplPtr = std::shared_ptr; class context_impl { public: /// Constructs a context_impl using a single SYCL devices. @@ -125,7 +126,7 @@ class context_impl { async_handler MAsyncHandler; vector_class MDevices; RT::PiContext MContext; - platform MPlatform; + PlatformImplPtr MPlatform; bool MPluginInterop; bool MHostContext; std::map MCachedPrograms; diff --git a/sycl/include/CL/sycl/detail/kernel_impl.hpp b/sycl/include/CL/sycl/detail/kernel_impl.hpp index 78ad684c5f0bb..1502f43e63ff2 100644 --- a/sycl/include/CL/sycl/detail/kernel_impl.hpp +++ b/sycl/include/CL/sycl/detail/kernel_impl.hpp @@ -8,8 +8,8 @@ #pragma once -#include #include +#include #include #include #include @@ -26,6 +26,8 @@ class program; namespace detail { class program_impl; +using ContextImplPtr = std::shared_ptr; +using ProgramImplPtr = std::shared_ptr; class kernel_impl { public: /// Constructs a SYCL kernel instance from a PiKernel @@ -36,7 +38,7 @@ class kernel_impl { /// /// @param Kernel is a valid PiKernel instance /// @param SyclContext is a valid SYCL context - kernel_impl(RT::PiKernel Kernel, const context &SyclContext); + kernel_impl(RT::PiKernel Kernel, ContextImplPtr Context); /// Constructs a SYCL kernel instance from a SYCL program and a PiKernel /// @@ -50,16 +52,16 @@ class kernel_impl { /// @param ProgramImpl is a valid instance of program_impl /// @param IsCreatedFromSource is a flag that indicates whether program /// is created from source code - kernel_impl(RT::PiKernel Kernel, const context &SyclContext, - std::shared_ptr ProgramImpl, + kernel_impl(RT::PiKernel Kernel, ContextImplPtr ContextImpl, + ProgramImplPtr ProgramImpl, bool IsCreatedFromSource); /// Constructs a SYCL kernel for host device /// /// @param SyclContext is a valid SYCL context /// @param ProgramImpl is a valid instance of program_impl - kernel_impl(const context &SyclContext, - std::shared_ptr ProgramImpl); + kernel_impl(ContextImplPtr Context, + ProgramImplPtr ProgramImpl); ~kernel_impl(); @@ -80,7 +82,7 @@ class kernel_impl { /// Check if the associated SYCL context is a SYCL host context. /// /// @return true if this SYCL kernel is a host kernel. - bool is_host() const { return MContext.is_host(); } + bool is_host() const { return MContext->is_host(); } /// Query information from the kernel object using the info::kernel_info /// descriptor. @@ -138,8 +140,8 @@ class kernel_impl { private: RT::PiKernel MKernel; - context MContext; - std::shared_ptr MProgramImpl; + const ContextImplPtr MContext; + const ProgramImplPtr MProgramImpl; bool MCreatedFromSource = true; }; diff --git a/sycl/include/CL/sycl/detail/program_impl.hpp b/sycl/include/CL/sycl/detail/program_impl.hpp index 951e50d84d709..afbbb447db4b2 100644 --- a/sycl/include/CL/sycl/detail/program_impl.hpp +++ b/sycl/include/CL/sycl/detail/program_impl.hpp @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include @@ -30,6 +29,8 @@ enum class program_state { none, compiled, linked }; namespace detail { +using ContextImplPtr = std::shared_ptr; + // Used to identify the module the user code, which included this header, // belongs to. Incurs some marginal inefficiency - there will be one copy // per '#include "program_impl.hpp"' @@ -39,10 +40,10 @@ class program_impl { public: program_impl() = delete; - explicit program_impl(const context &Context) - : program_impl(Context, Context.get_devices()) {} + explicit program_impl(ContextImplPtr Context) + : program_impl(Context, Context->get_info()) {} - program_impl(const context &Context, vector_class DeviceList) + program_impl(ContextImplPtr Context, vector_class DeviceList) : Context(Context), Devices(DeviceList) {} // Kernels caching for linked programs won't be allowed due to only compiled @@ -90,14 +91,14 @@ class program_impl { Programs.push_back(Prg->Program); } PI_CALL_THROW(piProgramLink, compile_program_error)( - detail::getSyclObjImpl(Context)->getHandleRef(), Devices.size(), + Context->getHandleRef(), Devices.size(), Devices.data(), LinkOptions.c_str(), Programs.size(), Programs.data(), nullptr, nullptr, &Program); } } // Kernel caching for programs created by interoperability c-tor isn't allowed - program_impl(const context &Context, RT::PiProgram Program) + program_impl(ContextImplPtr Context, RT::PiProgram Program) : Program(Program), Context(Context), IsLinkable(true) { // TODO handle the case when cl_program build is in progress @@ -108,7 +109,8 @@ class program_impl { PI_CALL(piProgramGetInfo)(Program, CL_PROGRAM_DEVICES, sizeof(RT::PiDevice) * NumDevices, PiDevices.data(), nullptr); - vector_class SyclContextDevices = Context.get_devices(); + vector_class SyclContextDevices = + Context->get_info(); // Keep only the subset of the devices (associated with context) that // were actually used to create the program. @@ -153,7 +155,7 @@ class program_impl { PI_CALL(piProgramRetain)(Program); } - program_impl(const context &Context, RT::PiKernel Kernel) + program_impl(ContextImplPtr Context, RT::PiKernel Kernel) : program_impl( Context, ProgramManager::getInstance().getClProgramFromClKernel(Kernel)) {} @@ -177,7 +179,7 @@ class program_impl { RT::PiProgram &getHandleRef() { return Program; } const RT::PiProgram &getHandleRef() const { return Program; } - bool is_host() const { return Context.is_host(); } + bool is_host() const { return Context->is_host(); } template void compile_with_kernel_type(string_class CompileOptions = "") { @@ -210,7 +212,7 @@ class program_impl { if (is_cacheable_with_options(BuildOptions)) { IsProgramAndKernelCachingAllowed = true; Program = ProgramManager::getInstance().getBuiltPIProgram( - M, Context, KernelInfo::getName()); + M, get_context(), KernelInfo::getName()); PI_CALL(piProgramRetain)(Program); } else { create_pi_program_with_kernel_name(M, KernelInfo::getName()); @@ -237,7 +239,7 @@ class program_impl { check_device_feature_support(Devices); vector_class Devices(get_pi_devices()); PI_CALL_THROW(piProgramLink, compile_program_error)( - detail::getSyclObjImpl(Context)->getHandleRef(), Devices.size(), + Context->getHandleRef(), Devices.size(), Devices.data(), LinkOptions.c_str(), 1, &Program, nullptr, nullptr, &Program); this->LinkOptions = LinkOptions; @@ -321,7 +323,9 @@ class program_impl { return Result; } - context get_context() const { return Context; } + context get_context() const { + return createSyclObjFromImpl(Context); + } vector_class get_devices() const { return Devices; } @@ -348,8 +352,8 @@ class program_impl { const string_class &KernelName) { assert(!Program && "This program already has an encapsulated PI program"); ProgramManager &PM = ProgramManager::getInstance(); - DeviceImage &Img = PM.getDeviceImage(M, KernelName, Context); - Program = PM.createPIProgram(Img, Context); + DeviceImage &Img = PM.getDeviceImage(M, KernelName, get_context()); + Program = PM.createPIProgram(Img, get_context()); } void create_cl_program_with_source(const string_class &Source) { @@ -357,7 +361,7 @@ class program_impl { const char *Src = Source.c_str(); size_t Size = Source.size(); PI_CALL(piclProgramCreateWithSource)( - detail::getSyclObjImpl(Context)->getHandleRef(), 1, &Src, &Size, + Context->getHandleRef(), 1, &Src, &Size, &Program); } @@ -428,7 +432,7 @@ class program_impl { if (is_cacheable()) { OSModuleHandle M = OSUtil::getOSModuleHandle(AddressInThisModule); - Kernel = ProgramManager::getInstance().getOrCreateKernel(M, Context, + Kernel = ProgramManager::getInstance().getOrCreateKernel(M, get_context(), KernelName); } else { RT::PiResult Err = @@ -467,7 +471,7 @@ class program_impl { RT::PiProgram Program = nullptr; program_state State = program_state::none; - context Context; + ContextImplPtr Context; bool IsLinkable = false; vector_class Devices; string_class CompileOptions; diff --git a/sycl/include/CL/sycl/detail/queue_impl.hpp b/sycl/include/CL/sycl/detail/queue_impl.hpp index fbe48dd271183..613124f7329b6 100644 --- a/sycl/include/CL/sycl/detail/queue_impl.hpp +++ b/sycl/include/CL/sycl/detail/queue_impl.hpp @@ -24,6 +24,9 @@ namespace cl { namespace sycl { namespace detail { +using ContextImplPtr = std::shared_ptr; +using DeviceImplPtr = std::shared_ptr; + // Set max number of queues supported by FPGA RT. const size_t MaxNumQueues = 256; @@ -31,25 +34,27 @@ enum QueueOrder { Ordered, OOO }; class queue_impl { public: - queue_impl(const device &SyclDevice, async_handler AsyncHandler, + queue_impl(DeviceImplPtr Device, async_handler AsyncHandler, QueueOrder Order, const property_list &PropList) - : queue_impl(SyclDevice, context(SyclDevice), AsyncHandler, Order, - PropList){}; + : queue_impl(Device, + detail::getSyclObjImpl( + context(createSyclObjFromImpl(Device))), + AsyncHandler, Order, PropList){}; - queue_impl(const device &SyclDevice, const context &Context, + queue_impl(DeviceImplPtr Device, ContextImplPtr Context, async_handler AsyncHandler, QueueOrder Order, const property_list &PropList) - : m_Device(SyclDevice), m_Context(Context), m_AsyncHandler(AsyncHandler), - m_PropList(PropList), m_HostQueue(m_Device.is_host()), + : m_Device(Device), m_Context(Context), m_AsyncHandler(AsyncHandler), + m_PropList(PropList), m_HostQueue(m_Device->is_host()), m_OpenCLInterop(!m_HostQueue) { if (!m_HostQueue) { m_CommandQueue = createQueue(Order); } } - queue_impl(cl_command_queue CLQueue, const context &SyclContext, + queue_impl(cl_command_queue CLQueue, ContextImplPtr Context, const async_handler &AsyncHandler) - : m_Context(SyclContext), m_AsyncHandler(AsyncHandler), + : m_Context(Context), m_AsyncHandler(AsyncHandler), m_HostQueue(false), m_OpenCLInterop(true) { m_CommandQueue = pi::cast(CLQueue); @@ -58,8 +63,7 @@ class queue_impl { // TODO catch an exception and put it to list of asynchronous exceptions PI_CALL(piQueueGetInfo)(m_CommandQueue, PI_QUEUE_INFO_DEVICE, sizeof(Device), &Device, nullptr); - m_Device = - createSyclObjFromImpl(std::make_shared(Device)); + m_Device = std::make_shared(Device); // TODO catch an exception and put it to list of asynchronous exceptions PI_CALL(piQueueRetain)(m_CommandQueue); @@ -81,13 +85,13 @@ class queue_impl { "This instance of queue doesn't support OpenCL interoperability"); } - context get_context() const { return m_Context; } + context get_context() const { return createSyclObjFromImpl(m_Context); } ContextImplPtr get_context_impl() const { - return detail::getSyclObjImpl(m_Context); + return m_Context; } - device get_device() const { return m_Device; } + device get_device() const { return createSyclObjFromImpl(m_Device); } bool is_host() const { return m_HostQueue; } @@ -153,8 +157,8 @@ class queue_impl { CreationFlags |= PI_QUEUE_PROFILING_ENABLE; } RT::PiQueue Queue; - RT::PiContext Context = detail::getSyclObjImpl(m_Context)->getHandleRef(); - RT::PiDevice Device = detail::getSyclObjImpl(m_Device)->getHandleRef(); + RT::PiContext Context = m_Context->getHandleRef(); + RT::PiDevice Device = m_Device->getHandleRef(); RT::PiResult Error = PI_CALL_NOCHECK(piQueueCreate)(Context, Device, CreationFlags, &Queue); @@ -241,8 +245,8 @@ class queue_impl { // Protects all the fields that can be changed by class' methods mutex_class m_Mutex; - device m_Device; - const context m_Context; + DeviceImplPtr m_Device; + const ContextImplPtr m_Context; vector_class m_Events; exception_list m_Exceptions; const async_handler m_AsyncHandler; diff --git a/sycl/include/CL/sycl/program.hpp b/sycl/include/CL/sycl/program.hpp index 7dd529275d06c..a36c0812c03de 100644 --- a/sycl/include/CL/sycl/program.hpp +++ b/sycl/include/CL/sycl/program.hpp @@ -32,10 +32,12 @@ class program { program() = delete; explicit program(const context &context) - : impl(std::make_shared(context)) {} + : impl(std::make_shared( + detail::getSyclObjImpl(context))) {} program(const context &context, vector_class deviceList) - : impl(std::make_shared(context, deviceList)) {} + : impl(std::make_shared( + detail::getSyclObjImpl(context), deviceList)) {} program(vector_class programList, string_class linkOptions = "") { std::vector> impls; @@ -47,7 +49,8 @@ class program { program(const context &context, cl_program clProgram) : impl(std::make_shared( - context, detail::pi::cast(clProgram))) {} + detail::getSyclObjImpl(context), + detail::pi::cast(clProgram))) {} program(const program &rhs) = default; diff --git a/sycl/source/context.cpp b/sycl/source/context.cpp index e0f4f9526b759..6540c6fc9246b 100644 --- a/sycl/source/context.cpp +++ b/sycl/source/context.cpp @@ -70,5 +70,7 @@ vector_class context::get_devices() const { return impl->get_info(); } +context::context(shared_ptr_class Impl) : impl(Impl) {} + } // namespace sycl } // namespace cl diff --git a/sycl/source/detail/context_impl.cpp b/sycl/source/detail/context_impl.cpp index 7a2f8218ebdc9..457161d1c3608 100644 --- a/sycl/source/detail/context_impl.cpp +++ b/sycl/source/detail/context_impl.cpp @@ -29,7 +29,7 @@ context_impl::context_impl(const vector_class Devices, async_handler AsyncHandler) : MAsyncHandler(AsyncHandler), MDevices(Devices), MContext(nullptr), MPlatform(), MPluginInterop(true), MHostContext(false) { - MPlatform = MDevices[0].get_platform(); + MPlatform = detail::getSyclObjImpl(MDevices[0].get_platform()); vector_class DeviceIds; for (const auto &D : MDevices) { DeviceIds.push_back(getSyclObjImpl(D)->getHandleRef()); @@ -38,7 +38,7 @@ context_impl::context_impl(const vector_class Devices, PI_CALL(piContextCreate)(nullptr, DeviceIds.size(), DeviceIds.data(), nullptr, nullptr, &MContext); - MUSMDispatch.reset(new usm::USMDispatcher(MPlatform.get(), DeviceIds)); + MUSMDispatch.reset(new usm::USMDispatcher(MPlatform->get(), DeviceIds)); } context_impl::context_impl(RT::PiContext PiContext, async_handler AsyncHandler) @@ -61,7 +61,7 @@ context_impl::context_impl(RT::PiContext PiContext, async_handler AsyncHandler) createSyclObjFromImpl(std::make_shared(Dev))); } // TODO What if m_Devices if empty? m_Devices[0].get_platform() - MPlatform = platform(MDevices[0].get_platform()); + MPlatform = detail::getSyclObjImpl(MDevices[0].get_platform()); // TODO catch an exception and put it to list of asynchronous exceptions PI_CALL(piContextRetain)(MContext); } @@ -104,7 +104,7 @@ cl_uint context_impl::get_info() const { this->getHandleRef()); } template <> platform context_impl::get_info() const { - return MPlatform; + return createSyclObjFromImpl(MPlatform); } template <> vector_class diff --git a/sycl/source/detail/kernel_impl.cpp b/sycl/source/detail/kernel_impl.cpp index a27740a93cec0..63e978c6abd6f 100644 --- a/sycl/source/detail/kernel_impl.cpp +++ b/sycl/source/detail/kernel_impl.cpp @@ -19,31 +19,30 @@ namespace cl { namespace sycl { namespace detail { -kernel_impl::kernel_impl(RT::PiKernel Kernel, const context &SyclContext) - : kernel_impl(Kernel, SyclContext, - std::make_shared(SyclContext, Kernel), +kernel_impl::kernel_impl(RT::PiKernel Kernel, ContextImplPtr Context) + : kernel_impl(Kernel, Context, + std::make_shared(Context, Kernel), /*IsCreatedFromSource*/ true) {} -kernel_impl::kernel_impl(RT::PiKernel Kernel, const context &SyclContext, - std::shared_ptr ProgramImpl, +kernel_impl::kernel_impl(RT::PiKernel Kernel, ContextImplPtr ContextImpl, + ProgramImplPtr ProgramImpl, bool IsCreatedFromSource) - : MKernel(Kernel), MContext(SyclContext), + : MKernel(Kernel), MContext(ContextImpl), MProgramImpl(std::move(ProgramImpl)), MCreatedFromSource(IsCreatedFromSource) { RT::PiContext Context = nullptr; PI_CALL(piKernelGetInfo)(MKernel, CL_KERNEL_CONTEXT, sizeof(Context), &Context, nullptr); - auto ContextImpl = detail::getSyclObjImpl(SyclContext); if (ContextImpl->getHandleRef() != Context) throw cl::sycl::invalid_parameter_error( "Input context must be the same as the context of cl_kernel"); PI_CALL(piKernelRetain)(MKernel); } -kernel_impl::kernel_impl(const context &SyclContext, - std::shared_ptr ProgramImpl) - : MContext(SyclContext), MProgramImpl(std::move(ProgramImpl)) {} +kernel_impl::kernel_impl(ContextImplPtr Context, + ProgramImplPtr ProgramImpl) + : MContext(Context), MProgramImpl(std::move(ProgramImpl)) {} kernel_impl::~kernel_impl() { // TODO catch an exception and put it to list of asynchronous exceptions @@ -65,7 +64,7 @@ kernel_impl::get_info() const { } template <> context kernel_impl::get_info() const { - return MContext; + return createSyclObjFromImpl(MContext); } template <> program kernel_impl::get_info() const { diff --git a/sycl/source/detail/scheduler/scheduler.cpp b/sycl/source/detail/scheduler/scheduler.cpp index d46119b13fb23..cc749b42fa6e2 100644 --- a/sycl/source/detail/scheduler/scheduler.cpp +++ b/sycl/source/detail/scheduler/scheduler.cpp @@ -145,7 +145,8 @@ void Scheduler::releaseHostAccessor(Requirement *Req) { Scheduler::Scheduler() { sycl::device HostDevice; DefaultHostQueue = QueueImplPtr(new queue_impl( - HostDevice, /*AsyncHandler=*/{}, QueueOrder::Ordered, /*PropList=*/{})); + detail::getSyclObjImpl(HostDevice), /*AsyncHandler=*/{}, + QueueOrder::Ordered, /*PropList=*/{})); } } // namespace detail diff --git a/sycl/source/kernel.cpp b/sycl/source/kernel.cpp index 0a1772aeb463a..87c7370100828 100644 --- a/sycl/source/kernel.cpp +++ b/sycl/source/kernel.cpp @@ -15,7 +15,8 @@ namespace sycl { kernel::kernel(cl_kernel ClKernel, const context &SyclContext) : impl(std::make_shared( - detail::pi::cast(ClKernel), SyclContext)) {} + detail::pi::cast(ClKernel), + detail::getSyclObjImpl(SyclContext))) {} cl_kernel kernel::get() const { return impl->get(); } diff --git a/sycl/source/ordered_queue.cpp b/sycl/source/ordered_queue.cpp index 403656c741c0f..9cbcf56278106 100644 --- a/sycl/source/ordered_queue.cpp +++ b/sycl/source/ordered_queue.cpp @@ -26,16 +26,16 @@ ordered_queue::ordered_queue(const context &syclContext, const device &syclDevice = *std::max_element(Devs.begin(), Devs.end(), Comp); impl = std::make_shared( - syclDevice, syclContext, asyncHandler, - cl::sycl::detail::QueueOrder::Ordered, propList); + detail::getSyclObjImpl(syclDevice), detail::getSyclObjImpl(syclContext), + asyncHandler, cl::sycl::detail::QueueOrder::Ordered, propList); } ordered_queue::ordered_queue(const device &syclDevice, const async_handler &asyncHandler, const property_list &propList) { impl = std::make_shared( - syclDevice, asyncHandler, cl::sycl::detail::QueueOrder::Ordered, - propList); + detail::getSyclObjImpl(syclDevice), asyncHandler, + cl::sycl::detail::QueueOrder::Ordered, propList); } ordered_queue::ordered_queue(cl_command_queue clQueue, @@ -51,7 +51,8 @@ ordered_queue::ordered_queue(cl_command_queue clQueue, "Failed to build a sycl ordered queue from a cl OOO queue."); impl = - std::make_shared(clQueue, syclContext, asyncHandler); + std::make_shared(clQueue, + detail::getSyclObjImpl(syclContext), asyncHandler); } } // namespace sycl diff --git a/sycl/source/queue.cpp b/sycl/source/queue.cpp index 037be5b7bf892..cb6582eb95b2a 100644 --- a/sycl/source/queue.cpp +++ b/sycl/source/queue.cpp @@ -24,20 +24,22 @@ queue::queue(const context &syclContext, const device_selector &deviceSelector, const device &syclDevice = *std::max_element(Devs.begin(), Devs.end(), Comp); impl = std::make_shared( - syclDevice, syclContext, asyncHandler, cl::sycl::detail::QueueOrder::OOO, - propList); + detail::getSyclObjImpl(syclDevice), detail::getSyclObjImpl(syclContext), + asyncHandler, cl::sycl::detail::QueueOrder::OOO, propList); } queue::queue(const device &syclDevice, const async_handler &asyncHandler, const property_list &propList) { impl = std::make_shared( - syclDevice, asyncHandler, cl::sycl::detail::QueueOrder::OOO, propList); + detail::getSyclObjImpl(syclDevice), asyncHandler, + cl::sycl::detail::QueueOrder::OOO, propList); } queue::queue(cl_command_queue clQueue, const context &syclContext, const async_handler &asyncHandler) { impl = - std::make_shared(clQueue, syclContext, asyncHandler); + std::make_shared(clQueue, + detail::getSyclObjImpl(syclContext), asyncHandler); } } // namespace sycl