Skip to content

Commit

Permalink
[SYCL]{NFC] Remove duplicate checks from InOrderQueueSyncCheck
Browse files Browse the repository at this point in the history
  • Loading branch information
sergey-semenov committed Jan 30, 2024
1 parent 3985244 commit 0e5a299
Showing 1 changed file with 2 additions and 31 deletions.
33 changes: 2 additions & 31 deletions sycl/unittests/scheduler/InOrderQueueSyncCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,43 +56,14 @@ TEST_F(SchedulerTest, InOrderQueueSyncCheck) {
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 | yes - sync between pi calls must be done by backend, but we
// still add dependency to handle the right order due to host task. This
// dependency will not be sent to backend. It is checked in
// SchedulerTest.InOrderQueueCrossDeps
// host | yes - always, separate sync management

// Check that tasks submitted to an in-order queue implicitly depend_on the
// previous task, this is needed to properly sync blocking & blocked tasks.
sycl::event Event;
// host task
{
LimitedHandlerSimulation MockCGH;
EXPECT_CALL(MockCGH, depends_on).Times(0);
Queue->finalizeHandler<LimitedHandlerSimulation>(MockCGH, Event);
}
// host task
{
LimitedHandlerSimulation MockCGH;
EXPECT_CALL(MockCGH, depends_on).Times(1);
Queue->finalizeHandler<LimitedHandlerSimulation>(MockCGH, Event);
}
// kernel task
{
LimitedHandlerSimulation MockCGH;
EXPECT_CALL(MockCGH, depends_on).Times(1);
Queue->finalizeHandler<LimitedHandlerSimulation>(MockCGH, Event);
}
// kernel task
{
LimitedHandlerSimulation MockCGH;
EXPECT_CALL(MockCGH, depends_on).Times(1);
Queue->finalizeHandler<LimitedHandlerSimulation>(MockCGH, Event);
}
// host task
{
LimitedHandlerSimulation MockCGH;
EXPECT_CALL(MockCGH, depends_on).Times(1);
Expand Down

0 comments on commit 0e5a299

Please sign in to comment.