From 2d26bcff664828e2afdb014f6d78c9de122507e6 Mon Sep 17 00:00:00 2001 From: Dongkyun Ahn Date: Tue, 27 Jul 2021 17:47:29 -0700 Subject: [PATCH 1/7] [SYCL][ESIMD][EMU] Queue/Event handling change for esimd_cpu - Including esimd_cpu in work-around for revised queue::wait() logic same as level-zero, introduced in PR#4044 - Returning 'false' from ExecCGCommand:: producesPiEvent() predicate for esimd_cpu as no effective event is created during esimd_cpu kernel execution --- sycl/source/detail/queue_impl.cpp | 62 +++++++++++++---------- sycl/source/detail/scheduler/commands.cpp | 13 ++++- 2 files changed, 48 insertions(+), 27 deletions(-) diff --git a/sycl/source/detail/queue_impl.cpp b/sycl/source/detail/queue_impl.cpp index 33cd17500207d..39f5a26dcb518 100644 --- a/sycl/source/detail/queue_impl.cpp +++ b/sycl/source/detail/queue_impl.cpp @@ -62,9 +62,11 @@ event queue_impl::memset(const std::shared_ptr &Self, event ResEvent = prepareUSMEvent(Self, NativeEvent); // Track only if we won't be able to handle it with piQueueFinish. - // FIXME these events are stored for level zero until as a workaround, remove - // once piEventRelease no longer calls wait on the event in the plugin. - if (!MSupportOOO || getPlugin().getBackend() == backend::level_zero) + // FIXME these events are stored for level zero / esimd_cpu until as + // a workaround, remove once piEventRelease no longer calls wait on + // the event in the plugin. + if (!MSupportOOO || getPlugin().getBackend() == backend::level_zero || + getPlugin().getBackend() == backend::esimd_cpu) addSharedEvent(ResEvent); return ResEvent; } @@ -81,9 +83,11 @@ event queue_impl::memcpy(const std::shared_ptr &Self, event ResEvent = prepareUSMEvent(Self, NativeEvent); // Track only if we won't be able to handle it with piQueueFinish. - // FIXME these events are stored for level zero until as a workaround, remove - // once piEventRelease no longer calls wait on the event in the plugin. - if (!MSupportOOO || getPlugin().getBackend() == backend::level_zero) + // FIXME these events are stored for level zero / esimd_cpu until as + // a workaround, remove once piEventRelease no longer calls wait on + // the event in the plugin. + if (!MSupportOOO || getPlugin().getBackend() == backend::level_zero || + getPlugin().getBackend() == backend::esimd_cpu) addSharedEvent(ResEvent); return ResEvent; } @@ -101,9 +105,11 @@ event queue_impl::mem_advise(const std::shared_ptr &Self, event ResEvent = prepareUSMEvent(Self, NativeEvent); // Track only if we won't be able to handle it with piQueueFinish. - // FIXME these events are stored for level zero until as a workaround, remove - // once piEventRelease no longer calls wait on the event in the plugin. - if (!MSupportOOO || getPlugin().getBackend() == backend::level_zero) + // FIXME these events are stored for level zero / esimd_cpu until as + // a workaround, remove once piEventRelease no longer calls wait on + // the event in the plugin. + if (!MSupportOOO || getPlugin().getBackend() == backend::level_zero || + getPlugin().getBackend() == backend::esimd_cpu) addSharedEvent(ResEvent); return ResEvent; } @@ -112,14 +118,15 @@ void queue_impl::addEvent(const event &Event) { EventImplPtr Eimpl = getSyclObjImpl(Event); Command *Cmd = (Command *)(Eimpl->getCommand()); if (!Cmd) { - // if there is no command on the event, we cannot track it with MEventsWeak - // as that will leave it with no owner. Track in MEventsShared only if we're - // unable to call piQueueFinish during wait. - // FIXME these events are stored for level zero until as a workaround, - // remove once piEventRelease no longer calls wait on the event in the - // plugin. + // if there is no command on the event, we cannot track it with + // MEventsWeak as that will leave it with no owner. Track in + // MEventsShared only if we're unable to call piQueueFinish during + // wait. FIXME these events are stored for level zero / esimd_cpu + // until as a workaround, remove once piEventRelease no longer + // calls wait on the event in the plugin. if (is_host() || !MSupportOOO || - getPlugin().getBackend() == backend::level_zero) + getPlugin().getBackend() == backend::level_zero || + getPlugin().getBackend() == backend::esimd_cpu) addSharedEvent(Event); } else { std::weak_ptr EventWeakPtr{Eimpl}; @@ -132,10 +139,11 @@ void queue_impl::addEvent(const event &Event) { /// but some events have no other owner. In this case, /// addSharedEvent will have the queue track the events via a shared pointer. void queue_impl::addSharedEvent(const event &Event) { - // FIXME The assertion should be corrected once the Level Zero workaround is - // removed. + // FIXME The assertion should be corrected once the Level Zero / + // ESIMD_CPU workaround is removed. assert(is_host() || !MSupportOOO || - getPlugin().getBackend() == backend::level_zero); + getPlugin().getBackend() == backend::level_zero || + getPlugin().getBackend() == backend::esimd_cpu); std::lock_guard Lock(MMutex); // Events stored in MEventsShared are not released anywhere else aside from // calls to queue::wait/wait_and_throw, which a user application might not @@ -268,9 +276,10 @@ void queue_impl::wait(const detail::code_location &CodeLoc) { // directly. Otherwise, only wait for unenqueued or host task events, starting // from the latest submitted task in order to minimize total amount of calls, // then handle the rest with piQueueFinish. - // TODO the new workflow has worse performance with Level Zero, keep the old - // behavior until this is addressed - if (!is_host() && getPlugin().getBackend() == backend::level_zero) { + // TODO the new workflow has worse performance with Level Zero / + // ESIMD_CPU, keep the old behavior until this is addressed + if (!is_host() && (getPlugin().getBackend() == backend::level_zero || + getPlugin().getBackend() == backend::esimd_cpu)) { for (std::weak_ptr &EventImplWeakPtr : WeakEvents) if (std::shared_ptr EventImplSharedPtr = EventImplWeakPtr.lock()) @@ -298,10 +307,11 @@ void queue_impl::wait(const detail::code_location &CodeLoc) { if (std::shared_ptr EventImplSharedPtr = EventImplWeakPtr.lock()) EventImplSharedPtr->cleanupCommand(EventImplSharedPtr); - // FIXME these events are stored for level zero until as a workaround, - // remove once piEventRelease no longer calls wait on the event in the - // plugin. - if (Plugin.getBackend() == backend::level_zero) { + // FIXME these events are stored for level zero / esimd_cpu + // until as a workaround, remove once piEventRelease no longer + // calls wait on the event in the plugin. + if (Plugin.getBackend() == backend::level_zero || + Plugin.getBackend() == backend::esimd_cpu) { SharedEvents.clear(); } assert(SharedEvents.empty() && diff --git a/sycl/source/detail/scheduler/commands.cpp b/sycl/source/detail/scheduler/commands.cpp index 5bdf616c9c33b..301fdc9458488 100644 --- a/sycl/source/detail/scheduler/commands.cpp +++ b/sycl/source/detail/scheduler/commands.cpp @@ -2206,7 +2206,18 @@ cl_int ExecCGCommand::enqueueImp() { } bool ExecCGCommand::producesPiEvent() const { - return MCommandGroup->getType() != CG::CGType::CodeplayHostTask; + if (MQueue->getPlugin().getBackend() == backend::esimd_cpu) { + // TODO : Enable event creation and handling. As of ESIMD_CPU + // bring-up stage, only 'piEnqueueMemBufferRead' and + // 'piEnqueueMemImageRead' request event creation, but esimd_cpu + // plug-in creates dummy event that is ignored during + // 'piEventsWait' as those read operations are done by CPU without + // any external devices like GPU/FPGA. + return false; + } else { + return MCommandGroup->getType() != CG::CGType::CodeplayHostTask; + } + } } // namespace detail From c291db3126774fc114a4614b5cbf361576a5b816 Mon Sep 17 00:00:00 2001 From: Dongkyun Ahn Date: Tue, 27 Jul 2021 18:11:54 -0700 Subject: [PATCH 2/7] clang-format error fix --- sycl/source/detail/scheduler/commands.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/sycl/source/detail/scheduler/commands.cpp b/sycl/source/detail/scheduler/commands.cpp index 301fdc9458488..934af5f6c5f44 100644 --- a/sycl/source/detail/scheduler/commands.cpp +++ b/sycl/source/detail/scheduler/commands.cpp @@ -2217,7 +2217,6 @@ bool ExecCGCommand::producesPiEvent() const { } else { return MCommandGroup->getType() != CG::CGType::CodeplayHostTask; } - } } // namespace detail From 1987a64c95eefb0467c942613aaaa1dccddb2969 Mon Sep 17 00:00:00 2001 From: Dongkyun Ahn Date: Fri, 27 Aug 2021 11:23:06 -0700 Subject: [PATCH 3/7] Reverting changes applied in queue_impl.cpp --- sycl/source/detail/queue_impl.cpp | 62 +++++++++++++------------------ 1 file changed, 26 insertions(+), 36 deletions(-) diff --git a/sycl/source/detail/queue_impl.cpp b/sycl/source/detail/queue_impl.cpp index 03e5e0bcad575..40d30f7f7acc0 100644 --- a/sycl/source/detail/queue_impl.cpp +++ b/sycl/source/detail/queue_impl.cpp @@ -63,11 +63,9 @@ event queue_impl::memset(const std::shared_ptr &Self, event ResEvent = prepareUSMEvent(Self, NativeEvent); // Track only if we won't be able to handle it with piQueueFinish. - // FIXME these events are stored for level zero / esimd_cpu until as - // a workaround, remove once piEventRelease no longer calls wait on - // the event in the plugin. - if (!MSupportOOO || getPlugin().getBackend() == backend::level_zero || - getPlugin().getBackend() == backend::esimd_cpu) + // FIXME these events are stored for level zero until as a workaround, remove + // once piEventRelease no longer calls wait on the event in the plugin. + if (!MSupportOOO || getPlugin().getBackend() == backend::level_zero) addSharedEvent(ResEvent); return ResEvent; } @@ -84,11 +82,9 @@ event queue_impl::memcpy(const std::shared_ptr &Self, event ResEvent = prepareUSMEvent(Self, NativeEvent); // Track only if we won't be able to handle it with piQueueFinish. - // FIXME these events are stored for level zero / esimd_cpu until as - // a workaround, remove once piEventRelease no longer calls wait on - // the event in the plugin. - if (!MSupportOOO || getPlugin().getBackend() == backend::level_zero || - getPlugin().getBackend() == backend::esimd_cpu) + // FIXME these events are stored for level zero until as a workaround, remove + // once piEventRelease no longer calls wait on the event in the plugin. + if (!MSupportOOO || getPlugin().getBackend() == backend::level_zero) addSharedEvent(ResEvent); return ResEvent; } @@ -106,11 +102,9 @@ event queue_impl::mem_advise(const std::shared_ptr &Self, event ResEvent = prepareUSMEvent(Self, NativeEvent); // Track only if we won't be able to handle it with piQueueFinish. - // FIXME these events are stored for level zero / esimd_cpu until as - // a workaround, remove once piEventRelease no longer calls wait on - // the event in the plugin. - if (!MSupportOOO || getPlugin().getBackend() == backend::level_zero || - getPlugin().getBackend() == backend::esimd_cpu) + // FIXME these events are stored for level zero until as a workaround, remove + // once piEventRelease no longer calls wait on the event in the plugin. + if (!MSupportOOO || getPlugin().getBackend() == backend::level_zero) addSharedEvent(ResEvent); return ResEvent; } @@ -119,15 +113,14 @@ void queue_impl::addEvent(const event &Event) { EventImplPtr Eimpl = getSyclObjImpl(Event); Command *Cmd = (Command *)(Eimpl->getCommand()); if (!Cmd) { - // if there is no command on the event, we cannot track it with - // MEventsWeak as that will leave it with no owner. Track in - // MEventsShared only if we're unable to call piQueueFinish during - // wait. FIXME these events are stored for level zero / esimd_cpu - // until as a workaround, remove once piEventRelease no longer - // calls wait on the event in the plugin. + // if there is no command on the event, we cannot track it with MEventsWeak + // as that will leave it with no owner. Track in MEventsShared only if we're + // unable to call piQueueFinish during wait. + // FIXME these events are stored for level zero until as a workaround, + // remove once piEventRelease no longer calls wait on the event in the + // plugin. if (is_host() || !MSupportOOO || - getPlugin().getBackend() == backend::level_zero || - getPlugin().getBackend() == backend::esimd_cpu) + getPlugin().getBackend() == backend::level_zero) addSharedEvent(Event); } else { std::weak_ptr EventWeakPtr{Eimpl}; @@ -140,11 +133,10 @@ void queue_impl::addEvent(const event &Event) { /// but some events have no other owner. In this case, /// addSharedEvent will have the queue track the events via a shared pointer. void queue_impl::addSharedEvent(const event &Event) { - // FIXME The assertion should be corrected once the Level Zero / - // ESIMD_CPU workaround is removed. + // FIXME The assertion should be corrected once the Level Zero workaround is + // removed. assert(is_host() || !MSupportOOO || - getPlugin().getBackend() == backend::level_zero || - getPlugin().getBackend() == backend::esimd_cpu); + getPlugin().getBackend() == backend::level_zero); std::lock_guard Lock(MMutex); // Events stored in MEventsShared are not released anywhere else aside from // calls to queue::wait/wait_and_throw, which a user application might not @@ -277,10 +269,9 @@ void queue_impl::wait(const detail::code_location &CodeLoc) { // directly. Otherwise, only wait for unenqueued or host task events, starting // from the latest submitted task in order to minimize total amount of calls, // then handle the rest with piQueueFinish. - // TODO the new workflow has worse performance with Level Zero / - // ESIMD_CPU, keep the old behavior until this is addressed - if (!is_host() && (getPlugin().getBackend() == backend::level_zero || - getPlugin().getBackend() == backend::esimd_cpu)) { + // TODO the new workflow has worse performance with Level Zero, keep the old + // behavior until this is addressed + if (!is_host() && getPlugin().getBackend() == backend::level_zero) { for (std::weak_ptr &EventImplWeakPtr : WeakEvents) if (std::shared_ptr EventImplSharedPtr = EventImplWeakPtr.lock()) @@ -308,11 +299,10 @@ void queue_impl::wait(const detail::code_location &CodeLoc) { if (std::shared_ptr EventImplSharedPtr = EventImplWeakPtr.lock()) EventImplSharedPtr->cleanupCommand(EventImplSharedPtr); - // FIXME these events are stored for level zero / esimd_cpu - // until as a workaround, remove once piEventRelease no longer - // calls wait on the event in the plugin. - if (Plugin.getBackend() == backend::level_zero || - Plugin.getBackend() == backend::esimd_cpu) { + // FIXME these events are stored for level zero until as a workaround, + // remove once piEventRelease no longer calls wait on the event in the + // plugin. + if (Plugin.getBackend() == backend::level_zero) { SharedEvents.clear(); } assert(SharedEvents.empty() && From e309c7fbdcbc3b123e07deed906fa25d467b5990 Mon Sep 17 00:00:00 2001 From: Dongkyun Ahn Date: Fri, 27 Aug 2021 11:26:52 -0700 Subject: [PATCH 4/7] Support only in-order queue for pi_esimd_cpu --- sycl/plugins/esimd_cpu/pi_esimd_cpu.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/sycl/plugins/esimd_cpu/pi_esimd_cpu.cpp b/sycl/plugins/esimd_cpu/pi_esimd_cpu.cpp index b98f18f393148..41cbde923aea1 100644 --- a/sycl/plugins/esimd_cpu/pi_esimd_cpu.cpp +++ b/sycl/plugins/esimd_cpu/pi_esimd_cpu.cpp @@ -351,7 +351,8 @@ extern "C" { std::cerr << "Warning : Not Implemented : " << __FUNCTION__ \ << " - File : " << __FILE__; \ std::cerr << " / Line : " << __LINE__ << std::endl; \ - } + } \ + return PI_SUCCESS; pi_result piPlatformsGet(pi_uint32 NumEntries, pi_platform *Platforms, pi_uint32 *NumPlatforms) { @@ -684,6 +685,12 @@ pi_result piContextRelease(pi_context Context) { pi_result piQueueCreate(pi_context Context, pi_device Device, pi_queue_properties Properties, pi_queue *Queue) { + if (Properties & PI_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE) { + // TODO : Support Out-of-order Queue with piQueueFinish + *Queue = nullptr; + return PI_INVALID_QUEUE_PROPERTIES; + } + cm_support::CmQueue *CmQueue; int Result = Context->Device->CmDevicePtr->CreateQueue(CmQueue); @@ -729,7 +736,9 @@ pi_result piQueueRelease(pi_queue Queue) { } pi_result piQueueFinish(pi_queue) { - DIE_NO_IMPLEMENTATION; + // TODO/FIXME : Only in-order queue is called for this API. Support + // Out-of-order Queue with piQueueCreate + CONTINUE_NO_IMPLEMENTATION; } pi_result piextQueueGetNativeHandle(pi_queue, pi_native_handle *) { From 65d39cdfa28f72a87c74b033a0ac15f2ccf39da9 Mon Sep 17 00:00:00 2001 From: Dongkyun Ahn Date: Tue, 31 Aug 2021 09:23:38 -0700 Subject: [PATCH 5/7] Update in event creation - Event creation is imported from pi_cuda.cpp - Special handling for esimd_cpu in ExecCGCommand::producesPiEvent() (commands.cpp) is removed --- sycl/plugins/esimd_cpu/pi_esimd_cpu.cpp | 60 +++++++++++++---------- sycl/source/detail/scheduler/commands.cpp | 12 +---- 2 files changed, 34 insertions(+), 38 deletions(-) diff --git a/sycl/plugins/esimd_cpu/pi_esimd_cpu.cpp b/sycl/plugins/esimd_cpu/pi_esimd_cpu.cpp index 41cbde923aea1..cbb6cf39aa435 100644 --- a/sycl/plugins/esimd_cpu/pi_esimd_cpu.cpp +++ b/sycl/plugins/esimd_cpu/pi_esimd_cpu.cpp @@ -1199,6 +1199,12 @@ pi_result piEnqueueMemBufferRead(pi_queue Queue, pi_mem Src, _pi_buffer *buf = static_cast<_pi_buffer *>(Src); + std::unique_ptr<_pi_event> RetEv{nullptr}; + if (Event) { + RetEv = std::unique_ptr<_pi_event>(new _pi_event()); + RetEv->IsDummyEvent=true; + } + int Status = buf->CmBufferPtr->ReadSurface(reinterpret_cast(Dst), nullptr, // event @@ -1209,18 +1215,7 @@ pi_result piEnqueueMemBufferRead(pi_queue Queue, pi_mem Src, } if (Event) { - try { - *Event = new _pi_event(); - } catch (const std::bad_alloc &) { - return PI_OUT_OF_HOST_MEMORY; - } catch (...) { - return PI_ERROR_UNKNOWN; - } - - // At this point, CM already completed buffer-read (ReadSurface) - // operation. Therefore, 'event' corresponding to this operation - // is marked as dummy one and ignored during events-waiting. - (*Event)->IsDummyEvent = true; + *Event = RetEv.release(); } return PI_SUCCESS; @@ -1295,6 +1290,14 @@ pi_result piEnqueueMemImageRead(pi_queue CommandQueue, pi_mem Image, assert(false && "ESIMD_CPU does not support Blocking Read"); } _pi_image *PiImg = static_cast<_pi_image *>(Image); + + std::unique_ptr<_pi_event> RetEv{nullptr}; + + if (Event) { + RetEv = std::unique_ptr<_pi_event>(new _pi_event()); + RetEv->IsDummyEvent=true; + } + int Status = PiImg->CmSurfacePtr->ReadSurface(reinterpret_cast(Ptr), nullptr, // event @@ -1304,18 +1307,7 @@ pi_result piEnqueueMemImageRead(pi_queue CommandQueue, pi_mem Image, } if (Event) { - try { - *Event = new _pi_event(); - } catch (const std::bad_alloc &) { - return PI_OUT_OF_HOST_MEMORY; - } catch (...) { - return PI_ERROR_UNKNOWN; - } - - // At this point, CM already completed image-read (ReadSurface) - // operation. Therefore, 'event' corresponding to this operation - // is marked as dummy one and ignored during events-waiting. - (*Event)->IsDummyEvent = true; + *Event = RetEv.release(); } return PI_SUCCESS; } @@ -1369,25 +1361,39 @@ piEnqueueKernelLaunch(pi_queue Queue, pi_kernel Kernel, pi_uint32 WorkDim, } } + std::unique_ptr<_pi_event> RetEv{nullptr}; + + if (Event) { + RetEv = std::unique_ptr<_pi_event>(new _pi_event()); + RetEv->IsDummyEvent=true; + } + switch (WorkDim) { case 1: InvokeImpl<1>::invoke(Kernel, GlobalWorkOffset, GlobalWorkSize, LocalWorkSize); - return PI_SUCCESS; + break; case 2: InvokeImpl<2>::invoke(Kernel, GlobalWorkOffset, GlobalWorkSize, LocalWorkSize); - return PI_SUCCESS; + break; case 3: InvokeImpl<3>::invoke(Kernel, GlobalWorkOffset, GlobalWorkSize, LocalWorkSize); - return PI_SUCCESS; + break; default: DIE_NO_IMPLEMENTATION; + break; + } + + if (Event) { + *Event = RetEv.release(); } + + return PI_SUCCESS; } pi_result piextKernelCreateWithNativeHandle(pi_native_handle, pi_context, bool, diff --git a/sycl/source/detail/scheduler/commands.cpp b/sycl/source/detail/scheduler/commands.cpp index 03cb7b4e9825c..a162bcce206e0 100644 --- a/sycl/source/detail/scheduler/commands.cpp +++ b/sycl/source/detail/scheduler/commands.cpp @@ -2256,17 +2256,7 @@ cl_int ExecCGCommand::enqueueImp() { } bool ExecCGCommand::producesPiEvent() const { - if (MQueue->getPlugin().getBackend() == backend::esimd_cpu) { - // TODO : Enable event creation and handling. As of ESIMD_CPU - // bring-up stage, only 'piEnqueueMemBufferRead' and - // 'piEnqueueMemImageRead' request event creation, but esimd_cpu - // plug-in creates dummy event that is ignored during - // 'piEventsWait' as those read operations are done by CPU without - // any external devices like GPU/FPGA. - return false; - } else { - return MCommandGroup->getType() != CG::CGTYPE::CodeplayHostTask; - } + return MCommandGroup->getType() != CG::CGTYPE::CodeplayHostTask; } } // namespace detail From 605bd5e88defdc96d1a3eab54b147167c2ecd69a Mon Sep 17 00:00:00 2001 From: Dongkyun Ahn Date: Tue, 31 Aug 2021 11:15:19 -0700 Subject: [PATCH 6/7] clang-format error fix --- sycl/plugins/esimd_cpu/pi_esimd_cpu.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sycl/plugins/esimd_cpu/pi_esimd_cpu.cpp b/sycl/plugins/esimd_cpu/pi_esimd_cpu.cpp index cbb6cf39aa435..f6c990791f718 100644 --- a/sycl/plugins/esimd_cpu/pi_esimd_cpu.cpp +++ b/sycl/plugins/esimd_cpu/pi_esimd_cpu.cpp @@ -1202,7 +1202,7 @@ pi_result piEnqueueMemBufferRead(pi_queue Queue, pi_mem Src, std::unique_ptr<_pi_event> RetEv{nullptr}; if (Event) { RetEv = std::unique_ptr<_pi_event>(new _pi_event()); - RetEv->IsDummyEvent=true; + RetEv->IsDummyEvent = true; } int Status = @@ -1295,7 +1295,7 @@ pi_result piEnqueueMemImageRead(pi_queue CommandQueue, pi_mem Image, if (Event) { RetEv = std::unique_ptr<_pi_event>(new _pi_event()); - RetEv->IsDummyEvent=true; + RetEv->IsDummyEvent = true; } int Status = @@ -1365,7 +1365,7 @@ piEnqueueKernelLaunch(pi_queue Queue, pi_kernel Kernel, pi_uint32 WorkDim, if (Event) { RetEv = std::unique_ptr<_pi_event>(new _pi_event()); - RetEv->IsDummyEvent=true; + RetEv->IsDummyEvent = true; } switch (WorkDim) { From a26379aef85bbadd2822c2696f14b98b86f5e9d1 Mon Sep 17 00:00:00 2001 From: Dongkyun Ahn Date: Tue, 31 Aug 2021 17:49:30 -0700 Subject: [PATCH 7/7] Comment change per review comment --- sycl/plugins/esimd_cpu/pi_esimd_cpu.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sycl/plugins/esimd_cpu/pi_esimd_cpu.cpp b/sycl/plugins/esimd_cpu/pi_esimd_cpu.cpp index f6c990791f718..1035c05e23caa 100644 --- a/sycl/plugins/esimd_cpu/pi_esimd_cpu.cpp +++ b/sycl/plugins/esimd_cpu/pi_esimd_cpu.cpp @@ -686,7 +686,7 @@ pi_result piContextRelease(pi_context Context) { pi_result piQueueCreate(pi_context Context, pi_device Device, pi_queue_properties Properties, pi_queue *Queue) { if (Properties & PI_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE) { - // TODO : Support Out-of-order Queue with piQueueFinish + // TODO : Support Out-of-order Queue *Queue = nullptr; return PI_INVALID_QUEUE_PROPERTIES; } @@ -736,8 +736,9 @@ pi_result piQueueRelease(pi_queue Queue) { } pi_result piQueueFinish(pi_queue) { - // TODO/FIXME : Only in-order queue is called for this API. Support - // Out-of-order Queue with piQueueCreate + // No-op as enqueued commands with ESIMD_CPU plugin are blocking + // ones that do not return until their completion - kernel execution + // and memory read. CONTINUE_NO_IMPLEMENTATION; }