Skip to content

Commit 41e7346

Browse files
Revert "[SYCL] Reintroduce barrier trivial event for empty in-order queue" (#20535)
Reverts #20263 ------ This PR was made as a temporary workaround to unblock the release. Reverting this workaround so that we can have a proper fix in the next release.
1 parent 6fbd7f0 commit 41e7346

File tree

3 files changed

+0
-24
lines changed

3 files changed

+0
-24
lines changed

sycl/source/queue.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -366,14 +366,6 @@ event queue::ext_oneapi_submit_barrier(const std::vector<event> &WaitList,
366366
!EventImpl.hasCommandGraph();
367367
});
368368

369-
// If we have an empty in-order queue and no dependencies, we can just return
370-
// a trivially finished event.
371-
if (is_in_order() && !impl->hasCommandGraph() && !impl->MIsProfilingEnabled &&
372-
AllEventsEmptyOrNop && ext_oneapi_empty()) {
373-
return detail::createSyclObjFromImpl<event>(
374-
detail::event_impl::create_default_event());
375-
}
376-
377369
if (WaitList.empty() || AllEventsEmptyOrNop)
378370
return submit([=](handler &CGH) { CGH.ext_oneapi_barrier(); }, CodeLoc);
379371
else

sycl/test-e2e/InorderQueue/in_order_ext_oneapi_submit_barrier.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,6 @@ int main() {
6060
Q.wait();
6161
assert(*Res == 10);
6262
}
63-
{
64-
// Test cast 3 - empty queue.
65-
std::cout << "Test 3" << std::endl;
66-
sycl::queue EmptyQ({sycl::property::queue::in_order{}});
67-
auto BarrierEvent = EmptyQ.ext_oneapi_submit_barrier();
68-
assert(
69-
BarrierEvent.get_info<sycl::info::event::command_execution_status>() ==
70-
sycl::info::event_command_status::complete);
71-
BarrierEvent.wait();
72-
}
7363
{
7464
// Test cast 4 - graph.
7565
sycl::queue GQueue{sycl::property::queue::in_order{}};

sycl/unittests/Extensions/ExtOneapiBarrierOpt.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include <detail/queue_impl.hpp>
109
#include <gtest/gtest.h>
1110
#include <helpers/ScopedEnvVar.hpp>
1211
#include <helpers/UrMock.hpp>
@@ -40,11 +39,6 @@ class ExtOneapiBarrierOptTest : public ::testing::Test {
4039
TEST_F(ExtOneapiBarrierOptTest, EmptyEventTest) {
4140
sycl::queue q1{{sycl::property::queue::in_order()}};
4241

43-
// To avoid current optimizations for empty queues, we trick q1 into thinking
44-
// that it isn't empty.
45-
int dummyInt = 0;
46-
q1.prefetch(&dummyInt, sizeof(int));
47-
4842
mock::getCallbacks().set_after_callback(
4943
"urEnqueueEventsWaitWithBarrierExt",
5044
&redefinedEnqueueEventsWaitWithBarrierExt);

0 commit comments

Comments
 (0)