Skip to content

Commit 74e49b3

Browse files
author
sergei
authored
[SYCL] Update tests for fallback asserts(intel#533)
Disabling fallback assert feature on FPGA device and disable Windows assert tests on CUDA Signed-off-by: Sergey Kanaev <[email protected]>
1 parent f06b064 commit 74e49b3

13 files changed

+81
-29
lines changed

SYCL/.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
BasedOnStyle: LLVM
2-
CommentPragmas: "(RUN|FAIL|REQUIRES|UNSUPPORTED|CHECK) *:|expected-"
2+
CommentPragmas: "(RUN|FAIL|REQUIRES|UNSUPPORTED|CHECK[A-Za-z0-9_-]*) *:|expected-"

SYCL/Assert/assert_in_kernels.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@
66
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
77
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
88
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
9-
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt || true
10-
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
9+
// Shouldn't fail on ACC as fallback assert isn't enqueued there
10+
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt
11+
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK-ACC --input-file %t.txt
1112
//
1213
// CHECK-NOT: One shouldn't see this message
1314
// CHECK: {{.*}}assert_in_kernels.hpp:26: void kernelFunc2(int *, int): global id: [{{[0,2]}},0,0], local id: [0,0,0]
1415
// CHECK-SAME: Assertion `Buf[wiID] == 0 && "from assert statement"` failed.
1516
// CHECK-NOT: test aborts earlier, one shouldn't see this message
1617
// CHECK-NOT: The test ended.
18+
//
19+
// CHECK-ACC-NOT: {{.*}}assert_in_kernels.hpp:26: void kernelFunc2(int *, int): global id: [{{[0,2]}},0,0], local id: [0,0,0]
20+
// CHECK-ACC: The test ended.
1721

1822
#include "assert_in_kernels.hpp"

SYCL/Assert/assert_in_kernels_win.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
// REQUIRES: windows
2+
// UNSUPPORTED: cuda || hip
23
// RUN: %clangxx -DSYCL_ENABLE_FALLBACK_ASSERT -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
34
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
45
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
56
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
67
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
7-
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt || true
8-
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
8+
// Shouldn't fail on ACC as fallback assert isn't enqueued there
9+
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt
10+
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK-ACC --input-file %t.txt
911
//
1012
// CHECK-NOT: One shouldn't see this message
11-
// FIXME Windows versionprints '(null)' instead of '<unknown func>' once in a
13+
// FIXME Windows version prints '(null)' instead of '<unknown func>' once in a
1214
// while for some insane reason.
1315
// CHECK: {{.*}}assert_in_kernels.hpp:26: {{<unknown func>|(null)}}: global id: [{{[0,2]}},0,0], local id: [0,0,0]
1416
// CHECK-SAME: Assertion `Buf[wiID] == 0 && "from assert statement"` failed.
1517
// CHECK-NOT: test aborts earlier, one shouldn't see this message
1618
// CHECK-NOT: The test ended.
19+
//
20+
// CHECK-ACC-NOT: {{.*}}assert_in_kernels.hpp:26: {{<unknown func>|(null)}}: global id: [{{[0,2]}},0,0], local id: [0,0,0]
21+
// CHECK-ACC: The test ended.
1722

1823
#include "assert_in_kernels.hpp"

SYCL/Assert/assert_in_multiple_tus.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@
66
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
77
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
88
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
9-
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt || true
10-
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
9+
// Shouldn't fail on ACC as fallback assert isn't enqueued there
10+
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt
11+
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK-ACC --input-file %t.txt
1112
//
1213
// CHECK: {{.*}}kernels_in_file2.cpp:15: int calculus(int): global id: [5,0,0], local id: [1,0,0]
1314
// CHECK-SAME: Assertion `X && "this message from calculus"` failed.
1415
// CHECK-NOT: this message from file2
1516
// CHECK-NOT: The test ended.
17+
//
18+
// CHECK-ACC-NOT: {{.*}}kernels_in_file2.cpp:15: int calculus(int): global id: [5,0,0], local id: [1,0,0]
19+
// CHECK-ACC: The test ended.
1620

1721
#include "assert_in_multiple_tus.hpp"

SYCL/Assert/assert_in_multiple_tus_one_ndebug.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@
66
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
77
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
88
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
9-
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt || true
10-
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
9+
// Shouldn't fail on ACC as fallback assert isn't enqueued there
10+
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt
11+
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK-ACC --input-file %t.txt
1112
//
1213
// CHECK-NOT: this message from calculus
1314
// CHECK: {{.*}}assert_in_multiple_tus.hpp:20: int checkFunction(): global id: [5,0,0],
1415
// CHECK-SAME: local id: [1,0,0] Assertion `X && "Nil in result"` failed.
1516
// CHECK-NOT: this message from file2
1617
// CHECK-NOT: The test ended.
18+
//
19+
// CHECK-ACC-NOT: {{.*}}assert_in_multiple_tus.hpp:20: int checkFunction(): global id: [5,0,0],
20+
// CHECK-ACC: The test ended.
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
// REQUIRES: windows
2+
// UNSUPPORTED: cuda || hip
23
// RUN: %clangxx -DSYCL_ENABLE_FALLBACK_ASSERT -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
34
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
45
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
56
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
67
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
8+
// Shouldn't fail on ACC as fallback assert isn't enqueued there
79
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt || true
8-
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
10+
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK-ACC --input-file %t.txt
911
//
1012
// CHECK-NOT: this message from calculus
11-
// FIXME Windows versionprints '(null)' instead of '<unknown func>' once in a
13+
// FIXME Windows version prints '(null)' instead of '<unknown func>' once in a
1214
// while for some insane reason.
1315
// CHECK: {{.*}}assert_in_multiple_tus.hpp:20: {{<unknown func>|(null)}}: global id: [5,0,0],
1416
// CHECK-SAME: local id: [1,0,0] Assertion `X && "Nil in result"` failed.
1517
// CHECK-NOT: this message from file2
1618
// CHECK-NOT: The test ended.
19+
//
20+
// CHECK-ACC-NOT: {{.*}}assert_in_multiple_tus.hpp:20: {{<unknown func>|(null)}}: global id: [5,0,0],
21+
// CHECK-ACC: The test ended.
Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
// REQUIRES: windows
2+
// UNSUPPORTED: cuda || hip
23
// RUN: %clangxx -DSYCL_ENABLE_FALLBACK_ASSERT -fsycl -fsycl-targets=%sycl_triple -I %S/Inputs %s %S/Inputs/kernels_in_file2.cpp -o %t.out
34
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
45
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
56
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
67
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
7-
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt || true
8-
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
8+
// Shouldn't fail on ACC as fallback assert isn't enqueued there
9+
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt
10+
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK-ACC --input-file %t.txt
911
//
10-
// FIXME Windows versionprints '(null)' instead of '<unknown func>' once in a
12+
// FIXME Windows version prints '(null)' instead of '<unknown func>' once in a
1113
// while for some insane reason.
1214
// CHECK: {{.*}}kernels_in_file2.cpp:15: {{<unknown func>|(null)}}: global id: [5,0,0], local id: [1,0,0]
1315
// CHECK-SAME: Assertion `X && "this message from calculus"` failed.
1416
// CHECK-NOT: this message from file2
1517
// CHECK-NOT: The test ended.
18+
//
19+
// CHECK-ACC-NOT: {{.*}}kernels_in_file2.cpp:15: {{<unknown func>|(null)}}: global id: [5,0,0], local id: [1,0,0]
20+
// CHECK-ACC: The test ended.
1621

1722
#include "assert_in_multiple_tus.hpp"

SYCL/Assert/assert_in_one_kernel.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@
66
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
77
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
88
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
9-
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt || true
10-
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
9+
// Shouldn't fail on ACC as fallback assert isn't enqueued there
10+
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt
11+
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK-ACC --input-file %t.txt
1112
//
1213
// CHECK: {{.*}}assert_in_one_kernel.hpp:10: void kernelFunc(int *, int): global id: [{{[0-3]}},0,0], local id: [0,0,0]
1314
// CHECK-SAME: Assertion `Buf[wiID] != 0 && "from assert statement"` failed.
1415
// CHECK-NOT: The test ended.
16+
//
17+
// CHECK-ACC-NOT: {{.*}}assert_in_one_kernel.hpp:10: void kernelFunc(int *, int): global id: [{{[0-3]}},0,0], local id: [0,0,0]
18+
// CHECK-ACC: The test ended.
1519

1620
#include "assert_in_one_kernel.hpp"
Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
// REQUIRES: windows
2+
// UNSUPPORTED: cuda || hip
23
// RUN: %clangxx -DSYCL_ENABLE_FALLBACK_ASSERT -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
34
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
45
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
56
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
67
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
7-
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt || true
8-
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
8+
// Shouldn't fail on ACC as fallback assert isn't enqueued there
9+
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt
10+
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK-ACC --input-file %t.txt
911
//
10-
// FIXME Windows versionprints '(null)' instead of '<unknown func>' once in a
12+
// FIXME Windows version prints '(null)' instead of '<unknown func>' once in a
1113
// while for some insane reason.
1214
// CHECK: {{.*}}assert_in_one_kernel.hpp:10: {{<unknown func>|(null)}}: global id: [{{[0-3]}},0,0], local id: [0,0,0]
1315
// CHECK-SAME: Assertion `Buf[wiID] != 0 && "from assert statement"` failed.
1416
// CHECK-NOT: The test ended.
17+
//
18+
// CHECK-ACC-NOT: {{.*}}assert_in_one_kernel.hpp:10: {{<unknown func>|(null)}}: global id: [{{[0-3]}},0,0], local id: [0,0,0]
19+
// CHECK-ACC: The test ended.
1520

1621
#include "assert_in_one_kernel.hpp"

SYCL/Assert/assert_in_simultaneous_kernels.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@
1212
// release yet.
1313
// RUN: env SYCL_PI_LEVEL_ZERO_TRACK_INDIRECT_ACCESS_MEMORY=1 %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
1414
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
15-
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt || true
16-
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
15+
// Shouldn't fail on ACC as fallback assert isn't enqueued there
16+
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt
17+
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK-ACC --input-file %t.txt
1718
//
1819
// CHECK: {{.*}}assert_in_simultaneous_kernels.hpp:12: void assertFunc(): global id: [9,7,0], local id: [0,0,0]
1920
// CHECK-SAME: Assertion `false && "from assert statement"` failed.
2021
// CHECK-NOT: The test ended.
22+
//
23+
// CHECK-ACC-NOT: {{.*}}assert_in_simultaneous_kernels.hpp:12: void assertFunc(): global id: [9,7,0], local id: [0,0,0]
24+
// CHECK-ACC: The test ended.
2125

2226
#include "assert_in_simultaneous_kernels.hpp"

SYCL/Assert/assert_in_simultaneous_kernels_win.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// REQUIRES: windows
2+
// UNSUPPORTED: cuda || hip
23
// RUN: %clangxx -DSYCL_ENABLE_FALLBACK_ASSERT -fsycl -fsycl-targets=%sycl_triple %s -o %t.out %threads_lib
34
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
45
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
@@ -10,13 +11,17 @@
1011
// release yet.
1112
// RUN: env SYCL_PI_LEVEL_ZERO_TRACK_INDIRECT_ACCESS_MEMORY=1 %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
1213
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
13-
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt || true
14-
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
14+
// Shouldn't fail on ACC as fallback assert isn't enqueued there
15+
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt
16+
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK-ACC --input-file %t.txt
1517
//
16-
// FIXME Windows versionprints '(null)' instead of '<unknown func>' once in a
18+
// FIXME Windows version prints '(null)' instead of '<unknown func>' once in a
1719
// while for some insane reason.
1820
// CHECK: {{.*}}assert_in_simultaneous_kernels.hpp:12: {{<unknown func>|(null)}}: global id: [9,7,0], local id: [0,0,0]
1921
// CHECK-SAME: Assertion `false && "from assert statement"` failed.
2022
// CHECK-NOT: The test ended.
23+
//
24+
// CHECK-ACC-NOT: {{.*}}assert_in_simultaneous_kernels.hpp:12: {{<unknown func>|(null)}}: global id: [9,7,0], local id: [0,0,0]
25+
// CHECK-ACC: The test ended.
2126

2227
#include "assert_in_simultaneous_kernels.hpp"

SYCL/Assert/assert_in_simultaneously_multiple_tus.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,15 @@
1111
// release yet.
1212
// RUN: env SYCL_PI_LEVEL_ZERO_TRACK_INDIRECT_ACCESS_MEMORY=1 %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
1313
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
14-
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt || true
15-
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
14+
// Shouldn't fail on ACC as fallback assert isn't enqueued there
15+
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt
16+
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK-ACC --input-file %t.txt
1617
//
1718
// CHECK: {{this message from file1|this message from file2}}
1819
// CHECK-NOT: The test ended.
20+
//
21+
// CHECK-ACC-NOT: {{this message from file1|this message from file2}}
22+
// CHECK-ACC: The test ended.
1923

2024
#include "Inputs/kernels_in_file2.hpp"
2125
#include <CL/sycl.hpp>

SYCL/Assert/assert_in_simultaneously_multiple_tus_one_ndebug.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@
1111
// release yet.
1212
// RUN: env SYCL_PI_LEVEL_ZERO_TRACK_INDIRECT_ACCESS_MEMORY=1 %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
1313
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
14-
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt || true
15-
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
14+
// Shouldn't fail on ACC as fallback assert isn't enqueued there
15+
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt
16+
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK-ACC --input-file %t.txt
1617
//
1718
// CHECK: this message from file1
1819
// CHECK-NOT: this message from file2
1920
// CHECK-NOT: The test ended.
21+
//
22+
// CHECK-ACC: The test ended.

0 commit comments

Comments
 (0)