diff --git a/SYCL/Basic/buffer/buffer_create.cpp b/SYCL/Basic/buffer/buffer_create.cpp index 9509186370..f5c049320c 100755 --- a/SYCL/Basic/buffer/buffer_create.cpp +++ b/SYCL/Basic/buffer/buffer_create.cpp @@ -1,4 +1,4 @@ -// REQUIRES: gpu,level_zero +// REQUIRES: cat,gpu,level_zero // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out // RUN: env ZE_DEBUG=1 %GPU_RUN_PLACEHOLDER %t.out 2> %t1.out; cat %t1.out %GPU_CHECK_PLACEHOLDER diff --git a/SYCL/Basic/buffer/native_buffer_creation_flags.cpp b/SYCL/Basic/buffer/native_buffer_creation_flags.cpp index 68e912e3e4..3651ea7dd8 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 SYCL_PI_TRACE=-1 %t.out %CPU_CHECK_PLACEHOLDER #include diff --git a/SYCL/Basic/enqueue_barrier.cpp b/SYCL/Basic/enqueue_barrier.cpp index f5262f0adc..cb70a45586 100644 --- a/SYCL/Basic/enqueue_barrier.cpp +++ b/SYCL/Basic/enqueue_barrier.cpp @@ -1,7 +1,7 @@ // RUN: %clangxx -fsycl %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_CHECK_PLACEHOLDER +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %GPU_CHECK_PLACEHOLDER +// RUN: %ACC_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %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..20d4a19915 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_CHECK_PLACEHOLDER #include #include #include diff --git a/SYCL/Basic/host-task-dependency.cpp b/SYCL/Basic/host-task-dependency.cpp index 961d1f921c..12ec0e7732 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 SYCL_PI_TRACE=-1 %t.out %CPU_CHECK_PLACEHOLDER +// RUN: %GPU_RUN_PLACEHOLDER SYCL_PI_TRACE=-1 %t.out %GPU_CHECK_PLACEHOLDER +// RUN: %ACC_RUN_PLACEHOLDER SYCL_PI_TRACE=-1 %t.out %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 6cd72e1079..f9e3894606 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 || rocm 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 523c839a19..d44441f2f3 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 #include int main() { diff --git a/SYCL/Basic/use_pinned_host_memory.cpp b/SYCL/Basic/use_pinned_host_memory.cpp index a596093313..99274d3614 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_CHECK_PLACEHOLDER #include diff --git a/SYCL/Config/config.cpp b/SYCL/Config/config.cpp index 86709fecc8..152b8a9c21 100644 --- a/SYCL/Config/config.cpp +++ b/SYCL/Config/config.cpp @@ -5,6 +5,7 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// +// REQUIRES: ls, grep // RUN: %clangxx %debug_option -O0 -fsycl %s -o %t.out // RUN: echo "SYCL_PRINT_EXECUTION_GRAPH=always" > %t.cfg // RUN: env SYCL_CONFIG_FILE_NAME=%t.cfg %t.out diff --git a/SYCL/InorderQueue/in_order_property_trace.cpp b/SYCL/InorderQueue/in_order_property_trace.cpp index db700174ee..9d0cad0336 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_CHECK_PLACEHOLDER +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %GPU_CHECK_PLACEHOLDER // SYCL in order and default queue property trace test // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/SYCL/KernelAndProgram/basic.cpp b/SYCL/KernelAndProgram/basic.cpp index 0a7b7b7211..3db156f257 100644 --- a/SYCL/KernelAndProgram/basic.cpp +++ b/SYCL/KernelAndProgram/basic.cpp @@ -2,12 +2,12 @@ // REQUIRES: opencl || level_zero // RUN: rm -rf %t/cache_dir // RUN: %clangxx -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/KernelAndProgram/cache-build-result.cpp b/SYCL/KernelAndProgram/cache-build-result.cpp index b9237eafe9..ca6b7b6dda 100644 --- a/SYCL/KernelAndProgram/cache-build-result.cpp +++ b/SYCL/KernelAndProgram/cache-build-result.cpp @@ -1,7 +1,7 @@ // RUN: %clangxx -fsycl %s -o %t.out -// RUN: env SYCL_CACHE_PERSISTENT=1 %CPU_RUN_PLACEHOLDER %t.out -// RUN: env SYCL_CACHE_PERSISTENT=1 %GPU_RUN_PLACEHOLDER %t.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.out +// RUN: %ACC_RUN_PLACEHOLDER env SYCL_CACHE_PERSISTENT=1 %t.out // XFAIL: cuda #include diff --git a/SYCL/KernelAndProgram/spec_consts.cpp b/SYCL/KernelAndProgram/spec_consts.cpp index a1511a40a8..c55e7d8899 100644 --- a/SYCL/KernelAndProgram/spec_consts.cpp +++ b/SYCL/KernelAndProgram/spec_consts.cpp @@ -3,12 +3,12 @@ // REQUIRES: opencl || level_zero // RUN: rm -rf %t/cache_dir // RUN: %clangxx -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 for SYCL application containing // specialization constant values. diff --git a/SYCL/Plugin/enqueue-arg-order-buffer.cpp b/SYCL/Plugin/enqueue-arg-order-buffer.cpp index a2d8d3e265..78905ded33 100644 --- a/SYCL/Plugin/enqueue-arg-order-buffer.cpp +++ b/SYCL/Plugin/enqueue-arg-order-buffer.cpp @@ -1,8 +1,8 @@ // Temporarily disabled due to CUDA context related failures. // UNSUPPORTED: cuda // 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 fe20bcb5d2..2d61ee5dc1 100644 --- a/SYCL/Plugin/enqueue-arg-order-image.cpp +++ b/SYCL/Plugin/enqueue-arg-order-image.cpp @@ -3,8 +3,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/Plugin/interop-opencl.cpp b/SYCL/Plugin/interop-opencl.cpp index 579af94a06..6f2a9df7bd 100644 --- a/SYCL/Plugin/interop-opencl.cpp +++ b/SYCL/Plugin/interop-opencl.cpp @@ -1,9 +1,9 @@ // REQUIRES: opencl // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -// RUN: env SYCL_DEVICE_FILTER=opencl %CPU_RUN_PLACEHOLDER %t.out -// RUN: env SYCL_DEVICE_FILTER=opencl %GPU_RUN_PLACEHOLDER %t.out -// RUN: env SYCL_DEVICE_FILTER=opencl %ACC_RUN_PLACEHOLDER %t.out +// RUN: %CPU_RUN_PLACEHOLDER env SYCL_DEVICE_FILTER=opencl %t.out +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_DEVICE_FILTER=opencl %t.out +// RUN: %ACC_RUN_PLACEHOLDER env SYCL_DEVICE_FILTER=opencl %t.out //==-- interop-opencl.cpp - SYCL test for OpenCL interop API --------------===// // diff --git a/SYCL/Plugin/sycl-ls.cpp b/SYCL/Plugin/sycl-ls.cpp index eed3f820b4..3065d1d5e5 100644 --- a/SYCL/Plugin/sycl-ls.cpp +++ b/SYCL/Plugin/sycl-ls.cpp @@ -1,3 +1,4 @@ +// REQUIRES: diff, grep // RUN: sycl-ls --verbose | grep "Device \[" | wc -l >%t.verbose.out // RUN: sycl-ls | wc -l >%t.concise.out // RUN: diff %t.verbose.out %t.concise.out diff --git a/SYCL/Regression/image_access.cpp b/SYCL/Regression/image_access.cpp index 5ede32aba8..91792d1b60 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_CHECK_PLACEHOLDER +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %GPU_CHECK_PLACEHOLDER // No execution of FPGA because it does not support images // // UNSUPPORTED: cuda diff --git a/SYCL/Regression/pi_release.cpp b/SYCL/Regression/pi_release.cpp index 20a21fe06f..877ccdf19a 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_CHECK_PLACEHOLDER +// RUN: %ACC_RUN_PLACEHOLDER env SYCL_PI_TRACE=-1 %t.out %ACC_CHECK_PLACEHOLDER +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=-1 %t.out %GPU_CHECK_PLACEHOLDER #include diff --git a/SYCL/Scheduler/HostAccDestruction.cpp b/SYCL/Scheduler/HostAccDestruction.cpp index 3b2b9f7bf8..a3830646c2 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_CHECK_PLACEHOLDER +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %GPU_CHECK_PLACEHOLDER +// RUN: %ACC_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %ACC_CHECK_PLACEHOLDER // UNSUPPORTED: cuda || rocm //==---------------------- HostAccDestruction.cpp --------------------------==// // diff --git a/SYCL/Scheduler/InOrderQueueDeps.cpp b/SYCL/Scheduler/InOrderQueueDeps.cpp index f1d6199a36..b340759ff5 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_CHECK_PLACEHOLDER +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %GPU_CHECK_PLACEHOLDER +// RUN: %ACC_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %ACC_CHECK_PLACEHOLDER // The tested functionality is disabled with Level Zero until it is supported by // the plugin. diff --git a/SYCL/Scheduler/MemObjRemapping.cpp b/SYCL/Scheduler/MemObjRemapping.cpp index 4a08127bdf..8b28eafb74 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_CHECK_PLACEHOLDER +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_HOST_UNIFIED_MEMORY=1 SYCL_PI_TRACE=2 %t.out %GPU_CHECK_PLACEHOLDER #include #include #include diff --git a/SYCL/Scheduler/ReleaseResourcesTest.cpp b/SYCL/Scheduler/ReleaseResourcesTest.cpp index ce92d9257a..668fcf89c6 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_CHECK_PLACEHOLDER +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %GPU_CHECK_PLACEHOLDER +// RUN: %ACC_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %ACC_CHECK_PLACEHOLDER //==------------------- ReleaseResourcesTests.cpp --------------------------==// // diff --git a/SYCL/SpecConstants/1.2.1/spec_const_redefine.cpp b/SYCL/SpecConstants/1.2.1/spec_const_redefine.cpp index b983258fd0..03a691043c 100644 --- a/SYCL/SpecConstants/1.2.1/spec_const_redefine.cpp +++ b/SYCL/SpecConstants/1.2.1/spec_const_redefine.cpp @@ -4,8 +4,8 @@ // program builds at run-time // RUN: %clangxx -DSYCL_DISABLE_FALLBACK_ASSERT -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_CHECK_PLACEHOLDER +// RUN: %GPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %GPU_CHECK_PLACEHOLDER // //==----------- spec_const_redefine.cpp ------------------------------------==// // diff --git a/SYCL/SpecConstants/1.2.1/spec_const_redefine_accelerator.cpp b/SYCL/SpecConstants/1.2.1/spec_const_redefine_accelerator.cpp index 9621e2e5b8..2bd80172f9 100644 --- a/SYCL/SpecConstants/1.2.1/spec_const_redefine_accelerator.cpp +++ b/SYCL/SpecConstants/1.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_CHECK_PLACEHOLDER diff --git a/SYCL/Tracing/buffer_printers.cpp b/SYCL/Tracing/buffer_printers.cpp index 5bbadf99be..99734f6d56 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 #include #include diff --git a/SYCL/Tracing/pi_tracing_test.cpp b/SYCL/Tracing/pi_tracing_test.cpp index 8feb8af9c9..bd2ae88bbe 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 // Test tracing of the Plugin Interface diff --git a/SYCL/USM/usm_leak_check.cpp b/SYCL/USM/usm_leak_check.cpp index c82d9cfb19..f0333e2337 100755 --- a/SYCL/USM/usm_leak_check.cpp +++ b/SYCL/USM/usm_leak_check.cpp @@ -1,12 +1,11 @@ -// REQUIRES: level_zero // TODO: ZE_DEBUG=4 produces no output on Windows. Enable when fixed. // UNSUPPORTED: windows // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -// RUN: env ZE_DEBUG=4 %GPU_RUN_PLACEHOLDER %t.out u 2> %t1.out; cat %t1.out %GPU_CHECK_PLACEHOLDER --check-prefix CHECK-USM -// RUN: env ZE_DEBUG=4 %GPU_RUN_PLACEHOLDER %t.out s 2> %t1.out; cat %t1.out %GPU_CHECK_PLACEHOLDER --check-prefix CHECK-SMALL-BUF -// RUN: env ZE_DEBUG=4 %GPU_RUN_PLACEHOLDER %t.out l 2> %t1.out; cat %t1.out %GPU_CHECK_PLACEHOLDER --check-prefix CHECK-LARGE-BUF +// RUN: %GPU_RUN_PLACEHOLDER env ZE_DEBUG=4 %t.out u 2> %t1.out; cat %t1.out %GPU_CHECK_PLACEHOLDER --check-prefix CHECK-USM +// RUN: %GPU_RUN_PLACEHOLDER env ZE_DEBUG=4 %t.out s 2> %t1.out; cat %t1.out %GPU_CHECK_PLACEHOLDER --check-prefix CHECK-SMALL-BUF +// RUN: %GPU_RUN_PLACEHOLDER env ZE_DEBUG=4 %t.out l 2> %t1.out; cat %t1.out %GPU_CHECK_PLACEHOLDER --check-prefix CHECK-LARGE-BUF #include using namespace sycl; diff --git a/SYCL/USM/usm_pooling.cpp b/SYCL/USM/usm_pooling.cpp index 4b23cf9704..a673b6496b 100755 --- a/SYCL/USM/usm_pooling.cpp +++ b/SYCL/USM/usm_pooling.cpp @@ -1,4 +1,4 @@ -// REQUIRES: level_zero +// REQUIRES: cat, level_zero // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out // Allocate 2 items of 2MB. Free 2. Allocate 3 more of 2MB. diff --git a/SYCL/lit.cfg.py b/SYCL/lit.cfg.py index 49c76a89c1..ad4855526a 100644 --- a/SYCL/lit.cfg.py +++ b/SYCL/lit.cfg.py @@ -6,6 +6,7 @@ import subprocess import tempfile from distutils.spawn import find_executable +from shutil import which import lit.formats import lit.util @@ -199,8 +200,8 @@ 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 = "" supported_device_types=['cpu', 'gpu', 'acc', 'host'] @@ -215,11 +216,11 @@ found_at_least_one_device = True lit_config.note("Test HOST device") host_run_substitute = "env SYCL_DEVICE_FILTER=host " - host_check_substitute = "| FileCheck %s" + host_check_substitute = "2>&1 | FileCheck %s" config.available_features.add('host') if platform.system() == "Linux": host_run_on_linux_substitute = "env SYCL_DEVICE_FILTER=host " - host_check_on_linux_substitute = "| FileCheck %s" + host_check_on_linux_substitute = "2>&1 | FileCheck %s" else: lit_config.warning("HOST device not used") @@ -228,20 +229,21 @@ config.substitutions.append( ('%HOST_CHECK_PLACEHOLDER', host_check_substitute) ) config.substitutions.append( ('%HOST_CHECK_ON_LINUX_PLACEHOLDER', host_check_on_linux_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_check_on_linux_substitute = "" +cpu_err_redirect = "" if 'cpu' in config.target_devices.split(','): found_at_least_one_device = True lit_config.note("Test CPU device") cpu_run_substitute = "env SYCL_DEVICE_FILTER=cpu,host " - cpu_check_substitute = "| FileCheck %s" + cpu_check_substitute = "2>&1 | FileCheck %s" config.available_features.add('cpu') if platform.system() == "Linux": cpu_run_on_linux_substitute = "env SYCL_DEVICE_FILTER=cpu,host " - cpu_check_on_linux_substitute = "| FileCheck %s" + cpu_check_on_linux_substitute = "2>&1 | FileCheck %s" else: lit_config.warning("CPU device not used") @@ -250,8 +252,8 @@ config.substitutions.append( ('%CPU_CHECK_PLACEHOLDER', cpu_check_substitute) ) config.substitutions.append( ('%CPU_CHECK_ON_LINUX_PLACEHOLDER', cpu_check_on_linux_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 = "" @@ -260,15 +262,15 @@ 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_check_substitute = "2>&1 | FileCheck %s" config.available_features.add('gpu') if config.sycl_be == "level_zero": - gpu_l0_check_substitute = "| FileCheck %s" + gpu_l0_check_substitute = "2>&1 | FileCheck %s" if platform.system() == "Linux": gpu_run_on_linux_substitute = "env SYCL_DEVICE_FILTER={SYCL_PLUGIN}:gpu,host ".format(SYCL_PLUGIN=config.sycl_be) - gpu_check_on_linux_substitute = "| FileCheck %s" + gpu_check_on_linux_substitute = "2>&1 | FileCheck %s" else: lit_config.warning("GPU device not used") @@ -279,13 +281,13 @@ config.substitutions.append( ('%GPU_L0_CHECK_PLACEHOLDER', gpu_l0_check_substitute) ) config.substitutions.append( ('%GPU_CHECK_ON_LINUX_PLACEHOLDER', gpu_check_on_linux_substitute) ) -acc_run_substitute = "true" +acc_run_substitute = "echo " acc_check_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_check_substitute = "2>&1 | FileCheck %s" config.available_features.add('accelerator') else: lit_config.warning("Accelerator device not used") @@ -324,6 +326,16 @@ else: lit_config.warning("Couldn't find pre-installed AOT device compiler " + aot_tool) +# Check for some CLI tools, that may not present on the system +if which("ls") is not None: + config.available_features.add("ls") +if which("grep") is not None: + config.available_features.add("grep") +if which("cat") is not None: + config.available_features.add("cat") +if which("diff") is not None: + config.available_features.add("diff") + # Set timeout for test 1 min try: import psutil