Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit c21b0a5

Browse files
authored
[SYCL] Fix printf tests on Level Zero (#166)
In case of Level Zero backend flash of printed information happens on teardown only (not on queue.wait()). The test was changed to destroy queue after execution of the kernel to ensure order of printed information on all backends.
1 parent fb0da8f commit c21b0a5

13 files changed

+4
-1
lines changed
File renamed without changes.

SYCL/built-ins/printf.cpp renamed to SYCL/DeviceLib/built-ins/printf.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ static const CONSTANT char format_vec[] = "%d,%d,%d,%d\n";
3434
const CONSTANT char format_hello_world_2[] = "%lu: Hello, World!\n";
3535

3636
int main() {
37+
default_selector Selector;
3738
{
38-
default_selector Selector;
3939
queue Queue(Selector);
4040

4141
Queue.submit([&](handler &CGH) {
@@ -106,7 +106,10 @@ int main() {
106106
});
107107
});
108108
Queue.wait();
109+
}
109110

111+
{
112+
queue Queue(Selector);
110113
// printf in parallel_for
111114
Queue.submit([&](handler &CGH) {
112115
CGH.parallel_for<class stream_string>(range<1>(10), [=](id<1> i) {

0 commit comments

Comments
 (0)