diff --git a/SYCL/Assert/assert_in_kernels.cpp b/SYCL/Assert/assert_in_kernels.cpp index df9574badc..5d5cde01a2 100644 --- a/SYCL/Assert/assert_in_kernels.cpp +++ b/SYCL/Assert/assert_in_kernels.cpp @@ -2,12 +2,9 @@ // FIXME unsupported on CUDA and HIP until fallback libdevice becomes available // 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 +// RUN: %CPU_RUN_PLACEHOLDER %t.out %CPU_ERR_REDIRECT %CPU_CHECK_PLACEHOLDER +// RUN: %GPU_RUN_PLACEHOLDER %t.out %GPU_ERR_REDIRECT %GPU_CHECK_PLACEHOLDER +// RUN: %ACC_RUN_PLACEHOLDER %t.out %ACC_ERR_REDIRECT %ACC_CHECK_PLACEHOLDER // // 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] diff --git a/SYCL/Assert/assert_in_multiple_tus.cpp b/SYCL/Assert/assert_in_multiple_tus.cpp index 6b271b12b8..b2033fdac4 100644 --- a/SYCL/Assert/assert_in_multiple_tus.cpp +++ b/SYCL/Assert/assert_in_multiple_tus.cpp @@ -2,12 +2,9 @@ // FIXME unsupported on CUDA and HIP until fallback libdevice becomes available // 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 +// RUN: %CPU_RUN_PLACEHOLDER %t.out %CPU_ERR_REDIRECT %CPU_CHECK_PLACEHOLDER +// RUN: %GPU_RUN_PLACEHOLDER %t.out %GPU_ERR_REDIRECT %GPU_CHECK_PLACEHOLDER +// RUN: %ACC_RUN_PLACEHOLDER %t.out %ACC_ERR_REDIRECT %ACC_CHECK_PLACEHOLDER // // 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. diff --git a/SYCL/Assert/assert_in_multiple_tus_one_ndebug.cpp b/SYCL/Assert/assert_in_multiple_tus_one_ndebug.cpp index dcbb1eaf9c..83e54a39b0 100644 --- a/SYCL/Assert/assert_in_multiple_tus_one_ndebug.cpp +++ b/SYCL/Assert/assert_in_multiple_tus_one_ndebug.cpp @@ -2,12 +2,9 @@ // FIXME unsupported on CUDA and HIP until fallback libdevice becomes available // 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 -// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt || true -// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt +// RUN: %CPU_RUN_PLACEHOLDER %t.out %CPU_ERR_REDIRECT %CPU_CHECK_PLACEHOLDER +// RUN: %GPU_RUN_PLACEHOLDER %t.out %GPU_ERR_REDIRECT %GPU_CHECK_PLACEHOLDER +// RUN: %ACC_RUN_PLACEHOLDER %t.out %ACC_ERR_REDIRECT %ACC_CHECK_PLACEHOLDER // // CHECK-NOT: this message from calculus // CHECK: {{.*}}assert_in_multiple_tus.hpp:20: int checkFunction(): global id: [5,0,0], 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..a47f3d6a9d 100644 --- a/SYCL/Assert/assert_in_multiple_tus_one_ndebug_win.cpp +++ b/SYCL/Assert/assert_in_multiple_tus_one_ndebug_win.cpp @@ -1,11 +1,8 @@ // REQUIRES: windows // 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 -// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt || true -// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt +// RUN: %CPU_RUN_PLACEHOLDER %t.out %CPU_ERR_REDIRECT %CPU_CHECK_PLACEHOLDER +// RUN: %GPU_RUN_PLACEHOLDER %t.out %GPU_ERR_REDIRECT %GPU_CHECK_PLACEHOLDER +// RUN: %ACC_RUN_PLACEHOLDER %t.out %ACC_ERR_REDIRECT %ACC_CHECK_PLACEHOLDER // // CHECK-NOT: this message from calculus // FIXME Windows versionprints '(null)' instead of '' once in a diff --git a/SYCL/Assert/assert_in_multiple_tus_win.cpp b/SYCL/Assert/assert_in_multiple_tus_win.cpp index 2427b6b0e0..c10eb279e1 100644 --- a/SYCL/Assert/assert_in_multiple_tus_win.cpp +++ b/SYCL/Assert/assert_in_multiple_tus_win.cpp @@ -1,11 +1,8 @@ // REQUIRES: windows // 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 +// RUN: %CPU_RUN_PLACEHOLDER %t.out %CPU_ERR_REDIRECT %CPU_CHECK_PLACEHOLDER +// RUN: %GPU_RUN_PLACEHOLDER %t.out %GPU_ERR_REDIRECT %GPU_CHECK_PLACEHOLDER +// RUN: %ACC_RUN_PLACEHOLDER %t.out %ACC_ERR_REDIRECT %ACC_CHECK_PLACEHOLDER // // FIXME Windows versionprints '(null)' instead of '' once in a // while for some insane reason. diff --git a/SYCL/Assert/assert_in_one_kernel.cpp b/SYCL/Assert/assert_in_one_kernel.cpp index 5625cad660..4281cdcb55 100644 --- a/SYCL/Assert/assert_in_one_kernel.cpp +++ b/SYCL/Assert/assert_in_one_kernel.cpp @@ -2,12 +2,9 @@ // FIXME unsupported on CUDA and HIP until fallback libdevice becomes available // 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 +// RUN: %CPU_RUN_PLACEHOLDER %t.out %CPU_ERR_REDIRECT %CPU_CHECK_PLACEHOLDER +// RUN: %GPU_RUN_PLACEHOLDER %t.out %GPU_ERR_REDIRECT %GPU_CHECK_PLACEHOLDER +// RUN: %ACC_RUN_PLACEHOLDER %t.out %ACC_ERR_REDIRECT %ACC_CHECK_PLACEHOLDER // // 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. diff --git a/SYCL/Assert/assert_in_one_kernel_win.cpp b/SYCL/Assert/assert_in_one_kernel_win.cpp index e77d2da41e..65e1ae52b5 100644 --- a/SYCL/Assert/assert_in_one_kernel_win.cpp +++ b/SYCL/Assert/assert_in_one_kernel_win.cpp @@ -1,11 +1,8 @@ // REQUIRES: windows // 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 +// RUN: %CPU_RUN_PLACEHOLDER %t.out %CPU_ERR_REDIRECT %CPU_CHECK_PLACEHOLDER +// RUN: %GPU_RUN_PLACEHOLDER %t.out %GPU_ERR_REDIRECT %GPU_CHECK_PLACEHOLDER +// RUN: %ACC_RUN_PLACEHOLDER %t.out %ACC_ERR_REDIRECT %ACC_CHECK_PLACEHOLDER // // FIXME Windows versionprints '(null)' instead of '' once in a // while for some insane reason. diff --git a/SYCL/Assert/assert_in_simultaneous_kernels.cpp b/SYCL/Assert/assert_in_simultaneous_kernels.cpp index 54f9f4d523..18913c76e8 100644 --- a/SYCL/Assert/assert_in_simultaneous_kernels.cpp +++ b/SYCL/Assert/assert_in_simultaneous_kernels.cpp @@ -2,18 +2,15 @@ // FIXME unsupported on CUDA and HIP until fallback libdevice becomes available // 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 +// RUN: %CPU_RUN_PLACEHOLDER %t.out %CPU_ERR_REDIRECT %CPU_CHECK_PLACEHOLDER // // Since this is a multi-threaded application enable memory tracking and // deferred release feature in the Level Zero plugin to avoid releasing memory // too early. This is necessary because currently SYCL RT sets indirect access // flag for all kernels and the Level Zero runtime doesn't support deferred // 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 +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_PI_LEVEL_ZERO_TRACK_INDIRECT_ACCESS_MEMORY=1 %t.out %GPU_ERR_REDIRECT %GPU_CHECK_PLACEHOLDER +// RUN: %ACC_RUN_PLACEHOLDER %t.out %ACC_ERR_REDIRECT %ACC_CHECK_PLACEHOLDER // // 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. diff --git a/SYCL/Assert/assert_in_simultaneous_kernels_win.cpp b/SYCL/Assert/assert_in_simultaneous_kernels_win.cpp index a0bd368a94..498b27173b 100644 --- a/SYCL/Assert/assert_in_simultaneous_kernels_win.cpp +++ b/SYCL/Assert/assert_in_simultaneous_kernels_win.cpp @@ -1,17 +1,14 @@ // REQUIRES: windows // 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 +// RUN: %CPU_RUN_PLACEHOLDER %t.out %CPU_ERR_REDIRECT %CPU_CHECK_PLACEHOLDER // // Since this is a multi-threaded application enable memory tracking and // deferred release feature in the Level Zero plugin to avoid releasing memory // too early. This is necessary because currently SYCL RT sets indirect access // flag for all kernels and the Level Zero runtime doesn't support deferred // 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 +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_PI_LEVEL_ZERO_TRACK_INDIRECT_ACCESS_MEMORY=1 %t.out %GPU_ERR_REDIRECT %GPU_CHECK_PLACEHOLDER +// RUN: %ACC_RUN_PLACEHOLDER %t.out %ACC_ERR_REDIRECT %ACC_CHECK_PLACEHOLDER // // FIXME Windows versionprints '(null)' instead of '' once in a // while for some insane reason. diff --git a/SYCL/Assert/assert_in_simultaneously_multiple_tus.cpp b/SYCL/Assert/assert_in_simultaneously_multiple_tus.cpp index ca33a18218..8f13be817c 100644 --- a/SYCL/Assert/assert_in_simultaneously_multiple_tus.cpp +++ b/SYCL/Assert/assert_in_simultaneously_multiple_tus.cpp @@ -1,18 +1,15 @@ // FIXME unsupported on CUDA and HIP until fallback libdevice becomes available // 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 %threads_lib -// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true -// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt +// RUN: %CPU_RUN_PLACEHOLDER %t.out %CPU_ERR_REDIRECT %CPU_CHECK_PLACEHOLDER // // Since this is a multi-threaded application enable memory tracking and // deferred release feature in the Level Zero plugin to avoid releasing memory // too early. This is necessary because currently SYCL RT sets indirect access // flag for all kernels and the Level Zero runtime doesn't support deferred // 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 +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_PI_LEVEL_ZERO_TRACK_INDIRECT_ACCESS_MEMORY=1 %t.out %GPU_ERR_REDIRECT %GPU_CHECK_PLACEHOLDER +// RUN: %ACC_RUN_PLACEHOLDER %t.out %ACC_ERR_REDIRECT %ACC_CHECK_PLACEHOLDER // // CHECK: {{this message from file1|this message from file2}} // CHECK-NOT: The test ended. 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..cbb1d62e80 100644 --- a/SYCL/Assert/assert_in_simultaneously_multiple_tus_one_ndebug.cpp +++ b/SYCL/Assert/assert_in_simultaneously_multiple_tus_one_ndebug.cpp @@ -1,18 +1,15 @@ // FIXME unsupported on CUDA and HIP until fallback libdevice becomes available // UNSUPPORTED: cuda || hip // RUN: %clangxx -DSYCL_ENABLE_FALLBACK_ASSERT -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 -// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true -// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt +// RUN: %CPU_RUN_PLACEHOLDER %t.out %CPU_ERR_REDIRECT %CPU_CHECK_PLACEHOLDER // // Since this is a multi-threaded application enable memory tracking and // deferred release feature in the Level Zero plugin to avoid releasing memory // too early. This is necessary because currently SYCL RT sets indirect access // flag for all kernels and the Level Zero runtime doesn't support deferred // 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 +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_PI_LEVEL_ZERO_TRACK_INDIRECT_ACCESS_MEMORY=1 %t.out %GPU_ERR_REDIRECT %GPU_CHECK_PLACEHOLDER +// RUN: %ACC_RUN_PLACEHOLDER %t.out %ACC_ERR_REDIRECT %ACC_CHECK_PLACEHOLDER // // CHECK: this message from file1 // CHECK-NOT: this message from file2 diff --git a/SYCL/Basic/buffer/native_buffer_creation_flags.cpp b/SYCL/Basic/buffer/native_buffer_creation_flags.cpp index 68e912e3e4..79cf11602b 100644 --- a/SYCL/Basic/buffer/native_buffer_creation_flags.cpp +++ b/SYCL/Basic/buffer/native_buffer_creation_flags.cpp @@ -1,5 +1,5 @@ // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -// RUN: %CPU_RUN_PLACEHOLDER SYCL_PI_TRACE=-1 %t.out 2>&1 %CPU_CHECK_PLACEHOLDER +// RUN: %CPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=-1 %t.out %CPU_ERR_REDIRECT %CPU_CHECK_PLACEHOLDER #include diff --git a/SYCL/Basic/enqueue_barrier.cpp b/SYCL/Basic/enqueue_barrier.cpp index 1f90286f64..ee1e48098e 100644 --- a/SYCL/Basic/enqueue_barrier.cpp +++ b/SYCL/Basic/enqueue_barrier.cpp @@ -1,7 +1,7 @@ // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -// RUN: env SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out 2>&1 %CPU_CHECK_PLACEHOLDER -// RUN: env SYCL_PI_TRACE=2 %GPU_RUN_PLACEHOLDER %t.out 2>&1 %GPU_CHECK_PLACEHOLDER -// RUN: env SYCL_PI_TRACE=2 %ACC_RUN_PLACEHOLDER %t.out 2>&1 %ACC_CHECK_PLACEHOLDER +// RUN: %CPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %CPU_ERR_REDIRECT %CPU_CHECK_PLACEHOLDER +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %GPU_ERR_REDIRECT %GPU_CHECK_PLACEHOLDER +// RUN: %ACC_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %ACC_ERR_REDIRECT %ACC_CHECK_PLACEHOLDER // The test is failing sporadically on Windows OpenCL RTs // Disabling on windows until fixed diff --git a/SYCL/Basic/event_release.cpp b/SYCL/Basic/event_release.cpp index 37483de619..48ad4c34ad 100644 --- a/SYCL/Basic/event_release.cpp +++ b/SYCL/Basic/event_release.cpp @@ -1,5 +1,5 @@ // RUN: %clangxx -fsycl %s -o %t.out -// RUN: env SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out 2>&1 %CPU_CHECK_PLACEHOLDER +// RUN: %CPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %CPU_ERR_REDIRECT %CPU_CHECK_PLACEHOLDER #include #include #include diff --git a/SYCL/Basic/host-task-dependency.cpp b/SYCL/Basic/host-task-dependency.cpp index 2484e80f5a..1fa20b2337 100644 --- a/SYCL/Basic/host-task-dependency.cpp +++ b/SYCL/Basic/host-task-dependency.cpp @@ -1,7 +1,7 @@ // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out %threads_lib -// RUN: %CPU_RUN_PLACEHOLDER SYCL_PI_TRACE=-1 %t.out 2>&1 %CPU_CHECK_PLACEHOLDER -// RUN: %GPU_RUN_PLACEHOLDER SYCL_PI_TRACE=-1 %t.out 2>&1 %GPU_CHECK_PLACEHOLDER -// RUN: %ACC_RUN_PLACEHOLDER SYCL_PI_TRACE=-1 %t.out 2>&1 %ACC_CHECK_PLACEHOLDER +// RUN: %CPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=-1 %t.out %CPU_ERR_REDIRECT %CPU_CHECK_PLACEHOLDER +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=-1 %t.out %GPU_ERR_REDIRECT %GPU_CHECK_PLACEHOLDER +// RUN: %ACC_RUN_PLACEHOLDER env SYCL_PI_TRACE=-1 %t.out %ACC_ERR_REDIRECT %ACC_CHECK_PLACEHOLDER // // TODO: Behaviour is unstable for level zero on Windows. Enable when fixed. // TODO: The test is sporadically fails on CUDA. Enable when fixed. diff --git a/SYCL/Basic/info_ocl_version.cpp b/SYCL/Basic/info_ocl_version.cpp index 46ea03fb33..53bfd40768 100644 --- a/SYCL/Basic/info_ocl_version.cpp +++ b/SYCL/Basic/info_ocl_version.cpp @@ -1,8 +1,8 @@ // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out // RUN: %HOST_RUN_PLACEHOLDER %t.out -// RUN: env %CPU_RUN_PLACEHOLDER %t.out -// RUN: env %GPU_RUN_PLACEHOLDER %t.out -// RUN: env %ACC_RUN_PLACEHOLDER %t.out +// RUN: %CPU_RUN_PLACEHOLDER %t.out +// RUN: %GPU_RUN_PLACEHOLDER %t.out +// RUN: %ACC_RUN_PLACEHOLDER %t.out //==--------info_ocl_version.cpp - SYCL objects get_info() test ------------==// // diff --git a/SYCL/Basic/kernel_bundle/kernel_bundle_api.cpp b/SYCL/Basic/kernel_bundle/kernel_bundle_api.cpp index 0c1473f48a..e260857b5c 100644 --- a/SYCL/Basic/kernel_bundle/kernel_bundle_api.cpp +++ b/SYCL/Basic/kernel_bundle/kernel_bundle_api.cpp @@ -3,7 +3,7 @@ // involved leads to multiple definition of AssertHappened structure due each // device image is statically linked against fallback libdevice. // RUN: %clangxx -DSYCL_DISABLE_FALLBACK_ASSERT=1 -fsycl -fsycl-device-code-split=per_kernel -fsycl-targets=%sycl_triple %s -o %t.out -// RUN: env SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out %CPU_CHECK_PLACEHOLDER +// RUN: %CPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %CPU_CHECK_PLACEHOLDER // // -fsycl-device-code-split is not supported for cuda // UNSUPPORTED: cuda || hip diff --git a/SYCL/Basic/parallel_for_range_roundup.cpp b/SYCL/Basic/parallel_for_range_roundup.cpp index 7ae3280d42..23adcf4384 100644 --- a/SYCL/Basic/parallel_for_range_roundup.cpp +++ b/SYCL/Basic/parallel_for_range_roundup.cpp @@ -1,5 +1,5 @@ // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -// RUN: env SYCL_PARALLEL_FOR_RANGE_ROUNDING_TRACE=1 %GPU_RUN_PLACEHOLDER %t.out %GPU_CHECK_PLACEHOLDER +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_PARALLEL_FOR_RANGE_ROUNDING_TRACE=1 %t.out %GPU_CHECK_PLACEHOLDER #include diff --git a/SYCL/Basic/queue/release.cpp b/SYCL/Basic/queue/release.cpp index c690671a6a..ef4c358393 100644 --- a/SYCL/Basic/queue/release.cpp +++ b/SYCL/Basic/queue/release.cpp @@ -1,7 +1,7 @@ // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -// RUN: env SYCL_PI_TRACE=2 %GPU_RUN_PLACEHOLDER %t.out %GPU_CHECK_PLACEHOLDER -// RUN: env SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out %CPU_CHECK_PLACEHOLDER -// RUN: env SYCL_PI_TRACE=2 %ACC_RUN_PLACEHOLDER %t.out %ACC_CHECK_PLACEHOLDER +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %GPU_CHECK_PLACEHOLDER +// RUN: %CPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %CPU_CHECK_PLACEHOLDER +// RUN: %ACC_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %ACC_CHECK_PLACEHOLDER // // XFAIL: hip_nvidia diff --git a/SYCL/Basic/use_pinned_host_memory.cpp b/SYCL/Basic/use_pinned_host_memory.cpp index a596093313..c2b42c6189 100644 --- a/SYCL/Basic/use_pinned_host_memory.cpp +++ b/SYCL/Basic/use_pinned_host_memory.cpp @@ -1,5 +1,5 @@ // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -// RUN: env SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out 2>&1 %CPU_CHECK_PLACEHOLDER +// RUN: %CPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %CPU_ERR_REDIRECT %CPU_CHECK_PLACEHOLDER #include diff --git a/SYCL/CMakeLists.txt b/SYCL/CMakeLists.txt index d105896287..cdbef3efb9 100644 --- a/SYCL/CMakeLists.txt +++ b/SYCL/CMakeLists.txt @@ -5,6 +5,17 @@ endif() find_package(Threads REQUIRED) set(SYCL_THREADS_LIB ${CMAKE_THREAD_LIBS_INIT}) +find_package(Python3 COMPONENTS Interpreter REQUIRED) + +if (NOT TEST_SUITE_LIT) + message(FATAL_ERROR "LIT was not found, specify TEST_SUITE_LIT") +endif() + +find_program(FILECHECK FileCheck) +if (NOT FILECHECK) + message(FATAL_ERROR "FileCheck utility was not found in PATH") +endif() + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in" "${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg") if(CHECK_SYCL_ALL) @@ -20,7 +31,7 @@ if(CHECK_SYCL_ALL) string(REPLACE "," "_" TARGET check-sycl-${TARGET_BE}-${TARGET_DEVICES}) add_custom_target(${TARGET} - COMMAND python3 ${TEST_SUITE_LIT} ${TEST_SUITE_LIT_FLAGS} --param sycl_be=${TARGET_BE} --param target_devices=${TARGET_DEVICES} . + COMMAND ${Python3_EXECUTABLE} ${TEST_SUITE_LIT} ${TEST_SUITE_LIT_FLAGS} --param sycl_be=${TARGET_BE} --param target_devices=${TARGET_DEVICES} . COMMENT "Running the SYCL tests for ${TARGET} backend" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} DEPENDS ${TEST_SUITE_TARGETS} diff --git a/SYCL/DeprecatedFeatures/SpecConsts1.2.1/spec_const_redefine.cpp b/SYCL/DeprecatedFeatures/SpecConsts1.2.1/spec_const_redefine.cpp index 57be8ae484..35d774bd54 100644 --- a/SYCL/DeprecatedFeatures/SpecConsts1.2.1/spec_const_redefine.cpp +++ b/SYCL/DeprecatedFeatures/SpecConsts1.2.1/spec_const_redefine.cpp @@ -4,8 +4,8 @@ // program builds at run-time // RUN: %clangxx -DSYCL_DISABLE_FALLBACK_ASSERT -D__SYCL_INTERNAL_API -fsycl -fsycl-targets=%sycl_triple %s -o %t.out // RUN: %HOST_RUN_PLACEHOLDER %t.out -// RUN: env SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out 2>&1 %CPU_CHECK_PLACEHOLDER -// RUN: env SYCL_PI_TRACE=2 %GPU_RUN_PLACEHOLDER %t.out 2>&1 %GPU_CHECK_PLACEHOLDER +// RUN: %CPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %CPU_ERR_REDIRECT %CPU_CHECK_PLACEHOLDER +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %GPU_ERR_REDIRECT %GPU_CHECK_PLACEHOLDER // //==----------- spec_const_redefine.cpp ------------------------------------==// // diff --git a/SYCL/DeprecatedFeatures/SpecConsts1.2.1/spec_const_redefine_accelerator.cpp b/SYCL/DeprecatedFeatures/SpecConsts1.2.1/spec_const_redefine_accelerator.cpp index 9621e2e5b8..dc9c195d1f 100644 --- a/SYCL/DeprecatedFeatures/SpecConsts1.2.1/spec_const_redefine_accelerator.cpp +++ b/SYCL/DeprecatedFeatures/SpecConsts1.2.1/spec_const_redefine_accelerator.cpp @@ -16,4 +16,4 @@ // XFAIL: opencl && accelerator // UNSUPPORTED: cuda || level_zero #include "spec_const_redefine_accelerator.cpp" -// RUN: env SYCL_PI_TRACE=2 %ACC_RUN_PLACEHOLDER %t.out 2>&1 %ACC_CHECK_PLACEHOLDER +// RUN: %ACC_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %ACC_ERR_REDIRECT %ACC_CHECK_PLACEHOLDER diff --git a/SYCL/DeprecatedFeatures/basic.cpp b/SYCL/DeprecatedFeatures/basic.cpp index 6dbcc6dd36..45fba9cda4 100644 --- a/SYCL/DeprecatedFeatures/basic.cpp +++ b/SYCL/DeprecatedFeatures/basic.cpp @@ -2,12 +2,12 @@ // REQUIRES: opencl || level_zero // RUN: rm -rf %t/cache_dir // RUN: %clangxx -D__SYCL_INTERNAL_API -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -// RUN: env SYCL_CACHE_PERSISTENT=1 SYCL_CACHE_DIR=%t/cache_dir SYCL_PI_TRACE=-1 %CPU_RUN_PLACEHOLDER %t.out %CPU_CHECK_PLACEHOLDER --check-prefixes=CHECK-BUILD -// RUN: env SYCL_CACHE_PERSISTENT=1 SYCL_CACHE_DIR=%t/cache_dir SYCL_PI_TRACE=-1 %CPU_RUN_PLACEHOLDER %t.out %CPU_CHECK_PLACEHOLDER --check-prefixes=CHECK-CACHE -// RUN: env SYCL_CACHE_PERSISTENT=1 SYCL_CACHE_DIR=%t/cache_dir SYCL_PI_TRACE=-1 %GPU_RUN_PLACEHOLDER %t.out %GPU_CHECK_PLACEHOLDER --check-prefixes=CHECK-BUILD -// RUN: env SYCL_CACHE_PERSISTENT=1 SYCL_CACHE_DIR=%t/cache_dir SYCL_PI_TRACE=-1 %GPU_RUN_PLACEHOLDER %t.out %GPU_CHECK_PLACEHOLDER --check-prefixes=CHECK-CACHE -// RUN: env SYCL_CACHE_PERSISTENT=1 SYCL_CACHE_DIR=%t/cache_dir SYCL_PI_TRACE=-1 %ACC_RUN_PLACEHOLDER %t.out %ACC_CHECK_PLACEHOLDER --check-prefixes=CHECK-BUILD -// RUN: env SYCL_CACHE_PERSISTENT=1 SYCL_CACHE_DIR=%t/cache_dir SYCL_PI_TRACE=-1 %ACC_RUN_PLACEHOLDER %t.out %ACC_CHECK_PLACEHOLDER --check-prefixes=CHECK-CACHE +// RUN: %CPU_RUN_PLACEHOLDER env SYCL_CACHE_PERSISTENT=1 SYCL_CACHE_DIR=%t/cache_dir SYCL_PI_TRACE=-1 %t.out %CPU_CHECK_PLACEHOLDER --check-prefixes=CHECK-BUILD +// RUN: %CPU_RUN_PLACEHOLDER env SYCL_CACHE_PERSISTENT=1 SYCL_CACHE_DIR=%t/cache_dir SYCL_PI_TRACE=-1 %t.out %CPU_CHECK_PLACEHOLDER --check-prefixes=CHECK-CACHE +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_CACHE_PERSISTENT=1 SYCL_CACHE_DIR=%t/cache_dir SYCL_PI_TRACE=-1 %t.out %GPU_CHECK_PLACEHOLDER --check-prefixes=CHECK-BUILD +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_CACHE_PERSISTENT=1 SYCL_CACHE_DIR=%t/cache_dir SYCL_PI_TRACE=-1 %t.out %GPU_CHECK_PLACEHOLDER --check-prefixes=CHECK-CACHE +// RUN: %ACC_RUN_PLACEHOLDER env SYCL_CACHE_PERSISTENT=1 SYCL_CACHE_DIR=%t/cache_dir SYCL_PI_TRACE=-1 %t.out %ACC_CHECK_PLACEHOLDER --check-prefixes=CHECK-BUILD +// RUN: %ACC_RUN_PLACEHOLDER env SYCL_CACHE_PERSISTENT=1 SYCL_CACHE_DIR=%t/cache_dir SYCL_PI_TRACE=-1 %t.out %ACC_CHECK_PLACEHOLDER --check-prefixes=CHECK-CACHE // // The test checks that caching works properly. #include "basic.hpp" diff --git a/SYCL/DeprecatedFeatures/spec_consts.cpp b/SYCL/DeprecatedFeatures/spec_consts.cpp index ee2e65c06c..b2eb43f046 100644 --- a/SYCL/DeprecatedFeatures/spec_consts.cpp +++ b/SYCL/DeprecatedFeatures/spec_consts.cpp @@ -4,12 +4,12 @@ // RUN: rm -rf %t/cache_dir // FIXME Temporary disable fallback assert here until fixed // RUN: %clangxx -D__SYCL_INTERNAL_API -fsycl -DSYCL_DISABLE_FALLBACK_ASSERT=1 -fsycl-targets=%sycl_triple %s -o %t.out -// RUN: env SYCL_CACHE_PERSISTENT=1 SYCL_CACHE_DIR=%t/cache_dir SYCL_PI_TRACE=-1 %CPU_RUN_PLACEHOLDER %t.out %CPU_CHECK_PLACEHOLDER --check-prefixes=CHECK-BUILD -// RUN: env SYCL_CACHE_PERSISTENT=1 SYCL_CACHE_DIR=%t/cache_dir SYCL_PI_TRACE=-1 %CPU_RUN_PLACEHOLDER %t.out %CPU_CHECK_PLACEHOLDER --check-prefixes=CHECK-CACHE -// RUN: env SYCL_CACHE_PERSISTENT=1 SYCL_CACHE_DIR=%t/cache_dir SYCL_PI_TRACE=-1 %GPU_RUN_PLACEHOLDER %t.out %GPU_CHECK_PLACEHOLDER --check-prefixes=CHECK-BUILD -// RUN: env SYCL_CACHE_PERSISTENT=1 SYCL_CACHE_DIR=%t/cache_dir SYCL_PI_TRACE=-1 %GPU_RUN_PLACEHOLDER %t.out %GPU_CHECK_PLACEHOLDER --check-prefixes=CHECK-CACHE -// RUN: env SYCL_CACHE_PERSISTENT=1 SYCL_CACHE_DIR=%t/cache_dir SYCL_PI_TRACE=-1 %ACC_RUN_PLACEHOLDER %t.out %ACC_CHECK_PLACEHOLDER --check-prefixes=CHECK-BUILD -// RUN: env SYCL_CACHE_PERSISTENT=1 SYCL_CACHE_DIR=%t/cache_dir SYCL_PI_TRACE=-1 %ACC_RUN_PLACEHOLDER %t.out %ACC_CHECK_PLACEHOLDER --check-prefixes=CHECK-CACHE +// RUN: %CPU_RUN_PLACEHOLDER env SYCL_CACHE_PERSISTENT=1 SYCL_CACHE_DIR=%t/cache_dir SYCL_PI_TRACE=-1 %t.out %CPU_CHECK_PLACEHOLDER --check-prefixes=CHECK-BUILD +// RUN: %CPU_RUN_PLACEHOLDER env SYCL_CACHE_PERSISTENT=1 SYCL_CACHE_DIR=%t/cache_dir SYCL_PI_TRACE=-1 %t.out %CPU_CHECK_PLACEHOLDER --check-prefixes=CHECK-CACHE +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_CACHE_PERSISTENT=1 SYCL_CACHE_DIR=%t/cache_dir SYCL_PI_TRACE=-1 %t.out %GPU_CHECK_PLACEHOLDER --check-prefixes=CHECK-BUILD +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_CACHE_PERSISTENT=1 SYCL_CACHE_DIR=%t/cache_dir SYCL_PI_TRACE=-1 %t.out %GPU_CHECK_PLACEHOLDER --check-prefixes=CHECK-CACHE +// RUN: %ACC_RUN_PLACEHOLDER env SYCL_CACHE_PERSISTENT=1 SYCL_CACHE_DIR=%t/cache_dir SYCL_PI_TRACE=-1 %t.out %ACC_CHECK_PLACEHOLDER --check-prefixes=CHECK-BUILD +// RUN: %ACC_RUN_PLACEHOLDER env SYCL_CACHE_PERSISTENT=1 SYCL_CACHE_DIR=%t/cache_dir SYCL_PI_TRACE=-1 %t.out %ACC_CHECK_PLACEHOLDER --check-prefixes=CHECK-CACHE // // The test checks that caching works properly for SYCL application containing // specialization constant values. diff --git a/SYCL/InorderQueue/in_order_property_trace.cpp b/SYCL/InorderQueue/in_order_property_trace.cpp index 8d932e9569..f4d6ef55ad 100644 --- a/SYCL/InorderQueue/in_order_property_trace.cpp +++ b/SYCL/InorderQueue/in_order_property_trace.cpp @@ -1,6 +1,6 @@ // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -// RUN: env SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out 2>&1 %CPU_CHECK_PLACEHOLDER -// RUN: env SYCL_PI_TRACE=2 %GPU_RUN_PLACEHOLDER %t.out 2>&1 %GPU_CHECK_PLACEHOLDER +// RUN: %CPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %CPU_ERR_REDIRECT %CPU_CHECK_PLACEHOLDER +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %GPU_ERR_REDIRECT %GPU_CHECK_PLACEHOLDER // // XFAIL: hip_nvidia // SYCL in order and default queue property trace test diff --git a/SYCL/KernelAndProgram/cache-build-result.cpp b/SYCL/KernelAndProgram/cache-build-result.cpp index d9458ec16b..5d7f9c3bd9 100644 --- a/SYCL/KernelAndProgram/cache-build-result.cpp +++ b/SYCL/KernelAndProgram/cache-build-result.cpp @@ -1,8 +1,8 @@ // RUN: %clangxx -fsycl -DSYCL_DISABLE_FALLBACK_ASSERT=1 %s -o %t.out // RUN: %clangxx -fsycl -DSYCL_DISABLE_FALLBACK_ASSERT=1 -DGPU %s -o %t_gpu.out -// RUN: env SYCL_CACHE_PERSISTENT=1 %CPU_RUN_PLACEHOLDER %t.out -// RUN: env SYCL_CACHE_PERSISTENT=1 %GPU_RUN_PLACEHOLDER %t_gpu.out -// RUN: env SYCL_CACHE_PERSISTENT=1 %ACC_RUN_PLACEHOLDER %t.out +// RUN: %CPU_RUN_PLACEHOLDER env SYCL_CACHE_PERSISTENT=1 %t.out +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_CACHE_PERSISTENT=1 %t_gpu.out +// RUN: %ACC_RUN_PLACEHOLDER env SYCL_CACHE_PERSISTENT=1 %t.out // XFAIL: cuda || hip #include diff --git a/SYCL/Plugin/enqueue-arg-order-buffer.cpp b/SYCL/Plugin/enqueue-arg-order-buffer.cpp index a517896e6e..ae2bd7cf53 100644 --- a/SYCL/Plugin/enqueue-arg-order-buffer.cpp +++ b/SYCL/Plugin/enqueue-arg-order-buffer.cpp @@ -1,7 +1,7 @@ // UNSUPPORTED: hip_nvidia // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -// RUN: env SYCL_PI_TRACE=2 %GPU_RUN_PLACEHOLDER %t.out %GPU_CHECK_PLACEHOLDER -// RUN: env SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out %CPU_CHECK_PLACEHOLDER +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %GPU_CHECK_PLACEHOLDER +// RUN: %CPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %CPU_CHECK_PLACEHOLDER #include #include diff --git a/SYCL/Plugin/enqueue-arg-order-image.cpp b/SYCL/Plugin/enqueue-arg-order-image.cpp index 22cec83165..2c2a8e3b1c 100644 --- a/SYCL/Plugin/enqueue-arg-order-image.cpp +++ b/SYCL/Plugin/enqueue-arg-order-image.cpp @@ -2,8 +2,8 @@ // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out // Native images are created with host pointers only with host unified memory // support, enforce it for this test. -// RUN: env SYCL_HOST_UNIFIED_MEMORY=1 SYCL_PI_TRACE=2 %GPU_RUN_PLACEHOLDER %t.out %GPU_CHECK_PLACEHOLDER -// RUN: env SYCL_HOST_UNIFIED_MEMORY=1 SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out %CPU_CHECK_PLACEHOLDER +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_HOST_UNIFIED_MEMORY=1 SYCL_PI_TRACE=2 %t.out %GPU_CHECK_PLACEHOLDER +// RUN: %CPU_RUN_PLACEHOLDER env SYCL_HOST_UNIFIED_MEMORY=1 SYCL_PI_TRACE=2 %t.out %CPU_CHECK_PLACEHOLDER #include #include diff --git a/SYCL/Regression/image_access.cpp b/SYCL/Regression/image_access.cpp index 90fbde3cb1..f697177b87 100644 --- a/SYCL/Regression/image_access.cpp +++ b/SYCL/Regression/image_access.cpp @@ -1,7 +1,7 @@ // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out // RUN: %HOST_RUN_PLACEHOLDER %t.out -// RUN: env SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out 2>&1 %CPU_CHECK_PLACEHOLDER -// RUN: env SYCL_PI_TRACE=2 %GPU_RUN_PLACEHOLDER %t.out 2>&1 %GPU_CHECK_PLACEHOLDER +// RUN: %CPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %CPU_ERR_REDIRECT %CPU_CHECK_PLACEHOLDER +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %GPU_ERR_REDIRECT %GPU_CHECK_PLACEHOLDER // No execution of FPGA because it does not support images // // UNSUPPORTED: cuda || hip diff --git a/SYCL/Regression/pi_release.cpp b/SYCL/Regression/pi_release.cpp index 20a21fe06f..de1a61801a 100644 --- a/SYCL/Regression/pi_release.cpp +++ b/SYCL/Regression/pi_release.cpp @@ -1,8 +1,8 @@ // REQUIRES: opencl || level_zero || cuda // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -// RUN: env SYCL_PI_TRACE=-1 %CPU_RUN_PLACEHOLDER %t.out 2>&1 %CPU_CHECK_PLACEHOLDER -// RUN: env SYCL_PI_TRACE=-1 %ACC_RUN_PLACEHOLDER %t.out 2>&1 %ACC_CHECK_PLACEHOLDER -// RUN: env SYCL_PI_TRACE=-1 %GPU_RUN_PLACEHOLDER %t.out 2>&1 %GPU_CHECK_PLACEHOLDER +// RUN: %CPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=-1 %t.out %CPU_ERR_REDIRECT %CPU_CHECK_PLACEHOLDER +// RUN: %ACC_RUN_PLACEHOLDER env SYCL_PI_TRACE=-1 %t.out %ACC_ERR_REDIRECT %ACC_CHECK_PLACEHOLDER +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=-1 %t.out %GPU_ERR_REDIRECT %GPU_CHECK_PLACEHOLDER #include diff --git a/SYCL/Scheduler/HostAccDestruction.cpp b/SYCL/Scheduler/HostAccDestruction.cpp index b50571d17b..4034290f7b 100644 --- a/SYCL/Scheduler/HostAccDestruction.cpp +++ b/SYCL/Scheduler/HostAccDestruction.cpp @@ -1,7 +1,7 @@ // RUN: %clangxx -fsycl -fsycl-dead-args-optimization %s -o %t.out -// RUN: env SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out 2>&1 %CPU_CHECK_PLACEHOLDER -// RUN: env SYCL_PI_TRACE=2 %GPU_RUN_PLACEHOLDER %t.out 2>&1 %GPU_CHECK_PLACEHOLDER -// RUN: env SYCL_PI_TRACE=2 %ACC_RUN_PLACEHOLDER %t.out 2>&1 %ACC_CHECK_PLACEHOLDER +// RUN: %CPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %CPU_ERR_REDIRECT %CPU_CHECK_PLACEHOLDER +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %GPU_ERR_REDIRECT %GPU_CHECK_PLACEHOLDER +// RUN: %ACC_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %ACC_ERR_REDIRECT %ACC_CHECK_PLACEHOLDER // UNSUPPORTED: cuda || hip //==---------------------- HostAccDestruction.cpp --------------------------==// // diff --git a/SYCL/Scheduler/InOrderQueueDeps.cpp b/SYCL/Scheduler/InOrderQueueDeps.cpp index 104b1a13d9..7838b3f803 100644 --- a/SYCL/Scheduler/InOrderQueueDeps.cpp +++ b/SYCL/Scheduler/InOrderQueueDeps.cpp @@ -1,8 +1,8 @@ // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -// RUN: env %HOST_RUN_PLACEHOLDER %t.out -// RUN: env SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out 2>&1 %CPU_CHECK_PLACEHOLDER -// RUN: env SYCL_PI_TRACE=2 %GPU_RUN_PLACEHOLDER %t.out 2>&1 %GPU_CHECK_PLACEHOLDER -// RUN: env SYCL_PI_TRACE=2 %ACC_RUN_PLACEHOLDER %t.out 2>&1 %ACC_CHECK_PLACEHOLDER +// RUN: %HOST_RUN_PLACEHOLDER %t.out +// RUN: %CPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %CPU_ERR_REDIRECT %CPU_CHECK_PLACEHOLDER +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %GPU_ERR_REDIRECT %GPU_CHECK_PLACEHOLDER +// RUN: %ACC_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %ACC_ERR_REDIRECT %ACC_CHECK_PLACEHOLDER // // XFAIL: hip_nvidia diff --git a/SYCL/Scheduler/MemObjRemapping.cpp b/SYCL/Scheduler/MemObjRemapping.cpp index 92f675d53b..d872c66432 100644 --- a/SYCL/Scheduler/MemObjRemapping.cpp +++ b/SYCL/Scheduler/MemObjRemapping.cpp @@ -1,6 +1,6 @@ // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -// RUN: env SYCL_HOST_UNIFIED_MEMORY=1 SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out 2>&1 %CPU_CHECK_PLACEHOLDER -// RUN: env SYCL_HOST_UNIFIED_MEMORY=1 SYCL_PI_TRACE=2 %GPU_RUN_PLACEHOLDER %t.out 2>&1 %GPU_CHECK_PLACEHOLDER +// RUN: %CPU_RUN_PLACEHOLDER env SYCL_HOST_UNIFIED_MEMORY=1 SYCL_PI_TRACE=2 %t.out %CPU_ERR_REDIRECT %CPU_CHECK_PLACEHOLDER +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_HOST_UNIFIED_MEMORY=1 SYCL_PI_TRACE=2 %t.out %GPU_ERR_REDIRECT %GPU_CHECK_PLACEHOLDER // // XFAIL: hip_nvidia #include diff --git a/SYCL/Scheduler/ReleaseResourcesTest.cpp b/SYCL/Scheduler/ReleaseResourcesTest.cpp index 8a51878677..7afdc58e5c 100644 --- a/SYCL/Scheduler/ReleaseResourcesTest.cpp +++ b/SYCL/Scheduler/ReleaseResourcesTest.cpp @@ -1,8 +1,8 @@ // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -fsycl-dead-args-optimization %s -o %t.out -// RUN: env %HOST_RUN_PLACEHOLDER %t.out -// RUN: env SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out 2>&1 %CPU_CHECK_PLACEHOLDER -// RUN: env SYCL_PI_TRACE=2 %GPU_RUN_PLACEHOLDER %t.out 2>&1 %GPU_CHECK_PLACEHOLDER -// RUN: env SYCL_PI_TRACE=2 %ACC_RUN_PLACEHOLDER %t.out 2>&1 %ACC_CHECK_PLACEHOLDER +// RUN: %HOST_RUN_PLACEHOLDER %t.out +// RUN: %CPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %CPU_ERR_REDIRECT %CPU_CHECK_PLACEHOLDER +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %GPU_ERR_REDIRECT %GPU_CHECK_PLACEHOLDER +// RUN: %ACC_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %ACC_ERR_REDIRECT %ACC_CHECK_PLACEHOLDER // // XFAIL: hip_nvidia diff --git a/SYCL/Tracing/buffer_printers.cpp b/SYCL/Tracing/buffer_printers.cpp index 7335fc395c..39f41862d2 100644 --- a/SYCL/Tracing/buffer_printers.cpp +++ b/SYCL/Tracing/buffer_printers.cpp @@ -1,7 +1,7 @@ // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -// RUN: env SYCL_PI_TRACE=2 %GPU_RUN_PLACEHOLDER %t.out %GPU_CHECK_PLACEHOLDER -// RUN: env SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out %CPU_CHECK_PLACEHOLDER -// RUN: env SYCL_PI_TRACE=2 %ACC_RUN_PLACEHOLDER %t.out %ACC_CHECK_PLACEHOLDER +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %GPU_CHECK_PLACEHOLDER +// RUN: %CPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %CPU_CHECK_PLACEHOLDER +// RUN: %ACC_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %ACC_CHECK_PLACEHOLDER // // XFAIL: hip_nvidia diff --git a/SYCL/Tracing/pi_tracing_test.cpp b/SYCL/Tracing/pi_tracing_test.cpp index 1ddd4933b2..d7eaf9d187 100644 --- a/SYCL/Tracing/pi_tracing_test.cpp +++ b/SYCL/Tracing/pi_tracing_test.cpp @@ -1,7 +1,7 @@ // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -// RUN: env SYCL_PI_TRACE=-1 %CPU_RUN_PLACEHOLDER %t.out %CPU_CHECK_PLACEHOLDER -// RUN: env SYCL_PI_TRACE=-1 %GPU_RUN_PLACEHOLDER %t.out %GPU_CHECK_PLACEHOLDER -// RUN: env SYCL_PI_TRACE=-1 %ACC_RUN_PLACEHOLDER %t.out %ACC_CHECK_PLACEHOLDER +// RUN: %CPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=-1 %t.out %CPU_CHECK_PLACEHOLDER +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=-1 %t.out %GPU_CHECK_PLACEHOLDER +// RUN: %ACC_RUN_PLACEHOLDER env SYCL_PI_TRACE=-1 %t.out %ACC_CHECK_PLACEHOLDER // // XFAIL: hip_nvidia diff --git a/SYCL/lit.cfg.py b/SYCL/lit.cfg.py index 4e28715879..f15fcb0675 100644 --- a/SYCL/lit.cfg.py +++ b/SYCL/lit.cfg.py @@ -218,10 +218,11 @@ found_at_least_one_device = False -host_run_substitute = "true" -host_run_on_linux_substitute = "true " +host_run_substitute = "echo " +host_run_on_linux_substitute = "echo " host_check_substitute = "" host_check_on_linux_substitute = "" +host_err_redirect_substitute = "" supported_device_types=['cpu', 'gpu', 'acc', 'host'] for target_device in config.target_devices.split(','): @@ -235,6 +236,7 @@ lit_config.note("Test HOST device") host_run_substitute = "env SYCL_DEVICE_FILTER=host " host_check_substitute = "| FileCheck %s" + host_err_redirect_substitute = " 2>&1 " config.available_features.add('host') if platform.system() == "Linux": host_run_on_linux_substitute = "env SYCL_DEVICE_FILTER=host " @@ -246,10 +248,12 @@ config.substitutions.append( ('%HOST_RUN_ON_LINUX_PLACEHOLDER', host_run_on_linux_substitute) ) config.substitutions.append( ('%HOST_CHECK_PLACEHOLDER', host_check_substitute) ) config.substitutions.append( ('%HOST_CHECK_ON_LINUX_PLACEHOLDER', host_check_on_linux_substitute) ) +config.substitutions.append( ('%HOST_ERR_REDIRECT', host_err_redirect_substitute) ) -cpu_run_substitute = "true" -cpu_run_on_linux_substitute = "true " +cpu_run_substitute = "echo " +cpu_run_on_linux_substitute = "echo " cpu_check_substitute = "" +cpu_err_redirect_substitute = "" cpu_check_on_linux_substitute = "" if 'cpu' in config.target_devices.split(','): @@ -257,6 +261,7 @@ lit_config.note("Test CPU device") cpu_run_substitute = "env SYCL_DEVICE_FILTER=cpu,host " cpu_check_substitute = "| FileCheck %s" + cpu_err_redirect_substitute = " 2>&1 " config.available_features.add('cpu') if platform.system() == "Linux": cpu_run_on_linux_substitute = "env SYCL_DEVICE_FILTER=cpu,host " @@ -268,18 +273,21 @@ config.substitutions.append( ('%CPU_RUN_ON_LINUX_PLACEHOLDER', cpu_run_on_linux_substitute) ) config.substitutions.append( ('%CPU_CHECK_PLACEHOLDER', cpu_check_substitute) ) config.substitutions.append( ('%CPU_CHECK_ON_LINUX_PLACEHOLDER', cpu_check_on_linux_substitute) ) +config.substitutions.append( ('%CPU_ERR_REDIRECT', cpu_err_redirect_substitute) ) -gpu_run_substitute = "true" -gpu_run_on_linux_substitute = "true " +gpu_run_substitute = "echo " +gpu_run_on_linux_substitute = "echo " gpu_check_substitute = "" gpu_l0_check_substitute = "" gpu_check_on_linux_substitute = "" +gpu_err_redirect_substitute = "" if 'gpu' in config.target_devices.split(','): found_at_least_one_device = True lit_config.note("Test GPU device") gpu_run_substitute = " env SYCL_DEVICE_FILTER={SYCL_PLUGIN}:gpu,host ".format(SYCL_PLUGIN=config.sycl_be) gpu_check_substitute = "| FileCheck %s" + gpu_err_redirect_substitute = " 2>&1 " config.available_features.add('gpu') if config.sycl_be == "level_zero": @@ -297,19 +305,23 @@ config.substitutions.append( ('%GPU_CHECK_PLACEHOLDER', gpu_check_substitute) ) config.substitutions.append( ('%GPU_L0_CHECK_PLACEHOLDER', gpu_l0_check_substitute) ) config.substitutions.append( ('%GPU_CHECK_ON_LINUX_PLACEHOLDER', gpu_check_on_linux_substitute) ) +config.substitutions.append( ('%GPU_ERR_REDIRECT', gpu_err_redirect_substitute) ) -acc_run_substitute = "true" +acc_run_substitute = "echo " acc_check_substitute = "" +acc_err_redirect_substitute = "" if 'acc' in config.target_devices.split(','): found_at_least_one_device = True lit_config.note("Tests accelerator device") acc_run_substitute = " env SYCL_DEVICE_FILTER=acc " acc_check_substitute = "| FileCheck %s" + acc_err_redirect_substitute = " 2>&1 " config.available_features.add('accelerator') else: lit_config.warning("Accelerator device not used") config.substitutions.append( ('%ACC_RUN_PLACEHOLDER', acc_run_substitute) ) config.substitutions.append( ('%ACC_CHECK_PLACEHOLDER', acc_check_substitute) ) +config.substitutions.append( ('%ACC_ERR_REDIRECT', acc_err_redirect_substitute) ) if config.sycl_be == 'cuda' or (config.sycl_be == 'hip' and config.hip_platform == 'NVIDIA'): config.substitutions.append( ('%sycl_triple', "nvptx64-nvidia-cuda" ) )