diff --git a/SYCL/.clang-format b/SYCL/.clang-format index 0fb3ce609e..b9df8e7314 100644 --- a/SYCL/.clang-format +++ b/SYCL/.clang-format @@ -1,2 +1,2 @@ BasedOnStyle: LLVM -CommentPragmas: "(RUN|FAIL|REQUIRES|UNSUPPORTED|CHECK) *:|expected-" +CommentPragmas: "(RUN|FAIL|REQUIRES|UNSUPPORTED|CHECK[A-Za-z0-9_-]*) *:|expected-" diff --git a/SYCL/Assert/assert_in_kernels.cpp b/SYCL/Assert/assert_in_kernels.cpp index df9574badc..ae1d8a2d4e 100644 --- a/SYCL/Assert/assert_in_kernels.cpp +++ b/SYCL/Assert/assert_in_kernels.cpp @@ -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" diff --git a/SYCL/Assert/assert_in_kernels_win.cpp b/SYCL/Assert/assert_in_kernels_win.cpp index 706e11c4bf..f7c764e519 100644 --- a/SYCL/Assert/assert_in_kernels_win.cpp +++ b/SYCL/Assert/assert_in_kernels_win.cpp @@ -1,18 +1,23 @@ // REQUIRES: windows +// UNSUPPORTED: cuda || hip // RUN: %clangxx -DSYCL_ENABLE_FALLBACK_ASSERT -fsycl -fsycl-targets=%sycl_triple %s -o %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true // 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 '' once in a +// FIXME Windows version prints '(null)' instead of '' once in a // while for some insane reason. // CHECK: {{.*}}assert_in_kernels.hpp:26: {{|(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: {{|(null)}}: global id: [{{[0,2]}},0,0], local id: [0,0,0] +// CHECK-ACC: The test ended. #include "assert_in_kernels.hpp" diff --git a/SYCL/Assert/assert_in_multiple_tus.cpp b/SYCL/Assert/assert_in_multiple_tus.cpp index 6b271b12b8..6e21e73304 100644 --- a/SYCL/Assert/assert_in_multiple_tus.cpp +++ b/SYCL/Assert/assert_in_multiple_tus.cpp @@ -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" diff --git a/SYCL/Assert/assert_in_multiple_tus_one_ndebug.cpp b/SYCL/Assert/assert_in_multiple_tus_one_ndebug.cpp index dcbb1eaf9c..881a24b3e4 100644 --- a/SYCL/Assert/assert_in_multiple_tus_one_ndebug.cpp +++ b/SYCL/Assert/assert_in_multiple_tus_one_ndebug.cpp @@ -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. diff --git a/SYCL/Assert/assert_in_multiple_tus_one_ndebug_win.cpp b/SYCL/Assert/assert_in_multiple_tus_one_ndebug_win.cpp index 901ba4a7c5..a8ed4bc381 100644 --- a/SYCL/Assert/assert_in_multiple_tus_one_ndebug_win.cpp +++ b/SYCL/Assert/assert_in_multiple_tus_one_ndebug_win.cpp @@ -1,16 +1,21 @@ // REQUIRES: windows +// UNSUPPORTED: cuda || hip // 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 // RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true // 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 '' once in a +// FIXME Windows version prints '(null)' instead of '' once in a // while for some insane reason. // CHECK: {{.*}}assert_in_multiple_tus.hpp:20: {{|(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: {{|(null)}}: global id: [5,0,0], +// CHECK-ACC: The test ended. diff --git a/SYCL/Assert/assert_in_multiple_tus_win.cpp b/SYCL/Assert/assert_in_multiple_tus_win.cpp index 2427b6b0e0..b04fa4740c 100644 --- a/SYCL/Assert/assert_in_multiple_tus_win.cpp +++ b/SYCL/Assert/assert_in_multiple_tus_win.cpp @@ -1,17 +1,22 @@ // REQUIRES: windows +// UNSUPPORTED: cuda || hip // RUN: %clangxx -DSYCL_ENABLE_FALLBACK_ASSERT -fsycl -fsycl-targets=%sycl_triple -I %S/Inputs %s %S/Inputs/kernels_in_file2.cpp -o %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true // 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 '' once in a +// FIXME Windows version prints '(null)' instead of '' once in a // while for some insane reason. // CHECK: {{.*}}kernels_in_file2.cpp:15: {{|(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: {{|(null)}}: global id: [5,0,0], local id: [1,0,0] +// CHECK-ACC: The test ended. #include "assert_in_multiple_tus.hpp" diff --git a/SYCL/Assert/assert_in_one_kernel.cpp b/SYCL/Assert/assert_in_one_kernel.cpp index 5625cad660..90c9c2d843 100644 --- a/SYCL/Assert/assert_in_one_kernel.cpp +++ b/SYCL/Assert/assert_in_one_kernel.cpp @@ -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" diff --git a/SYCL/Assert/assert_in_one_kernel_win.cpp b/SYCL/Assert/assert_in_one_kernel_win.cpp index e77d2da41e..9516c11061 100644 --- a/SYCL/Assert/assert_in_one_kernel_win.cpp +++ b/SYCL/Assert/assert_in_one_kernel_win.cpp @@ -1,16 +1,21 @@ // REQUIRES: windows +// UNSUPPORTED: cuda || hip // RUN: %clangxx -DSYCL_ENABLE_FALLBACK_ASSERT -fsycl -fsycl-targets=%sycl_triple %s -o %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true // 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 '' once in a +// FIXME Windows version prints '(null)' instead of '' once in a // while for some insane reason. // CHECK: {{.*}}assert_in_one_kernel.hpp:10: {{|(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: {{|(null)}}: global id: [{{[0-3]}},0,0], local id: [0,0,0] +// CHECK-ACC: The test ended. #include "assert_in_one_kernel.hpp" diff --git a/SYCL/Assert/assert_in_simultaneous_kernels.cpp b/SYCL/Assert/assert_in_simultaneous_kernels.cpp index 54f9f4d523..58cbf16e11 100644 --- a/SYCL/Assert/assert_in_simultaneous_kernels.cpp +++ b/SYCL/Assert/assert_in_simultaneous_kernels.cpp @@ -12,11 +12,15 @@ // release yet. // RUN: env SYCL_PI_LEVEL_ZERO_TRACK_INDIRECT_ACCESS_MEMORY=1 %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" diff --git a/SYCL/Assert/assert_in_simultaneous_kernels_win.cpp b/SYCL/Assert/assert_in_simultaneous_kernels_win.cpp index a0bd368a94..5d40a54d48 100644 --- a/SYCL/Assert/assert_in_simultaneous_kernels_win.cpp +++ b/SYCL/Assert/assert_in_simultaneous_kernels_win.cpp @@ -1,4 +1,5 @@ // REQUIRES: windows +// UNSUPPORTED: cuda || hip // RUN: %clangxx -DSYCL_ENABLE_FALLBACK_ASSERT -fsycl -fsycl-targets=%sycl_triple %s -o %t.out %threads_lib // RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true // RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt @@ -10,13 +11,17 @@ // release yet. // RUN: env SYCL_PI_LEVEL_ZERO_TRACK_INDIRECT_ACCESS_MEMORY=1 %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 '' once in a +// FIXME Windows version prints '(null)' instead of '' once in a // while for some insane reason. // CHECK: {{.*}}assert_in_simultaneous_kernels.hpp:12: {{|(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: {{|(null)}}: global id: [9,7,0], local id: [0,0,0] +// CHECK-ACC: The test ended. #include "assert_in_simultaneous_kernels.hpp" diff --git a/SYCL/Assert/assert_in_simultaneously_multiple_tus.cpp b/SYCL/Assert/assert_in_simultaneously_multiple_tus.cpp index ca33a18218..8bd0d36c53 100644 --- a/SYCL/Assert/assert_in_simultaneously_multiple_tus.cpp +++ b/SYCL/Assert/assert_in_simultaneously_multiple_tus.cpp @@ -11,11 +11,15 @@ // release yet. // RUN: env SYCL_PI_LEVEL_ZERO_TRACK_INDIRECT_ACCESS_MEMORY=1 %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 diff --git a/SYCL/Assert/assert_in_simultaneously_multiple_tus_one_ndebug.cpp b/SYCL/Assert/assert_in_simultaneously_multiple_tus_one_ndebug.cpp index 3764c2a425..7e5a4f8180 100644 --- a/SYCL/Assert/assert_in_simultaneously_multiple_tus_one_ndebug.cpp +++ b/SYCL/Assert/assert_in_simultaneously_multiple_tus_one_ndebug.cpp @@ -11,9 +11,12 @@ // release yet. // RUN: env SYCL_PI_LEVEL_ZERO_TRACK_INDIRECT_ACCESS_MEMORY=1 %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.