File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,11 @@ void shutdown() {
80
80
// First, release resources, that may access plugins.
81
81
GlobalHandler::instance ().MScheduler .Inst .reset (nullptr );
82
82
GlobalHandler::instance ().MProgramManager .Inst .reset (nullptr );
83
+ #ifndef _WIN32
84
+ // HACK: there is a problem of L0 driver getting unloaded prematurely on
85
+ // Windows. This causes crash while destroying devices in the cache.
83
86
GlobalHandler::instance ().MPlatformDeviceCache .Inst .reset (nullptr );
87
+ #endif
84
88
85
89
// Call to GlobalHandler::instance().getPlugins() initializes plugins. If
86
90
// user application has loaded SYCL runtime, and never called any APIs,
@@ -102,7 +106,9 @@ void shutdown() {
102
106
}
103
107
104
108
#ifdef _WIN32
105
- BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved) {
109
+ extern " C" __SYCL_EXPORT BOOL WINAPI DllMain (HINSTANCE hinstDLL,
110
+ DWORD fdwReason,
111
+ LPVOID lpReserved) {
106
112
// Perform actions based on the reason for calling.
107
113
switch (fdwReason) {
108
114
case DLL_PROCESS_DETACH:
You can’t perform that action at this time.
0 commit comments