From fa6c7741c4f31baeeaefe6405eeb13ca02f5ca93 Mon Sep 17 00:00:00 2001 From: "Tikhomirova, Kseniya" Date: Fri, 11 Feb 2022 15:26:51 +0300 Subject: [PATCH 1/6] Fix sync of host task vs kernel for in-order queue Signed-off-by: Tikhomirova, Kseniya --- sycl/source/detail/queue_impl.hpp | 21 ++- .../scheduler/InOrderQueueHostTaskDeps.cpp | 138 ++++++++++++++++++ 2 files changed, 156 insertions(+), 3 deletions(-) diff --git a/sycl/source/detail/queue_impl.hpp b/sycl/source/detail/queue_impl.hpp index a2d24846ba555..a9a5656d04863 100644 --- a/sycl/source/detail/queue_impl.hpp +++ b/sycl/source/detail/queue_impl.hpp @@ -443,19 +443,30 @@ class queue_impl { void finalizeHandler(handler &Handler, const CG::CGTYPE &Type, event &EventRet) { if (MIsInorder) { - bool NeedSeparateDependencyMgmt = - (Type == CG::CGTYPE::CodeplayHostTask || - Type == CG::CGTYPE::CodeplayInteropTask); + + auto IsExpDepManaged = [](const CG::CGTYPE &Type) { + return (Type == CG::CGTYPE::CodeplayHostTask || + Type == CG::CGTYPE::CodeplayInteropTask); + }; + // Accessing and changing of an event isn't atomic operation. // Hence, here is the lock for thread-safety. std::lock_guard Lock{MLastEventMtx}; + if (MLastCGType == CG::CGTYPE::None) + MLastCGType = Type; + // Also handles case when sync model changes. E.g. Last is host, new is + // kernel. + bool NeedSeparateDependencyMgmt = + IsExpDepManaged(Type) || IsExpDepManaged(MLastCGType); + if (NeedSeparateDependencyMgmt) Handler.depends_on(MLastEvent); EventRet = Handler.finalize(); MLastEvent = EventRet; + MLastCGType = Type; } else EventRet = Handler.finalize(); } @@ -560,6 +571,10 @@ class queue_impl { // Access to the event should be guarded with MLastEventMtx event MLastEvent; std::mutex MLastEventMtx; + // Used for in-order queues in pair with MLastEvent + // Host tasks is explicitly synchronized in RT, pi tasks - implicitly by + // backend Using type to setup explicit sync between host and pi tasks. + CG::CGTYPE MLastCGType = CG::CGTYPE::None; const bool MIsInorder; diff --git a/sycl/unittests/scheduler/InOrderQueueHostTaskDeps.cpp b/sycl/unittests/scheduler/InOrderQueueHostTaskDeps.cpp index 99a12427c5e7a..a7ccf8d129189 100644 --- a/sycl/unittests/scheduler/InOrderQueueHostTaskDeps.cpp +++ b/sycl/unittests/scheduler/InOrderQueueHostTaskDeps.cpp @@ -13,22 +13,34 @@ #include #include +#include #include #include #include +#include #include +#include +#include + using namespace sycl; +inline constexpr auto DisablePostEnqueueCleanupName = + "SYCL_DISABLE_POST_ENQUEUE_CLEANUP"; + size_t GEventsWaitCounter = 0; +std::map UniqueEvents; inline pi_result redefinedEventsWait(pi_uint32 num_events, const pi_event *event_list) { if (num_events > 0) { GEventsWaitCounter++; + while (num_events--) + UniqueEvents[event_list[num_events]]++; } + return PI_SUCCESS; } @@ -57,6 +69,7 @@ TEST_F(SchedulerTest, InOrderQueueHostTaskDeps) { sycl::get_kernel_bundle(Ctx); auto ExecBundle = sycl::build(KernelBundle); + // kernel, host_task event Evt = InOrderQueue.submit([&](sycl::handler &CGH) { CGH.use_kernel_bundle(ExecBundle); CGH.single_task([] {}); @@ -70,3 +83,128 @@ TEST_F(SchedulerTest, InOrderQueueHostTaskDeps) { EXPECT_TRUE(GEventsWaitCounter == 1); } + +inline pi_result redefinedEnqueueKernelLaunch(pi_queue, pi_kernel, pi_uint32, + const size_t *, const size_t *, + const size_t *, + pi_uint32 pi_event_list_size, + const pi_event *, + pi_event *event) { + EXPECT_TRUE(pi_event_list_size == 0); + *event = reinterpret_cast(new int{}); + return PI_SUCCESS; +} + +// Test for in-order queue event dependencies. +// Host vs host are synced explicitly by RT using events. +// e.g. Kernel vs kernel (mem read/write and other) are synced implicitly by +// backend. Host vs kernel should be also synced by events. +TEST_F(SchedulerTest, InOrderQueueHostTaskDepsExt) { + // Prevent post enqueue cleanup from deleting commands. + unittest::ScopedEnvVar DisabledCleanup{ + DisablePostEnqueueCleanupName, "1", + detail::SYCLConfig::reset}; + + default_selector Selector; + platform Plt{default_selector()}; + if (Plt.is_host()) { + std::cout << "Not run due to host-only environment\n"; + return; + } + // This test only contains device image for SPIR-V capable devices. + if (Plt.get_backend() != sycl::backend::opencl && + Plt.get_backend() != sycl::backend::ext_oneapi_level_zero) { + std::cout << "Only OpenCL and Level Zero are supported for this test\n"; + return; + } + + unittest::PiMock Mock{Plt}; + setupDefaultMockAPIs(Mock); + Mock.redefine(redefinedEventsWait); + Mock.redefine( + redefinedEnqueueKernelLaunch); + + context Ctx{Plt}; + queue InOrderQueue{Ctx, Selector, property::queue::in_order()}; + + kernel_bundle KernelBundle = + sycl::get_kernel_bundle(Ctx); + auto ExecBundle = sycl::build(KernelBundle); + + GEventsWaitCounter = 0; + // host task, 1st command + + event HostTaskEvent1 = InOrderQueue.submit([&](sycl::handler &CGH) { + CGH.use_kernel_bundle(ExecBundle); + CGH.host_task([=] {}); + }); + + std::shared_ptr HostTaskEventImpl1 = + detail::getSyclObjImpl(HostTaskEvent1); + ASSERT_NE(HostTaskEventImpl1, nullptr); + auto *HostCmd1 = + static_cast(HostTaskEventImpl1->getCommand()); + ASSERT_NE(HostCmd1, nullptr); + // MLastEvent -> +1 host event + EXPECT_EQ(HostCmd1->getPreparedHostDepsEvents().size(), size_t(1)); + + // kernel, 2nd command + + // Needs mem requirement to avoid cleanup after addCG + buffer buf2{range<1>(1)}; + event SingleTaskEvent2 = InOrderQueue.submit([&](sycl::handler &CGH) { + auto acc = buf2.template get_access(CGH); + CGH.use_kernel_bundle(ExecBundle); + CGH.single_task([=] { (void)acc; }); + }); + + std::shared_ptr SingleTaskEventImpl2 = + detail::getSyclObjImpl(SingleTaskEvent2); + ASSERT_NE(SingleTaskEventImpl2, nullptr); + auto *SingleCmd2 = + static_cast(SingleTaskEventImpl2->getCommand()); + // 1st event is added in scheduler because of requirement presence + // 2nd event is a dependency on host task + ASSERT_NE(SingleCmd2, nullptr); + EXPECT_EQ(SingleCmd2->getPreparedHostDepsEvents().size(), size_t(2)); + + // kernel, 3rd command + + buffer buf3{range<1>(1)}; + event SingleTaskEventSecond3 = InOrderQueue.submit([&](sycl::handler &CGH) { + auto acc = buf3.template get_access(CGH); + CGH.use_kernel_bundle(ExecBundle); + CGH.single_task([=] { (void)acc; }); + }); + // pi events absence between kernels is checked by redefined pi calls + std::shared_ptr SingleTaskEventSecondImpl3 = + detail::getSyclObjImpl(SingleTaskEventSecond3); + ASSERT_NE(SingleTaskEventSecondImpl3, nullptr); + auto *SingleCmdSecond3 = + static_cast(SingleTaskEventSecondImpl3->getCommand()); + // 1st event is added in scheduler because of requirement presence + ASSERT_NE(SingleCmdSecond3, nullptr); + EXPECT_EQ(SingleCmdSecond3->getPreparedHostDepsEvents().size(), size_t(1)); + + // host, 4th command + event HostTaskEvent4 = InOrderQueue.submit([&](sycl::handler &CGH) { + CGH.use_kernel_bundle(ExecBundle); + CGH.host_task([=] {}); + }); + + std::shared_ptr HostTaskEventImpl4 = + detail::getSyclObjImpl(HostTaskEvent4); + ASSERT_NE(HostTaskEventImpl4, nullptr); + auto *HostCmd4 = + static_cast(HostTaskEventImpl4->getCommand()); + ASSERT_NE(HostCmd4, nullptr); + + // host should have dependency on pi events - to be checked by UniqueEvents + // counter + EXPECT_EQ(HostCmd4->getPreparedHostDepsEvents().size(), size_t(0)); + + HostTaskEvent4.wait(); + + EXPECT_TRUE(GEventsWaitCounter == 1); + EXPECT_EQ(UniqueEvents.size(), size_t(2)); +} From ecf2fdb28c10174f3ed4e6aa0c5dcaddb72efd58 Mon Sep 17 00:00:00 2001 From: "Tikhomirova, Kseniya" Date: Fri, 11 Feb 2022 15:32:41 +0300 Subject: [PATCH 2/6] Tiny code fixes: comments and extra header removal Signed-off-by: Tikhomirova, Kseniya --- sycl/source/detail/queue_impl.hpp | 2 +- sycl/unittests/scheduler/InOrderQueueHostTaskDeps.cpp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/sycl/source/detail/queue_impl.hpp b/sycl/source/detail/queue_impl.hpp index a9a5656d04863..45df79abb61f3 100644 --- a/sycl/source/detail/queue_impl.hpp +++ b/sycl/source/detail/queue_impl.hpp @@ -573,7 +573,7 @@ class queue_impl { std::mutex MLastEventMtx; // Used for in-order queues in pair with MLastEvent // Host tasks is explicitly synchronized in RT, pi tasks - implicitly by - // backend Using type to setup explicit sync between host and pi tasks. + // backend. Using type to setup explicit sync between host and pi tasks. CG::CGTYPE MLastCGType = CG::CGTYPE::None; const bool MIsInorder; diff --git a/sycl/unittests/scheduler/InOrderQueueHostTaskDeps.cpp b/sycl/unittests/scheduler/InOrderQueueHostTaskDeps.cpp index a7ccf8d129189..58d5d64dd79ea 100644 --- a/sycl/unittests/scheduler/InOrderQueueHostTaskDeps.cpp +++ b/sycl/unittests/scheduler/InOrderQueueHostTaskDeps.cpp @@ -22,7 +22,6 @@ #include #include -#include #include using namespace sycl; From b3f0555cb4eec987406f83788024a5730c15851e Mon Sep 17 00:00:00 2001 From: "Tikhomirova, Kseniya" Date: Mon, 14 Feb 2022 18:18:45 +0300 Subject: [PATCH 3/6] Redesign test to verify single finalizeHandler function Signed-off-by: Tikhomirova, Kseniya --- sycl/source/detail/queue_impl.hpp | 6 +- sycl/unittests/scheduler/CMakeLists.txt | 1 + .../scheduler/InOrderQueueHostTaskDeps.cpp | 137 ------------------ .../scheduler/InOrderQueueSyncCheck.cpp | 106 ++++++++++++++ 4 files changed, 111 insertions(+), 139 deletions(-) create mode 100644 sycl/unittests/scheduler/InOrderQueueSyncCheck.cpp diff --git a/sycl/source/detail/queue_impl.hpp b/sycl/source/detail/queue_impl.hpp index 45df79abb61f3..c90c7daee3376 100644 --- a/sycl/source/detail/queue_impl.hpp +++ b/sycl/source/detail/queue_impl.hpp @@ -439,8 +439,9 @@ class queue_impl { return MAssertHappenedBuffer; } -private: - void finalizeHandler(handler &Handler, const CG::CGTYPE &Type, +protected: + template + void finalizeHandler(HandlerType &Handler, const CG::CGTYPE &Type, event &EventRet) { if (MIsInorder) { @@ -471,6 +472,7 @@ class queue_impl { EventRet = Handler.finalize(); } +private: /// Performs command group submission to the queue. /// /// \param CGF is a function object containing command group. diff --git a/sycl/unittests/scheduler/CMakeLists.txt b/sycl/unittests/scheduler/CMakeLists.txt index 759df4076d13d..98518b2229274 100644 --- a/sycl/unittests/scheduler/CMakeLists.txt +++ b/sycl/unittests/scheduler/CMakeLists.txt @@ -20,4 +20,5 @@ add_sycl_unittest(SchedulerTests OBJECT Regression.cpp utils.cpp LeafLimitDiffContexts.cpp + InOrderQueueSyncCheck.cpp ) diff --git a/sycl/unittests/scheduler/InOrderQueueHostTaskDeps.cpp b/sycl/unittests/scheduler/InOrderQueueHostTaskDeps.cpp index 58d5d64dd79ea..99a12427c5e7a 100644 --- a/sycl/unittests/scheduler/InOrderQueueHostTaskDeps.cpp +++ b/sycl/unittests/scheduler/InOrderQueueHostTaskDeps.cpp @@ -13,33 +13,22 @@ #include #include -#include #include #include #include -#include #include -#include - using namespace sycl; -inline constexpr auto DisablePostEnqueueCleanupName = - "SYCL_DISABLE_POST_ENQUEUE_CLEANUP"; - size_t GEventsWaitCounter = 0; -std::map UniqueEvents; inline pi_result redefinedEventsWait(pi_uint32 num_events, const pi_event *event_list) { if (num_events > 0) { GEventsWaitCounter++; - while (num_events--) - UniqueEvents[event_list[num_events]]++; } - return PI_SUCCESS; } @@ -68,7 +57,6 @@ TEST_F(SchedulerTest, InOrderQueueHostTaskDeps) { sycl::get_kernel_bundle(Ctx); auto ExecBundle = sycl::build(KernelBundle); - // kernel, host_task event Evt = InOrderQueue.submit([&](sycl::handler &CGH) { CGH.use_kernel_bundle(ExecBundle); CGH.single_task([] {}); @@ -82,128 +70,3 @@ TEST_F(SchedulerTest, InOrderQueueHostTaskDeps) { EXPECT_TRUE(GEventsWaitCounter == 1); } - -inline pi_result redefinedEnqueueKernelLaunch(pi_queue, pi_kernel, pi_uint32, - const size_t *, const size_t *, - const size_t *, - pi_uint32 pi_event_list_size, - const pi_event *, - pi_event *event) { - EXPECT_TRUE(pi_event_list_size == 0); - *event = reinterpret_cast(new int{}); - return PI_SUCCESS; -} - -// Test for in-order queue event dependencies. -// Host vs host are synced explicitly by RT using events. -// e.g. Kernel vs kernel (mem read/write and other) are synced implicitly by -// backend. Host vs kernel should be also synced by events. -TEST_F(SchedulerTest, InOrderQueueHostTaskDepsExt) { - // Prevent post enqueue cleanup from deleting commands. - unittest::ScopedEnvVar DisabledCleanup{ - DisablePostEnqueueCleanupName, "1", - detail::SYCLConfig::reset}; - - default_selector Selector; - platform Plt{default_selector()}; - if (Plt.is_host()) { - std::cout << "Not run due to host-only environment\n"; - return; - } - // This test only contains device image for SPIR-V capable devices. - if (Plt.get_backend() != sycl::backend::opencl && - Plt.get_backend() != sycl::backend::ext_oneapi_level_zero) { - std::cout << "Only OpenCL and Level Zero are supported for this test\n"; - return; - } - - unittest::PiMock Mock{Plt}; - setupDefaultMockAPIs(Mock); - Mock.redefine(redefinedEventsWait); - Mock.redefine( - redefinedEnqueueKernelLaunch); - - context Ctx{Plt}; - queue InOrderQueue{Ctx, Selector, property::queue::in_order()}; - - kernel_bundle KernelBundle = - sycl::get_kernel_bundle(Ctx); - auto ExecBundle = sycl::build(KernelBundle); - - GEventsWaitCounter = 0; - // host task, 1st command - - event HostTaskEvent1 = InOrderQueue.submit([&](sycl::handler &CGH) { - CGH.use_kernel_bundle(ExecBundle); - CGH.host_task([=] {}); - }); - - std::shared_ptr HostTaskEventImpl1 = - detail::getSyclObjImpl(HostTaskEvent1); - ASSERT_NE(HostTaskEventImpl1, nullptr); - auto *HostCmd1 = - static_cast(HostTaskEventImpl1->getCommand()); - ASSERT_NE(HostCmd1, nullptr); - // MLastEvent -> +1 host event - EXPECT_EQ(HostCmd1->getPreparedHostDepsEvents().size(), size_t(1)); - - // kernel, 2nd command - - // Needs mem requirement to avoid cleanup after addCG - buffer buf2{range<1>(1)}; - event SingleTaskEvent2 = InOrderQueue.submit([&](sycl::handler &CGH) { - auto acc = buf2.template get_access(CGH); - CGH.use_kernel_bundle(ExecBundle); - CGH.single_task([=] { (void)acc; }); - }); - - std::shared_ptr SingleTaskEventImpl2 = - detail::getSyclObjImpl(SingleTaskEvent2); - ASSERT_NE(SingleTaskEventImpl2, nullptr); - auto *SingleCmd2 = - static_cast(SingleTaskEventImpl2->getCommand()); - // 1st event is added in scheduler because of requirement presence - // 2nd event is a dependency on host task - ASSERT_NE(SingleCmd2, nullptr); - EXPECT_EQ(SingleCmd2->getPreparedHostDepsEvents().size(), size_t(2)); - - // kernel, 3rd command - - buffer buf3{range<1>(1)}; - event SingleTaskEventSecond3 = InOrderQueue.submit([&](sycl::handler &CGH) { - auto acc = buf3.template get_access(CGH); - CGH.use_kernel_bundle(ExecBundle); - CGH.single_task([=] { (void)acc; }); - }); - // pi events absence between kernels is checked by redefined pi calls - std::shared_ptr SingleTaskEventSecondImpl3 = - detail::getSyclObjImpl(SingleTaskEventSecond3); - ASSERT_NE(SingleTaskEventSecondImpl3, nullptr); - auto *SingleCmdSecond3 = - static_cast(SingleTaskEventSecondImpl3->getCommand()); - // 1st event is added in scheduler because of requirement presence - ASSERT_NE(SingleCmdSecond3, nullptr); - EXPECT_EQ(SingleCmdSecond3->getPreparedHostDepsEvents().size(), size_t(1)); - - // host, 4th command - event HostTaskEvent4 = InOrderQueue.submit([&](sycl::handler &CGH) { - CGH.use_kernel_bundle(ExecBundle); - CGH.host_task([=] {}); - }); - - std::shared_ptr HostTaskEventImpl4 = - detail::getSyclObjImpl(HostTaskEvent4); - ASSERT_NE(HostTaskEventImpl4, nullptr); - auto *HostCmd4 = - static_cast(HostTaskEventImpl4->getCommand()); - ASSERT_NE(HostCmd4, nullptr); - - // host should have dependency on pi events - to be checked by UniqueEvents - // counter - EXPECT_EQ(HostCmd4->getPreparedHostDepsEvents().size(), size_t(0)); - - HostTaskEvent4.wait(); - - EXPECT_TRUE(GEventsWaitCounter == 1); - EXPECT_EQ(UniqueEvents.size(), size_t(2)); -} diff --git a/sycl/unittests/scheduler/InOrderQueueSyncCheck.cpp b/sycl/unittests/scheduler/InOrderQueueSyncCheck.cpp new file mode 100644 index 0000000000000..973795f76d349 --- /dev/null +++ b/sycl/unittests/scheduler/InOrderQueueSyncCheck.cpp @@ -0,0 +1,106 @@ +//==------- EliminatedArgMask.cpp --- eliminated args mask unit test -------==// +// +// 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 "SchedulerTest.hpp" +#include "SchedulerTestUtils.hpp" +#include +#include +#include + +#include + +using namespace cl::sycl; + +// Define type with the only methods called by finalizeHandler +class LimitedHandler { +public: + virtual void depends_on(sycl::event){}; + + virtual event finalize() { + cl::sycl::detail::EventImplPtr NewEvent = + std::make_shared(); + return sycl::detail::createSyclObjFromImpl(NewEvent); + }; +}; + +// Needed to use EXPECT_CALL to verify depends_on that originally appends lst +// event as dependency to the new CG +class LimitedHandlerSimulation : public LimitedHandler { +public: + MOCK_METHOD1(depends_on, void(sycl::event)); +}; + +class MockQueueImpl : public sycl::detail::queue_impl { +public: + MockQueueImpl(const sycl::detail::DeviceImplPtr &Device, + const sycl::async_handler &AsyncHandler, + const sycl::property_list &PropList) + : sycl::detail::queue_impl(Device, AsyncHandler, PropList) {} + using sycl::detail::queue_impl::finalizeHandler; +}; + +// Only check events dependency in queue_impl::finalizeHandler +TEST_F(SchedulerTest, InOrderQueueSyncCheck) { + sycl::platform Plt{sycl::default_selector()}; + if (Plt.is_host() || Plt.get_backend() == sycl::backend::ext_oneapi_cuda || + Plt.get_backend() == sycl::backend::ext_oneapi_hip) { + std::cerr << "Test is not supported on " + << Plt.get_info() << ", skipping\n"; + GTEST_SKIP(); // test is not supported on selected platform. + } + + const sycl::device Dev = Plt.get_devices()[0]; + auto Queue = std::make_shared( + sycl::detail::getSyclObjImpl(Dev), sycl::async_handler{}, + sycl::property::queue::in_order()); + + // What we are testing here: + // Task type | Must depend on + // host | yes - always, separate sync management + // host | yes - always, separate sync management + // kernel | yes - change of sync approach + // kernel | no - sync between pi calls must be done by backend + // host | yes - always, separate sync management + + sycl::event Event; + // host task + { + LimitedHandlerSimulation MockCGH; + EXPECT_CALL(MockCGH, depends_on).Times(1); + Queue->finalizeHandler( + MockCGH, detail::CG::CGTYPE::CodeplayHostTask, Event); + } + // host task + { + LimitedHandlerSimulation MockCGH; + EXPECT_CALL(MockCGH, depends_on).Times(1); + Queue->finalizeHandler( + MockCGH, detail::CG::CGTYPE::CodeplayHostTask, Event); + } + // kernel task + { + LimitedHandlerSimulation MockCGH; + EXPECT_CALL(MockCGH, depends_on).Times(1); + Queue->finalizeHandler( + MockCGH, detail::CG::CGTYPE::Kernel, Event); + } + // kernel task + { + LimitedHandlerSimulation MockCGH; + EXPECT_CALL(MockCGH, depends_on).Times(0); + Queue->finalizeHandler( + MockCGH, detail::CG::CGTYPE::Kernel, Event); + } + // host task + { + LimitedHandlerSimulation MockCGH; + EXPECT_CALL(MockCGH, depends_on).Times(1); + Queue->finalizeHandler( + MockCGH, detail::CG::CGTYPE::CodeplayHostTask, Event); + } +} \ No newline at end of file From 968c8b04459745ee228b9d2c2f40f1f1b4a5558e Mon Sep 17 00:00:00 2001 From: "Tikhomirova, Kseniya" Date: Mon, 14 Feb 2022 19:04:39 +0300 Subject: [PATCH 4/6] Add comment for queue change Signed-off-by: Tikhomirova, Kseniya --- sycl/source/detail/queue_impl.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/sycl/source/detail/queue_impl.hpp b/sycl/source/detail/queue_impl.hpp index c90c7daee3376..20d922d4c3c7f 100644 --- a/sycl/source/detail/queue_impl.hpp +++ b/sycl/source/detail/queue_impl.hpp @@ -440,6 +440,7 @@ class queue_impl { } protected: + // template is needed for proper unit testing template void finalizeHandler(HandlerType &Handler, const CG::CGTYPE &Type, event &EventRet) { From e14e03e21b73e0fce449ed089bd63984328fa5ea Mon Sep 17 00:00:00 2001 From: "Tikhomirova, Kseniya" Date: Mon, 14 Feb 2022 19:19:14 +0300 Subject: [PATCH 5/6] Code-review: fix test header and namespace Signed-off-by: Tikhomirova, Kseniya --- sycl/unittests/scheduler/InOrderQueueSyncCheck.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sycl/unittests/scheduler/InOrderQueueSyncCheck.cpp b/sycl/unittests/scheduler/InOrderQueueSyncCheck.cpp index 973795f76d349..9d75512445bd4 100644 --- a/sycl/unittests/scheduler/InOrderQueueSyncCheck.cpp +++ b/sycl/unittests/scheduler/InOrderQueueSyncCheck.cpp @@ -1,4 +1,4 @@ -//==------- EliminatedArgMask.cpp --- eliminated args mask unit test -------==// +//==---------- InOrderQueueSyncCheck.cpp --- Scheduler unit tests ----------==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -14,7 +14,7 @@ #include -using namespace cl::sycl; +using namespace sycl; // Define type with the only methods called by finalizeHandler class LimitedHandler { From e05636a619c8d05ed226f42469e5a3ce07d1c8d1 Mon Sep 17 00:00:00 2001 From: "Tikhomirova, Kseniya" Date: Tue, 15 Feb 2022 10:06:04 +0300 Subject: [PATCH 6/6] Code-review: fix grammar in comments Signed-off-by: Tikhomirova, Kseniya --- sycl/source/detail/queue_impl.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/source/detail/queue_impl.hpp b/sycl/source/detail/queue_impl.hpp index 20d922d4c3c7f..1d4d66a2b8b20 100644 --- a/sycl/source/detail/queue_impl.hpp +++ b/sycl/source/detail/queue_impl.hpp @@ -575,7 +575,7 @@ class queue_impl { event MLastEvent; std::mutex MLastEventMtx; // Used for in-order queues in pair with MLastEvent - // Host tasks is explicitly synchronized in RT, pi tasks - implicitly by + // Host tasks are explicitly synchronized in RT, pi tasks - implicitly by // backend. Using type to setup explicit sync between host and pi tasks. CG::CGTYPE MLastCGType = CG::CGTYPE::None;