Skip to content

Commit e764860

Browse files
[SYCL][UT] Fix scheduler resources cleanup in PiMock dtor (#14447)
Does scheduler cleanup explicitly. Windows path has some "cut" code in prepareSchedulerForRelease (due to shutdown features) that makes this function useless for UT PiMock cleanup. fixes #13457 Signed-off-by: Tikhomirova, Kseniya <[email protected]>
1 parent 9637803 commit e764860

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

sycl/unittests/helpers/PiMock.hpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include <detail/global_handler.hpp>
3535
#include <detail/platform_impl.hpp>
3636
#include <detail/plugin.hpp>
37+
#include <detail/scheduler/scheduler.hpp>
3738
#include <sycl/detail/common.hpp>
3839
#include <sycl/detail/pi.hpp>
3940
#include <sycl/device.hpp>
@@ -237,7 +238,11 @@ class PiMock {
237238
return;
238239

239240
MPiPluginMockPtr->PiFunctionTable = *OrigFuncTable;
240-
detail::GlobalHandler::instance().prepareSchedulerToRelease(true);
241+
// calling drainThreadPool and releaseResources explicitly due to win
242+
// related WA in shutdown process
243+
detail::GlobalHandler::instance().drainThreadPool();
244+
detail::GlobalHandler::instance().getScheduler().releaseResources(
245+
detail::BlockingT::BLOCKING);
241246
detail::GlobalHandler::instance().releaseDefaultContexts();
242247
}
243248

0 commit comments

Comments
 (0)