Skip to content

Commit 34cf20a

Browse files
[SYCL] Fix flaky race in StreamBufferDeallocation unit test (#7855)
The Scheduler/GraphCleanup::StreamBufferDeallocation test attempts to 'precheck' that the node count is 2 before the cleanup completes (when it is once again tested and confirmed to be 0). But this 'precheck' is racing on Windows. While it is OK about 85% of the time, in the other 15% of runs the clean-up has already begun and there is just one node, or none. This fix simply removes the 'precheck' as it is not central to the test. Signed-off-by: Perkins, Chris <[email protected]>
1 parent e767401 commit 34cf20a

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

sycl/unittests/scheduler/GraphCleanup.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,6 @@ TEST_F(SchedulerTest, StreamBufferDeallocation) {
344344
EventImplPtr = MSPtr->addCG(std::move(CG), QueueImplPtr);
345345
}
346346

347-
// Both buffers should have been sent to the deferred release.
348-
ASSERT_EQ(MSPtr->MDeferredMemObjRelease.size(), 2u);
349347
// The buffers should have been released with graph cleanup once the work is
350348
// finished.
351349
EventImplPtr->wait(EventImplPtr);

0 commit comments

Comments
 (0)