Skip to content

Commit c2a99f0

Browse files
Pavel Chupinbb-sycl
authored andcommitted
[SYCL][NFC] Separate test logs to improve debugability (intel#1438)
Can't reproduce current issue on HIP. Separate test execution logs to see what's going on GPU target. Otherwise logs are overwritten.
1 parent f7f1108 commit c2a99f0

5 files changed

+30
-30
lines changed

SYCL/Assert/assert_in_kernels.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// REQUIRES: linux
22
// RUN: %clangxx -DSYCL_FALLBACK_ASSERT=1 -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
3-
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
4-
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
5-
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
6-
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
3+
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.cpu.txt || true
4+
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.cpu.txt
5+
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.gpu.txt || true
6+
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.gpu.txt
77
// Shouldn't fail on ACC as fallback assert isn't enqueued there
8-
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt
9-
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK-ACC --input-file %t.txt
8+
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.acc.txt
9+
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK-ACC --input-file %t.acc.txt
1010
//
1111
// CHECK-NOT: One shouldn't see this message
1212
// CHECK: {{.*}}assert_in_kernels.hpp:25: void kernelFunc2(int *, int): {{.*}} [{{[0,2]}},0,0], {{.*}} [0,0,0]

SYCL/Assert/assert_in_multiple_tus.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// REQUIRES: linux
22
// RUN: %clangxx -DSYCL_FALLBACK_ASSERT=1 -fsycl -fsycl-targets=%sycl_triple -I %S/Inputs %s %S/Inputs/kernels_in_file2.cpp -o %t.out
3-
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
4-
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
5-
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
6-
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
3+
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.cpu.txt || true
4+
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.cpu.txt
5+
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.gpu.txt || true
6+
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.gpu.txt
77
// Shouldn't fail on ACC as fallback assert isn't enqueued there
8-
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt
9-
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK-ACC --input-file %t.txt
8+
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.acc.txt
9+
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK-ACC --input-file %t.acc.txt
1010
//
1111
// CUDA uses block/thread vs global/local id for SYCL, also it shows the
1212
// position of a thread within the block, not the absolute ID.

SYCL/Assert/assert_in_multiple_tus_one_ndebug.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// REQUIRES: linux
22
// RUN: %clangxx -DSYCL_FALLBACK_ASSERT=1 -fsycl -fsycl-targets=%sycl_triple -DDEFINE_NDEBUG_INFILE2 -I %S/Inputs %S/assert_in_multiple_tus.cpp %S/Inputs/kernels_in_file2.cpp -o %t.out
3-
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
4-
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
5-
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
6-
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
3+
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.cpu.txt || true
4+
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.cpu.txt
5+
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.gpu.txt || true
6+
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.gpu.txt
77
// Shouldn't fail on ACC as fallback assert isn't enqueued there
8-
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt
9-
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK-ACC --input-file %t.txt
8+
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.acc.txt
9+
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK-ACC --input-file %t.acc.txt
1010
//
1111
// CHECK-NOT: this message from calculus
1212
// CUDA uses block/thread vs global/local id for SYCL, also it shows the

SYCL/Assert/assert_in_one_kernel.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// REQUIRES: linux
22
// RUN: %clangxx -DSYCL_FALLBACK_ASSERT=1 -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
3-
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
4-
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
5-
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
6-
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
3+
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.cpu.txt || true
4+
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.cpu.txt
5+
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.gpu.txt || true
6+
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.gpu.txt
77
// Shouldn't fail on ACC as fallback assert isn't enqueued there
8-
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt
9-
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK-ACC --input-file %t.txt
8+
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.acc.txt
9+
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK-ACC --input-file %t.acc.txt
1010
//
1111
// CHECK: {{.*}}assert_in_one_kernel.hpp:10: void kernelFunc(int *, int): {{.*}} [{{[0-3]}},0,0], {{.*}} [0,0,0]
1212
// CHECK-SAME: Assertion `Buf[wiID] != 0 && "from assert statement"` failed.

SYCL/Assert/assert_in_simultaneously_multiple_tus_one_ndebug.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// FIXME flaky fail on CUDA
22
// UNSUPPORTED: cuda
33
// RUN: %clangxx -DSYCL_FALLBACK_ASSERT=1 -fsycl -fsycl-targets=%sycl_triple -DDEFINE_NDEBUG_INFILE2 -I %S/Inputs %S/assert_in_simultaneously_multiple_tus.cpp %S/Inputs/kernels_in_file2.cpp -o %t.out %threads_lib
4-
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
5-
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
4+
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.cpu.txt || true
5+
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.cpu.txt
66
//
77
// Since this is a multi-threaded application enable memory tracking and
88
// deferred release feature in the Level Zero plugin to avoid releasing memory
@@ -11,11 +11,11 @@
1111
// release yet.
1212
// Suppress runtime from printing out error messages, so that the test can
1313
// match on assert message generated by the toolchains.
14-
// RUN: env SYCL_PI_LEVEL_ZERO_TRACK_INDIRECT_ACCESS_MEMORY=1 SYCL_PI_SUPPRESS_ERROR_MESSAGE=1 %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
15-
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
14+
// RUN: env SYCL_PI_LEVEL_ZERO_TRACK_INDIRECT_ACCESS_MEMORY=1 SYCL_PI_SUPPRESS_ERROR_MESSAGE=1 %GPU_RUN_PLACEHOLDER %t.out &> %t.gpu.txt || true
15+
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.gpu.txt
1616
// Shouldn't fail on ACC as fallback assert isn't enqueued there
17-
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt
18-
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK-ACC --input-file %t.txt
17+
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.acc.txt
18+
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK-ACC --input-file %t.acc.txt
1919
//
2020
// CHECK: this message from file1
2121
// CHECK-NOT: this message from file2

0 commit comments

Comments
 (0)