Skip to content

Commit b91d5b9

Browse files
committed
Disable checking UR objects release on windows shutdown
1 parent a4210c3 commit b91d5b9

File tree

5 files changed

+54
-31
lines changed

5 files changed

+54
-31
lines changed

sycl/test-e2e/Basic/queue/release.cpp

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// RUN: %{build} -o %t.out
2-
// RUN: env SYCL_UR_TRACE=2 %{run} %t.out | FileCheck %s
2+
// RUN: env SYCL_UR_TRACE=2 %{run} %t.out | FileCheck %s %if !windows %{--check-prefixes=CHECK-RELEASE%}
33
//
4-
// TODO: Reenable on Windows, see https://github.com/intel/llvm/issues/14768
5-
// XFAIL: hip_nvidia, windows
4+
// XFAIL: hip_nvidia
65

76
#include <sycl/detail/core.hpp>
87
int main() {
@@ -19,7 +18,14 @@ int main() {
1918
// specific queue workaround.
2019
// CHECK-DAG: <--- urEventRelease(
2120
// CHECK-DAG: <--- urQueueRelease(
22-
// CHECK: <--- urContextRelease(
23-
// CHECK: <--- urKernelRelease(
24-
// CHECK: <--- urProgramRelease(
25-
// CHECK: <--- urDeviceRelease(
21+
22+
// On Windows, dlls unloading is inconsistent and if we try to release these UR
23+
// objects manually, inconsistent hangs happen due to a race between unloading
24+
// the UR adapters dlls (in addition to their dependency dlls) and the releasing
25+
// of these UR objects. So, we currently shutdown without releasing them and
26+
// windows should handle the memory cleanup.
27+
28+
// CHECK-RELEASE: <--- urContextRelease(
29+
// CHECK-RELEASE: <--- urKernelRelease(
30+
// CHECK-RELEASE: <--- urProgramRelease(
31+
// CHECK-RELEASE: <--- urDeviceRelease(

sycl/test-e2e/KernelAndProgram/disable-caching.cpp

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@
55
// RUN: env ZE_DEBUG=-6 SYCL_UR_TRACE=2 SYCL_CACHE_IN_MEM=0 %{run} %t.out \
66
// RUN: | FileCheck %s
77
// RUN: env ZE_DEBUG=-6 SYCL_UR_TRACE=2 %{run} %t.out \
8-
// RUN: | FileCheck %s --check-prefixes=CHECK-CACHE
9-
10-
// TODO: Reenable on Windows, see https://github.com/intel/llvm/issues/14768
11-
// XFAIL: windows
8+
// RUN: | FileCheck %s --check-prefixes=CHECK-CACHE%if !windows %{,CHECK-RELEASE%}
129

1310
#include <sycl/detail/core.hpp>
1411

@@ -93,10 +90,16 @@ int main() {
9390
free(p, q);
9491
}
9592

93+
// On Windows, dlls unloading is inconsistent and if we try to release these UR
94+
// objects manually, inconsistent hangs happen due to a race between unloading
95+
// the UR adapters dlls (in addition to their dependency dlls) and the releasing
96+
// of these UR objects. So, we currently shutdown without releasing them and
97+
// windows should handle the memory cleanup.
98+
9699
// (Program cache releases)
97-
// CHECK-CACHE: <--- urKernelRelease
98-
// CHECK-CACHE: <--- urKernelRelease
99-
// CHECK-CACHE: <--- urKernelRelease
100-
// CHECK-CACHE: <--- urProgramRelease
101-
// CHECK-CACHE: <--- urProgramRelease
102-
// CHECK-CACHE: <--- urProgramRelease
100+
// CHECK-RELEASE: <--- urKernelRelease
101+
// CHECK-RELEASE: <--- urKernelRelease
102+
// CHECK-RELEASE: <--- urKernelRelease
103+
// CHECK-RELEASE: <--- urProgramRelease
104+
// CHECK-RELEASE: <--- urProgramRelease
105+
// CHECK-RELEASE: <--- urProgramRelease

sycl/test-e2e/Regression/context_is_destroyed_after_exception.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
// REQUIRES: gpu
22

33
// RUN: %{build} -o %t.out
4-
// RUN: env SYCL_UR_TRACE=2 %{run} %t.out 2>&1 | FileCheck %s
4+
// RUN: env SYCL_UR_TRACE=2 %{run} %t.out %if !windows %{2>&1 | FileCheck %s %}
55
//
6-
// TODO: Reenable on Windows, see https://github.com/intel/llvm/issues/14768
7-
// XFAIL: hip_nvidia, windows
6+
// XFAIL: hip_nvidia
87

98
#include <sycl/detail/core.hpp>
109

@@ -32,4 +31,10 @@ int main() {
3231
return 0;
3332
}
3433

34+
// On Windows, dlls unloading is inconsistent and if we try to release these UR
35+
// objects manually, inconsistent hangs happen due to a race between unloading
36+
// the UR adapters dlls (in addition to their dependency dlls) and the releasing
37+
// of these UR objects. So, we currently shutdown without releasing them and
38+
// windows should handle the memory cleanup.
39+
3540
// CHECK: <--- urContextRelease(
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
// REQUIRES: opencl || level_zero || cuda
22
// RUN: %{build} -o %t.out
3-
// RUN: env SYCL_UR_TRACE=2 %{run} %t.out 2>&1 | FileCheck %s
4-
//
5-
// TODO: Reenable on Windows, see https://github.com/intel/llvm/issues/14768
6-
// XFAIL: windows
3+
// RUN: env SYCL_UR_TRACE=2 %{run} %t.out %if !windows %{2>&1 | FileCheck %s %}
74

85
#include <sycl/detail/core.hpp>
96

@@ -12,5 +9,11 @@ int main() {
129
return 0;
1310
}
1411

12+
// On Windows, dlls unloading is inconsistent and if we try to release these UR
13+
// objects manually, inconsistent hangs happen due to a race between unloading
14+
// the UR adapters dlls (in addition to their dependency dlls) and the releasing
15+
// of these UR objects. So, we currently shutdown without releasing them and
16+
// windows should handle the memory cleanup.
17+
1518
// CHECK: <--- urQueueRelease
1619
// CHECK: <--- urContextRelease

sycl/test-e2e/Scheduler/ReleaseResourcesTest.cpp

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// RUN: %{build} -Wno-error=unused-command-line-argument -fsycl-dead-args-optimization -o %t.out
2-
// RUN: env SYCL_UR_TRACE=2 %{run} %t.out 2>&1 | FileCheck %s
2+
// RUN: env SYCL_UR_TRACE=2 %{run} %t.out 2>&1 | FileCheck %s %if !windows %{--check-prefix=CHECK-RELEASE%}
33
//
4-
// TODO: Reenable on Windows, see https://github.com/intel/llvm/issues/14768
5-
// XFAIL: hip_nvidia, windows
4+
// XFAIL: hip_nvidia
65

76
//==------------------- ReleaseResourcesTests.cpp --------------------------==//
87
//
@@ -50,7 +49,14 @@ int main() {
5049
// CHECK: <--- urQueueCreate
5150
// CHECK: <--- urProgramCreate
5251
// CHECK: <--- urKernelCreate
53-
// CHECK: <--- urQueueRelease
54-
// CHECK: <--- urContextRelease
55-
// CHECK: <--- urKernelRelease
56-
// CHECK: <--- urProgramRelease
52+
53+
// On Windows, dlls unloading is inconsistent and if we try to release these UR
54+
// objects manually, inconsistent hangs happen due to a race between unloading
55+
// the UR adapters dlls (in addition to their dependency dlls) and the releasing
56+
// of these UR objects. So, we currently shutdown without releasing them and
57+
// windows should handle the memory cleanup.
58+
59+
// CHECK-RELEASE: <--- urQueueRelease
60+
// CHECK-RELEASE: <--- urContextRelease
61+
// CHECK-RELEASE: <--- urKernelRelease
62+
// CHECK-RELEASE: <--- urProgramRelease

0 commit comments

Comments
 (0)