Skip to content

Commit

Permalink
Prevent accessing devices that was deleted on lit config
Browse files Browse the repository at this point in the history
  • Loading branch information
omarahmed1111 committed Sep 25, 2024
1 parent 36690f4 commit 96d1736
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion sycl/source/detail/global_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ void shutdown_early() {
void shutdown_win() {
shutdown_early();
GlobalHandler *&Handler = GlobalHandler::getInstancePtr();
Handler->unloadPlugins();
Handler->unloadAdapters();
}
#else
void shutdown_late() {
Expand Down Expand Up @@ -384,6 +384,7 @@ extern "C" __SYCL_EXPORT BOOL WINAPI DllMain(HINSTANCE hinstDLL,

try {
shutdown_win();
exit(0);
} catch (std::exception &e) {
__SYCL_REPORT_EXCEPTION_TO_STREAM("exception in shutdown_win", e);
return FALSE;
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def get_extra_env(sycl_devices):
test, litConfig, useExternalSh, script, tmpBase
)

if len(devices_for_test) > 1:
if len(devices_for_test) != 1:
return result

# Single device - might be an XFAIL.
Expand Down

0 comments on commit 96d1736

Please sign in to comment.