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

[SYCL] Update tests for disabling fallback assert feature on FPGA device and disable Windows assert tests on CUDA #533

Merged
merged 10 commits into from
Dec 10, 2021
Next Next commit
[SYCL] Update tests for disabling fallback assert feature on FPGA device
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
  • Loading branch information
Sergey Kanaev committed Oct 25, 2021
commit a85bef19a783db1ef3d3949a9e90d0f2569f02b8
8 changes: 6 additions & 2 deletions SYCL/Assert/assert_in_kernels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt || true
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// Shouldn't fail on ACC as fallback assert isn't enqueued there
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK_ACC --input-file %t.txt
//
// CHECK-NOT: One shouldn't see this message
// CHECK: {{.*}}assert_in_kernels.hpp:26: void kernelFunc2(int *, int): global id: [{{[0,2]}},0,0], local id: [0,0,0]
// CHECK-SAME: Assertion `Buf[wiID] == 0 && "from assert statement"` failed.
// CHECK-NOT: test aborts earlier, one shouldn't see this message
// CHECK-NOT: The test ended.
//
// CHECK_ACC-NOT: {{.*}}assert_in_kernels.hpp:26: void kernelFunc2(int *, int): global id: [{{[0,2]}},0,0], local id: [0,0,0]
// CHECK_ACC: The test ended.

#include "assert_in_kernels.hpp"
10 changes: 7 additions & 3 deletions SYCL/Assert/assert_in_kernels_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt || true
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// Shouldn't fail on ACC as fallback assert isn't enqueued there
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK_ACC --input-file %t.txt
//
// CHECK-NOT: One shouldn't see this message
// FIXME Windows versionprints '(null)' instead of '<unknown func>' once in a
// FIXME Windows version prints '(null)' instead of '<unknown func>' once in a
// while for some insane reason.
// CHECK: {{.*}}assert_in_kernels.hpp:26: {{<unknown func>|(null)}}: global id: [{{[0,2]}},0,0], local id: [0,0,0]
// CHECK-SAME: Assertion `Buf[wiID] == 0 && "from assert statement"` failed.
// CHECK-NOT: test aborts earlier, one shouldn't see this message
// CHECK-NOT: The test ended.
//
// CHECK_ACC-NOT: {{.*}}assert_in_kernels.hpp:26: {{<unknown func>|(null)}}: global id: [{{[0,2]}},0,0], local id: [0,0,0]
// CHECK_ACC: The test ended.

#include "assert_in_kernels.hpp"
8 changes: 6 additions & 2 deletions SYCL/Assert/assert_in_multiple_tus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt || true
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// Shouldn't fail on ACC as fallback assert isn't enqueued there
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK_ACC --input-file %t.txt
//
// CHECK: {{.*}}kernels_in_file2.cpp:15: int calculus(int): global id: [5,0,0], local id: [1,0,0]
// CHECK-SAME: Assertion `X && "this message from calculus"` failed.
// CHECK-NOT: this message from file2
// CHECK-NOT: The test ended.
//
// CHECK_ACC-NOT: {{.*}}kernels_in_file2.cpp:15: int calculus(int): global id: [5,0,0], local id: [1,0,0]
// CHECK_ACC: The test ended.

#include "assert_in_multiple_tus.hpp"
8 changes: 6 additions & 2 deletions SYCL/Assert/assert_in_multiple_tus_one_ndebug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt || true
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// Shouldn't fail on ACC as fallback assert isn't enqueued there
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK_ACC --input-file %t.txt
//
// CHECK-NOT: this message from calculus
// CHECK: {{.*}}assert_in_multiple_tus.hpp:20: int checkFunction(): global id: [5,0,0],
// CHECK-SAME: local id: [1,0,0] Assertion `X && "Nil in result"` failed.
// CHECK-NOT: this message from file2
// CHECK-NOT: The test ended.
//
// CHECK_ACC-NOT: {{.*}}assert_in_multiple_tus.hpp:20: int checkFunction(): global id: [5,0,0],
// CHECK_ACC: The test ended.
8 changes: 6 additions & 2 deletions SYCL/Assert/assert_in_multiple_tus_one_ndebug_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// Shouldn't fail on ACC as fallback assert isn't enqueued there
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt || true
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK_ACC --input-file %t.txt
//
// CHECK-NOT: this message from calculus
// FIXME Windows versionprints '(null)' instead of '<unknown func>' once in a
// FIXME Windows version prints '(null)' instead of '<unknown func>' once in a
// while for some insane reason.
// CHECK: {{.*}}assert_in_multiple_tus.hpp:20: {{<unknown func>|(null)}}: global id: [5,0,0],
// CHECK-SAME: local id: [1,0,0] Assertion `X && "Nil in result"` failed.
// CHECK-NOT: this message from file2
// CHECK-NOT: The test ended.
//
// CHECK_ACC-NOT: {{.*}}assert_in_multiple_tus.hpp:20: {{<unknown func>|(null)}}: global id: [5,0,0],
// CHECK_ACC: The test ended.
10 changes: 7 additions & 3 deletions SYCL/Assert/assert_in_multiple_tus_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt || true
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// Shouldn't fail on ACC as fallback assert isn't enqueued there
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK_ACC --input-file %t.txt
//
// FIXME Windows versionprints '(null)' instead of '<unknown func>' once in a
// FIXME Windows version prints '(null)' instead of '<unknown func>' once in a
// while for some insane reason.
// CHECK: {{.*}}kernels_in_file2.cpp:15: {{<unknown func>|(null)}}: global id: [5,0,0], local id: [1,0,0]
// CHECK-SAME: Assertion `X && "this message from calculus"` failed.
// CHECK-NOT: this message from file2
// CHECK-NOT: The test ended.
//
// CHECK_ACC-NOT: {{.*}}kernels_in_file2.cpp:15: {{<unknown func>|(null)}}: global id: [5,0,0], local id: [1,0,0]
// CHECK_ACC: The test ended.

