Skip to content

Commit 89a3d15

Browse files
steffenlarsenbb-sycl
authored andcommitted
[SYCL] Split optimization_level_debug_info test (intel#977)
The optimization_level_debug_info test can on some systems cause a timeout due to the compilation time without optimizations and with debug symbols enabled. To avoid this timeout, this commit splits the test into two parts; one checking with integral optimization levels (e.g. -O2) and one checking with special-name optimization levels (e.g. -Og). Signed-off-by: Steffen Larsen <[email protected]>
1 parent a7c0dbf commit 89a3d15

File tree

2 files changed

+23
-7
lines changed

2 files changed

+23
-7
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// RUN: %clangxx %debug_option -fsycl -fsycl-targets=%sycl_triple %s -O0 -o %t.out
2+
// RUN: %clangxx %debug_option -fsycl -fsycl-targets=%sycl_triple %s -O1 -o %t.out
3+
// RUN: %clangxx %debug_option -fsycl -fsycl-targets=%sycl_triple %s -O2 -o %t.out
4+
// RUN: %clangxx %debug_option -fsycl -fsycl-targets=%sycl_triple %s -O3 -o %t.out
5+
6+
// NOTE: Tests that debugging information can be generated for all integral
7+
// optimization levels.
8+
9+
#include <CL/sycl.hpp>
10+
11+
int main() {
12+
sycl::queue q;
13+
14+
q.submit([&](sycl::handler &cgh) {
15+
cgh.parallel_for<class kernel_test>(100, [=](sycl::id<1> idx) {});
16+
});
17+
q.wait();
18+
19+
return 0;
20+
}
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
1-
// RUN: %clangxx %debug_option -fsycl -fsycl-targets=%sycl_triple %s -O0 -o %t.out
2-
// RUN: %clangxx %debug_option -fsycl -fsycl-targets=%sycl_triple %s -O1 -o %t.out
3-
// RUN: %clangxx %debug_option -fsycl -fsycl-targets=%sycl_triple %s -O2 -o %t.out
4-
// RUN: %clangxx %debug_option -fsycl -fsycl-targets=%sycl_triple %s -O3 -o %t.out
51
// RUN: %clangxx %debug_option -fsycl -fsycl-targets=%sycl_triple %s -Ofast -o %t.out
62
// RUN: %clangxx %debug_option -fsycl -fsycl-targets=%sycl_triple %s -Os -o %t.out
73
// RUN: %clangxx %debug_option -fsycl -fsycl-targets=%sycl_triple %s -Oz -o %t.out
84
// RUN: %clangxx %debug_option -fsycl -fsycl-targets=%sycl_triple %s -Og -o %t.out
95
// RUN: %clangxx %debug_option -fsycl -fsycl-targets=%sycl_triple %s -O -o %t.out
106

11-
// NOTE: Tests that debugging information can be generated for all optimization
12-
// levels.
7+
// NOTE: Tests that debugging information can be generated for all special-name
8+
// optimization levels.
139

1410
#include <CL/sycl.hpp>
1511

@@ -22,4 +18,4 @@ int main() {
2218
q.wait();
2319

2420
return 0;
25-
}
21+
}

0 commit comments

Comments
 (0)