Skip to content

Commit

Permalink
[SYCL][NFC] Turn on queue::wait unit test with Level Zero (#5226)
Browse files Browse the repository at this point in the history
The workaround that led to different behavior on Level Zero has been
removed.
  • Loading branch information
sergey-semenov authored Dec 28, 2021
1 parent f659946 commit 1c39f3e
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions sycl/unittests/queue/Wait.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,6 @@ bool preparePiMock(platform &Plt) {
<< std::endl;
return false;
}
// TODO remove once queue:wait() is lowered to PiQueueFinish with level zero
// as well.
if (detail::getSyclObjImpl(Plt)->getPlugin().getBackend() ==
backend::ext_oneapi_level_zero) {
std::cout << "Not run on Level Zero, old behavior is kept there temporarily"
<< std::endl;
return false;
}

unittest::PiMock Mock{Plt};
Mock.redefine<detail::PiApiKind::piQueueCreate>(redefinedQueueCreate);
Expand Down Expand Up @@ -129,12 +121,7 @@ TEST(QueueWait, QueueWaitTest) {
TestContext = {};
Q.memset(HostAlloc, 42, 1);
// No need to keep the event since we'll use piQueueFinish.
// FIXME ... unless the plugin is Level Zero, where there's a workaround that
// releases events later.
if (detail::getSyclObjImpl(Plt)->getPlugin().getBackend() !=
backend::ext_oneapi_level_zero) {
ASSERT_EQ(TestContext.EventReferenceCount, 0);
}
ASSERT_EQ(TestContext.EventReferenceCount, 0);
Q.wait();
ASSERT_EQ(TestContext.NEventsWaitedFor, 0);
ASSERT_TRUE(TestContext.PiQueueFinishCalled);
Expand Down

0 comments on commit 1c39f3e

Please sign in to comment.