#include "assert_in_multiple_tus.hpp"
8 changes: 6 additions & 2 deletions SYCL/Assert/assert_in_one_kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt || true
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// Shouldn't fail on ACC as fallback assert isn't enqueued there
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK_ACC --input-file %t.txt
//
// CHECK: {{.*}}assert_in_one_kernel.hpp:10: void kernelFunc(int *, int): global id: [{{[0-3]}},0,0], local id: [0,0,0]
// CHECK-SAME: Assertion `Buf[wiID] != 0 && "from assert statement"` failed.
// CHECK-NOT: The test ended.
//
// CHECK_ACC-NOT: {{.*}}assert_in_one_kernel.hpp:10: void kernelFunc(int *, int): global id: [{{[0-3]}},0,0], local id: [0,0,0]
// CHECK_ACC: The test ended.

#include "assert_in_one_kernel.hpp"
10 changes: 7 additions & 3 deletions SYCL/Assert/assert_in_one_kernel_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt || true
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// Shouldn't fail on ACC as fallback assert isn't enqueued there
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK_ACC --input-file %t.txt
//
// FIXME Windows versionprints '(null)' instead of '<unknown func>' once in a
// FIXME Windows version prints '(null)' instead of '<unknown func>' once in a
// while for some insane reason.
// CHECK: {{.*}}assert_in_one_kernel.hpp:10: {{<unknown func>|(null)}}: global id: [{{[0-3]}},0,0], local id: [0,0,0]
// CHECK-SAME: Assertion `Buf[wiID] != 0 && "from assert statement"` failed.
// CHECK-NOT: The test ended.
//
// CHECK_ACC-NOT: {{.*}}assert_in_one_kernel.hpp:10: {{<unknown func>|(null)}}: global id: [{{[0-3]}},0,0], local id: [0,0,0]
// CHECK_ACC: The test ended.

#include "assert_in_one_kernel.hpp"
8 changes: 6 additions & 2 deletions SYCL/Assert/assert_in_simultaneous_kernels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt || true
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// Shouldn't fail on ACC as fallback assert isn't enqueued there
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK_ACC --input-file %t.txt
//
// CHECK: {{.*}}assert_in_simultaneous_kernels.hpp:12: void assertFunc(): global id: [9,7,0], local id: [0,0,0]
// CHECK-SAME: Assertion `false && "from assert statement"` failed.
// CHECK-NOT: The test ended.
//
// CHECK_ACC-NOT: {{.*}}assert_in_simultaneous_kernels.hpp:12: void assertFunc(): global id: [9,7,0], local id: [0,0,0]
// CHECK_ACC: The test ended.

#include "assert_in_simultaneous_kernels.hpp"
10 changes: 7 additions & 3 deletions SYCL/Assert/assert_in_simultaneous_kernels_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt || true
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// Shouldn't fail on ACC as fallback assert isn't enqueued there
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK_ACC --input-file %t.txt
//
// FIXME Windows versionprints '(null)' instead of '<unknown func>' once in a
// FIXME Windows version prints '(null)' instead of '<unknown func>' once in a
// while for some insane reason.
// CHECK: {{.*}}assert_in_simultaneous_kernels.hpp:12: {{<unknown func>|(null)}}: global id: [9,7,0], local id: [0,0,0]
// CHECK-SAME: Assertion `false && "from assert statement"` failed.
// CHECK-NOT: The test ended.
//
// CHECK_ACC-NOT: {{.*}}assert_in_simultaneous_kernels.hpp:12: {{<unknown func>|(null)}}: global id: [9,7,0], local id: [0,0,0]
// CHECK_ACC: The test ended.

#include "assert_in_simultaneous_kernels.hpp"
8 changes: 6 additions & 2 deletions SYCL/Assert/assert_in_simultaneously_multiple_tus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt || true
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// Shouldn't fail on ACC as fallback assert isn't enqueued there
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK_ACC --input-file %t.txt
//
// CHECK: {{this message from file1|this message from file2}}
// CHECK-NOT: The test ended.
//
// CHECK_ACC-NOT: {{this message from file1|this message from file2}}
// CHECK_ACC: The test ended.

#include "Inputs/kernels_in_file2.hpp"
#include <CL/sycl.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt || true
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
// Shouldn't fail on ACC as fallback assert isn't enqueued there
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --check-prefix=CHECK_ACC --input-file %t.txt
//
// CHECK: this message from file1
// CHECK-NOT: this message from file2
// CHECK-NOT: The test ended.
//
// CHECK_ACC: The test ended.