diff --git a/sycl/source/detail/global_handler.cpp b/sycl/source/detail/global_handler.cpp index a13d81b54daca..7308b2e2d8e07 100644 --- a/sycl/source/detail/global_handler.cpp +++ b/sycl/source/detail/global_handler.cpp @@ -298,18 +298,6 @@ void GlobalHandler::drainThreadPool() { MHostTaskThreadPool.Inst->drain(); } -#ifdef _WIN32 -// because of something not-yet-understood on Windows -// threads may be shutdown once the end of main() is reached -// making an orderly shutdown difficult. Fortunately, Windows -// itself is very aggressive about reclaiming memory. Thus, -// we focus solely on unloading the adapters, so as to not -// accidentally retain device handles. etc -void shutdown_win() { - GlobalHandler *&Handler = GlobalHandler::getInstancePtr(); - Handler->unloadAdapters(); -} -#else void shutdown_early() { const LockGuard Lock{GlobalHandler::MSyclGlobalHandlerProtector}; GlobalHandler *&Handler = GlobalHandler::getInstancePtr(); @@ -331,6 +319,19 @@ void shutdown_early() { Handler->releaseDefaultContexts(); } +#ifdef _WIN32 +// because of something not-yet-understood on Windows +// threads may be shutdown once the end of main() is reached +// making an orderly shutdown difficult. Fortunately, Windows +// itself is very aggressive about reclaiming memory. Thus, +// we focus solely on unloading the plugins, so as to not +// accidentally retain device handles. etc +void shutdown_win() { + shutdown_early(); + GlobalHandler *&Handler = GlobalHandler::getInstancePtr(); + Handler->unloadPlugins(); +} +#else void shutdown_late() { const LockGuard Lock{GlobalHandler::MSyclGlobalHandlerProtector}; GlobalHandler *&Handler = GlobalHandler::getInstancePtr(); diff --git a/sycl/test-e2e/Basic/queue/release.cpp b/sycl/test-e2e/Basic/queue/release.cpp index fe788c59c4bf7..2ca6451a98c07 100644 --- a/sycl/test-e2e/Basic/queue/release.cpp +++ b/sycl/test-e2e/Basic/queue/release.cpp @@ -1,8 +1,7 @@ // RUN: %{build} -o %t.out // RUN: env SYCL_UR_TRACE=2 %{run} %t.out | FileCheck %s // -// TODO: Reenable on Windows, see https://github.com/intel/llvm/issues/14768 -// XFAIL: hip_nvidia, windows +// XFAIL: hip_nvidia #include int main() { diff --git a/sycl/test-e2e/KernelAndProgram/disable-caching.cpp b/sycl/test-e2e/KernelAndProgram/disable-caching.cpp index 5e8ef4045d641..265145d8e49d1 100644 --- a/sycl/test-e2e/KernelAndProgram/disable-caching.cpp +++ b/sycl/test-e2e/KernelAndProgram/disable-caching.cpp @@ -7,9 +7,6 @@ // RUN: env ZE_DEBUG=-6 SYCL_UR_TRACE=2 %{run} %t.out \ // RUN: | FileCheck %s --check-prefixes=CHECK-CACHE -// TODO: Reenable on Windows, see https://github.com/intel/llvm/issues/14768 -// XFAIL: windows - #include #include diff --git a/sycl/test-e2e/Regression/context_is_destroyed_after_exception.cpp b/sycl/test-e2e/Regression/context_is_destroyed_after_exception.cpp index 703103f0d1a62..e92dcaa3a6f57 100644 --- a/sycl/test-e2e/Regression/context_is_destroyed_after_exception.cpp +++ b/sycl/test-e2e/Regression/context_is_destroyed_after_exception.cpp @@ -3,8 +3,7 @@ // RUN: %{build} -o %t.out // RUN: env SYCL_UR_TRACE=2 %{run} %t.out 2>&1 | FileCheck %s // -// TODO: Reenable on Windows, see https://github.com/intel/llvm/issues/14768 -// XFAIL: hip_nvidia, windows +// XFAIL: hip_nvidia #include diff --git a/sycl/test-e2e/Regression/pi_release.cpp b/sycl/test-e2e/Regression/pi_release.cpp index 1a28a27d184d9..90102e5cf0e20 100644 --- a/sycl/test-e2e/Regression/pi_release.cpp +++ b/sycl/test-e2e/Regression/pi_release.cpp @@ -1,9 +1,6 @@ // REQUIRES: opencl || level_zero || cuda // RUN: %{build} -o %t.out // RUN: env SYCL_UR_TRACE=2 %{run} %t.out 2>&1 | FileCheck %s -// -// TODO: Reenable on Windows, see https://github.com/intel/llvm/issues/14768 -// XFAIL: windows #include diff --git a/sycl/test-e2e/Scheduler/ReleaseResourcesTest.cpp b/sycl/test-e2e/Scheduler/ReleaseResourcesTest.cpp index dcd1492b63511..3fc020e82e712 100644 --- a/sycl/test-e2e/Scheduler/ReleaseResourcesTest.cpp +++ b/sycl/test-e2e/Scheduler/ReleaseResourcesTest.cpp @@ -1,8 +1,7 @@ // RUN: %{build} -Wno-error=unused-command-line-argument -fsycl-dead-args-optimization -o %t.out // RUN: env SYCL_UR_TRACE=2 %{run} %t.out 2>&1 | FileCheck %s // -// TODO: Reenable on Windows, see https://github.com/intel/llvm/issues/14768 -// XFAIL: hip_nvidia, windows +// XFAIL: hip_nvidia //==------------------- ReleaseResourcesTests.cpp --------------------------==// //