diff --git a/sycl/test-e2e/AmdNvidiaJIT/kernel_and_bundle.cpp b/sycl/test-e2e/AmdNvidiaJIT/kernel_and_bundle.cpp index bea29d5c89a80..5c045601feb3a 100644 --- a/sycl/test-e2e/AmdNvidiaJIT/kernel_and_bundle.cpp +++ b/sycl/test-e2e/AmdNvidiaJIT/kernel_and_bundle.cpp @@ -1,5 +1,6 @@ // UNSUPPORTED: windows // REQUIRES: cuda || hip +// REQUIRES: build-and-run-mode // This test relies on debug output from a pass, make sure that the compiler // can generate it. diff --git a/sycl/test-e2e/Basic/windows_version_agnostic_sycl_lib.cpp b/sycl/test-e2e/Basic/windows_version_agnostic_sycl_lib.cpp index 1f36481dc8cd6..c1f43fa724c34 100644 --- a/sycl/test-e2e/Basic/windows_version_agnostic_sycl_lib.cpp +++ b/sycl/test-e2e/Basic/windows_version_agnostic_sycl_lib.cpp @@ -1,4 +1,5 @@ // REQUIRES: windows +// REQUIRES: build-and-run-mode // RUN: %clangxx --driver-mode=cl /std:c++17 /EHsc /imsvc %sycl_include -I%opencl_include_dir %s -o %t.out /link /defaultlib:%sycl_static_libs_dir/sycl.lib // RUN: %{run} %t.out diff --git a/sycl/test-e2e/Compression/no_zstd_warning.cpp b/sycl/test-e2e/Compression/no_zstd_warning.cpp index c87f2fe480096..4532f22b9845b 100644 --- a/sycl/test-e2e/Compression/no_zstd_warning.cpp +++ b/sycl/test-e2e/Compression/no_zstd_warning.cpp @@ -1,4 +1,5 @@ // using --offload-compress without zstd should throw an error. // REQUIRES: !zstd +// REQUIRES: build-and-run-mode // RUN: not %{build} %O0 -g --offload-compress %S/Inputs/single_kernel.cpp -o %t_compress.out 2>&1 | FileCheck %s // CHECK: '--offload-compress' option is specified but zstd is not available. The device image will not be compressed. diff --git a/sycl/test-e2e/Config/config.cpp b/sycl/test-e2e/Config/config.cpp index d446f10519c79..5f82d3fa28111 100644 --- a/sycl/test-e2e/Config/config.cpp +++ b/sycl/test-e2e/Config/config.cpp @@ -8,13 +8,13 @@ // RUN: %{build} %debug_option %O0 -o %t.out // RUN: echo SYCL_PRINT_EXECUTION_GRAPH=always > %t.cfg // RUN: %{run-unfiltered-devices} env SYCL_CONFIG_FILE_NAME=%t.cfg %t.out -// RUN: cat *.dot > /dev/null -// RUN: rm *.dot +// RUN: %if run-mode %{cat *.dot > /dev/null%} +// RUN: %if run-mode %{rm *.dot%} // RUN: %{run-unfiltered-devices} env SYCL_PRINT_EXECUTION_GRAPH=always %t.out -// RUN: cat *.dot > /dev/null -// RUN: rm *.dot +// RUN: %if run-mode %{cat *.dot > /dev/null%} +// RUN: %if run-mode %{rm *.dot%} // RUN: %{run-unfiltered-devices} %t.out -// RUN: not cat *.dot > /dev/null +// RUN: %if run-mode %{not cat *.dot > /dev/null%} #include diff --git a/sycl/test-e2e/DeviceArchitecture/device_architecture_comparison_on_device_aot.cpp b/sycl/test-e2e/DeviceArchitecture/device_architecture_comparison_on_device_aot.cpp index 76a6a54671061..980761c5d8805 100644 --- a/sycl/test-e2e/DeviceArchitecture/device_architecture_comparison_on_device_aot.cpp +++ b/sycl/test-e2e/DeviceArchitecture/device_architecture_comparison_on_device_aot.cpp @@ -1,6 +1,6 @@ // REQUIRES: arch-intel_gpu_pvc, ocloc -// XFAIL: arch-intel_gpu_pvc +// XFAIL: run-mode // XFAIL-TRACKER: https://github.com/intel/llvm/issues/14826 // RUN: %clangxx -fsycl -fsycl-targets=intel_gpu_pvc %s -o %t.out diff --git a/sycl/test-e2e/DeviceLib/math_fp64_windows_test.cpp b/sycl/test-e2e/DeviceLib/math_fp64_windows_test.cpp index 71e8a43387093..2641408261426 100644 --- a/sycl/test-e2e/DeviceLib/math_fp64_windows_test.cpp +++ b/sycl/test-e2e/DeviceLib/math_fp64_windows_test.cpp @@ -1,4 +1,5 @@ // REQUIRES: aspect-fp64, windows +// REQUIRES: build-and-run-mode // DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%} diff --git a/sycl/test-e2e/DeviceLib/math_windows_test.cpp b/sycl/test-e2e/DeviceLib/math_windows_test.cpp index ab18cf1abe254..645493c496ae1 100644 --- a/sycl/test-e2e/DeviceLib/math_windows_test.cpp +++ b/sycl/test-e2e/DeviceLib/math_windows_test.cpp @@ -1,4 +1,5 @@ // REQUIRES: windows +// REQUIRES: build-and-run-mode // TODO: Add hypotf case back when the missing symbol is fixed. diff --git a/sycl/test-e2e/ESIMD/PerformanceTests/BitonicSortK.cpp b/sycl/test-e2e/ESIMD/PerformanceTests/BitonicSortK.cpp index 2fbcd9b5393ae..91d3449d1e74f 100644 --- a/sycl/test-e2e/ESIMD/PerformanceTests/BitonicSortK.cpp +++ b/sycl/test-e2e/ESIMD/PerformanceTests/BitonicSortK.cpp @@ -10,7 +10,7 @@ // RUN: mkdir -p %t.dir && %{build} -o %t.dir/exec.out // RUN: env IGC_DumpToCustomDir=%t.dir IGC_ShaderDumpEnable=1 %{run} %t.dir/exec.out -// RUN: python3 %S/instruction_count.py %t.dir 2914 ZTSZZN11BitonicSort5SolveEPjS0_jENKUlRN4sycl3_V17handlerEE0_clES4_E5Merge.asm -// RUN: echo "Baseline from driver version 1.3.30872" +// RUN: %if run-mode %{python3 %S/instruction_count.py %t.dir 2914 ZTSZZN11BitonicSort5SolveEPjS0_jENKUlRN4sycl3_V17handlerEE0_clES4_E5Merge.asm%} +// RUN: %if run-mode %{echo "Baseline from driver version 1.3.30872"%} #include "../BitonicSortK.cpp" diff --git a/sycl/test-e2e/ESIMD/PerformanceTests/BitonicSortKv2.cpp b/sycl/test-e2e/ESIMD/PerformanceTests/BitonicSortKv2.cpp index cc734ca2710e7..cbb609681a85a 100644 --- a/sycl/test-e2e/ESIMD/PerformanceTests/BitonicSortKv2.cpp +++ b/sycl/test-e2e/ESIMD/PerformanceTests/BitonicSortKv2.cpp @@ -10,7 +10,7 @@ // RUN: mkdir -p %t.dir && %{build} -o %t.dir/exec.out // RUN: env IGC_DumpToCustomDir=%t.dir IGC_ShaderDumpEnable=1 %{run} %t.dir/exec.out -// RUN: python3 %S/instruction_count.py %t.dir 2969 ZTSZZN11BitonicSort5SolveEPjS0_jENKUlRN4sycl3_V17handlerEE0_clES4_E5Merge.asm -// RUN: echo "Baseline from driver version 1.3.30872" +// RUN: %if run-mode %{python3 %S/instruction_count.py %t.dir 2969 ZTSZZN11BitonicSort5SolveEPjS0_jENKUlRN4sycl3_V17handlerEE0_clES4_E5Merge.asm%} +// RUN: %if run-mode %{echo "Baseline from driver version 1.3.30872"%} #include "../BitonicSortKv2.cpp" diff --git a/sycl/test-e2e/ESIMD/PerformanceTests/Stencil.cpp b/sycl/test-e2e/ESIMD/PerformanceTests/Stencil.cpp index 18198c14cc71c..42d906545207c 100644 --- a/sycl/test-e2e/ESIMD/PerformanceTests/Stencil.cpp +++ b/sycl/test-e2e/ESIMD/PerformanceTests/Stencil.cpp @@ -10,7 +10,7 @@ // RUN: mkdir -p %t.dir && %{build} -o %t.dir/exec.out // RUN: env IGC_DumpToCustomDir=%t.dir IGC_ShaderDumpEnable=1 %{run} %t.dir/exec.out -// RUN: python3 %S/instruction_count.py %t.dir 1699 ZTSZZ4mainENKUlRN4sycl3_V17handlerEE_clES2_E14Stencil_kernel.asm -// RUN: echo "Baseline from driver version 1.3.29138" +// RUN: %if run-mode %{python3 %S/instruction_count.py %t.dir 1699 ZTSZZ4mainENKUlRN4sycl3_V17handlerEE_clES2_E14Stencil_kernel.asm%} +// RUN: %if run-mode %{echo "Baseline from driver version 1.3.29138"%} -#include "../Stencil.cpp" \ No newline at end of file +#include "../Stencil.cpp" diff --git a/sycl/test-e2e/ESIMD/PerformanceTests/invoke_simd_smoke.cpp b/sycl/test-e2e/ESIMD/PerformanceTests/invoke_simd_smoke.cpp index 4ce76629d9d0d..97c2bf718a1cc 100644 --- a/sycl/test-e2e/ESIMD/PerformanceTests/invoke_simd_smoke.cpp +++ b/sycl/test-e2e/ESIMD/PerformanceTests/invoke_simd_smoke.cpp @@ -10,7 +10,7 @@ // RUN: mkdir -p %t.dir && %{build} -fsycl -fno-sycl-device-code-split-esimd -Xclang -fsycl-allow-func-ptr -o %t.dir/exec.out // RUN: env IGC_VCSaveStackCallLinkage=1 IGC_VCDirectCallsOnly=1 IGC_DumpToCustomDir=%t.dir IGC_ShaderDumpEnable=1 %{run} %t.dir/exec.out -// RUN: python3 %S/instruction_count.py %t.dir 149 _simd16_entry_0001.asm -// RUN: echo "Baseline from driver version 1.3.29735" +// RUN: %if run-mode %{python3 %S/instruction_count.py %t.dir 149 _simd16_entry_0001.asm%} +// RUN: %if run-mode %{echo "Baseline from driver version 1.3.29735"%} -#include "../../InvokeSimd/invoke_simd_smoke.cpp" \ No newline at end of file +#include "../../InvokeSimd/invoke_simd_smoke.cpp" diff --git a/sycl/test-e2e/ESIMD/PerformanceTests/matrix_transpose.cpp b/sycl/test-e2e/ESIMD/PerformanceTests/matrix_transpose.cpp index 42e9931b27ca2..794bc5b621cc0 100644 --- a/sycl/test-e2e/ESIMD/PerformanceTests/matrix_transpose.cpp +++ b/sycl/test-e2e/ESIMD/PerformanceTests/matrix_transpose.cpp @@ -12,7 +12,7 @@ // RUN: mkdir -p %t.dir && %{build} -o %t.dir/exec.out // RUN: env IGC_DumpToCustomDir=%t.dir IGC_ShaderDumpEnable=1 %{run} %t.dir/exec.out -// RUN: python3 %S/instruction_count.py %t.dir %if igc-dev %{ 1059 %} %else %{ 1116 %} ZTSZZ7runTestjjjRdS_ENKUlRN4sycl3_V17handlerEE_clES3_E3K16.asm -// RUN: echo "Baseline from driver version 1.3.30872" +// RUN: %if run-mode %{python3 %S/instruction_count.py %t.dir %if igc-dev %{ 1059 %} %else %{ 1116 %} ZTSZZ7runTestjjjRdS_ENKUlRN4sycl3_V17handlerEE_clES3_E3K16.asm%} +// RUN: %if run-mode %{echo "Baseline from driver version 1.3.30872"%} #include "../matrix_transpose.cpp" diff --git a/sycl/test-e2e/ESIMD/PerformanceTests/stencil2.cpp b/sycl/test-e2e/ESIMD/PerformanceTests/stencil2.cpp index 8857d286eee42..e306889c9c4b6 100644 --- a/sycl/test-e2e/ESIMD/PerformanceTests/stencil2.cpp +++ b/sycl/test-e2e/ESIMD/PerformanceTests/stencil2.cpp @@ -10,7 +10,7 @@ // RUN: mkdir -p %t.dir && %{build} -o %t.dir/exec.out // RUN: env IGC_DumpToCustomDir=%t.dir IGC_ShaderDumpEnable=1 %{run} %t.dir/exec.out -// RUN: python3 %S/instruction_count.py %t.dir 1699 ZTSZZ4mainENKUlRN4sycl3_V17handlerEE_clES2_E14Stencil_kernel.asm -// RUN: echo "Baseline from driver version 1.3.29138" +// RUN: %if run-mode %{python3 %S/instruction_count.py %t.dir 1699 ZTSZZ4mainENKUlRN4sycl3_V17handlerEE_clES2_E14Stencil_kernel.asm%} +// RUN: %if run-mode %{echo "Baseline from driver version 1.3.29138"%} -#include "../stencil2.cpp" \ No newline at end of file +#include "../stencil2.cpp" diff --git a/sycl/test-e2e/ESIMD/assert.cpp b/sycl/test-e2e/ESIMD/assert.cpp index 693694c21a007..78d8d9bca986a 100644 --- a/sycl/test-e2e/ESIMD/assert.cpp +++ b/sycl/test-e2e/ESIMD/assert.cpp @@ -6,7 +6,7 @@ // // The test still fails after GPU driver update on Linux. Temporary marking it // as expected to fail, whilst it is being investigated, see intel/llvm#11359 -// XFAIL: linux +// XFAIL: linux && run-mode // XFAIL-TRACKER: https://github.com/intel/llvm/issues/11359 // // Hanging on gen12, remove when internal tracker fixed diff --git a/sycl/test-e2e/ESIMD/preemption.cpp b/sycl/test-e2e/ESIMD/preemption.cpp index 4e6a27f5d5d29..30c11306c08ca 100644 --- a/sycl/test-e2e/ESIMD/preemption.cpp +++ b/sycl/test-e2e/ESIMD/preemption.cpp @@ -9,7 +9,7 @@ // UNSUPPORTED: gpu-intel-dg2 || arch-intel_gpu_pvc // RUN: %{build} -o %t.out // RUN: env IGC_DumpToCustomDir=%t.dump IGC_ShaderDumpEnable=1 %{run} %t.out -// RUN: grep enablePreemption %t.dump/*.asm +// RUN: %if run-mode %{grep enablePreemption %t.dump/*.asm%} // The test expects to see "enablePreemption" switch in the compilation // switches. It fails if does not find it. diff --git a/sycl/test-e2e/EnqueueNativeCommand/custom-command-cuda.cpp b/sycl/test-e2e/EnqueueNativeCommand/custom-command-cuda.cpp index 7afbaf7cc14ed..b777f314d2f92 100644 --- a/sycl/test-e2e/EnqueueNativeCommand/custom-command-cuda.cpp +++ b/sycl/test-e2e/EnqueueNativeCommand/custom-command-cuda.cpp @@ -1,6 +1,7 @@ // RUN: %{build} -Wno-error=deprecated-declarations -o %t.out %cuda_options // RUN: %{run} %t.out // REQUIRES: cuda, cuda_dev_kit +// REQUIRES: build-and-run-mode #include diff --git a/sycl/test-e2e/EnqueueNativeCommand/custom-command-hip.cpp b/sycl/test-e2e/EnqueueNativeCommand/custom-command-hip.cpp index 7dec45ccee05a..f0184bd014d4d 100644 --- a/sycl/test-e2e/EnqueueNativeCommand/custom-command-hip.cpp +++ b/sycl/test-e2e/EnqueueNativeCommand/custom-command-hip.cpp @@ -3,6 +3,7 @@ // RUN: %{build} -o %t.out -I%rocm_path/include -L%rocm_path/lib -lamdhip64 // RUN: %{run} %t.out // REQUIRES: hip +// REQUIRES: build-and-run-mode #include #include diff --git a/sycl/test-e2e/EnqueueNativeCommand/custom-command-multiple-dev-cuda.cpp b/sycl/test-e2e/EnqueueNativeCommand/custom-command-multiple-dev-cuda.cpp index 2dc30b44bfe94..f487b26026ec2 100644 --- a/sycl/test-e2e/EnqueueNativeCommand/custom-command-multiple-dev-cuda.cpp +++ b/sycl/test-e2e/EnqueueNativeCommand/custom-command-multiple-dev-cuda.cpp @@ -1,4 +1,5 @@ // REQUIRES: cuda, cuda_dev_kit +// REQUIRES: build-and-run-mode // RUN: %{build} -o %t.out %cuda_options // RUN: %{run} %t.out diff --git a/sycl/test-e2e/HostInteropTask/interop-task-cuda-buffer-migrate.cpp b/sycl/test-e2e/HostInteropTask/interop-task-cuda-buffer-migrate.cpp index b6ac1f96f90e1..2eea51a1ded9b 100644 --- a/sycl/test-e2e/HostInteropTask/interop-task-cuda-buffer-migrate.cpp +++ b/sycl/test-e2e/HostInteropTask/interop-task-cuda-buffer-migrate.cpp @@ -1,4 +1,5 @@ // REQUIRES: cuda, cuda_dev_kit +// REQUIRES: build-and-run-mode // // RUN: %{build} -o %t.out %cuda_options // RUN: %{run} %t.out diff --git a/sycl/test-e2e/HostInteropTask/interop-task-cuda.cpp b/sycl/test-e2e/HostInteropTask/interop-task-cuda.cpp index 055160e8bb624..f3a61471d1d08 100644 --- a/sycl/test-e2e/HostInteropTask/interop-task-cuda.cpp +++ b/sycl/test-e2e/HostInteropTask/interop-task-cuda.cpp @@ -1,6 +1,7 @@ // RUN: %{build} -o %t.out %cuda_options // RUN: %{run} %t.out // REQUIRES: cuda, cuda_dev_kit +// REQUIRES: build-and-run-mode #include #include diff --git a/sycl/test-e2e/HostInteropTask/interop-task-hip.cpp b/sycl/test-e2e/HostInteropTask/interop-task-hip.cpp index 96b55050418cd..86d8b860b0708 100644 --- a/sycl/test-e2e/HostInteropTask/interop-task-hip.cpp +++ b/sycl/test-e2e/HostInteropTask/interop-task-hip.cpp @@ -3,6 +3,7 @@ // RUN: %{build} -Wno-error=deprecated-declarations -o %t.out -I%rocm_path/include -L%rocm_path/lib -lamdhip64 // RUN: %{run} %t.out // REQUIRES: hip +// REQUIRES: build-and-run-mode #include #include diff --git a/sycl/test-e2e/InlineAsm/asm_multiple_instructions.cpp b/sycl/test-e2e/InlineAsm/asm_multiple_instructions.cpp index c894a2d42ace4..1e0140611389f 100644 --- a/sycl/test-e2e/InlineAsm/asm_multiple_instructions.cpp +++ b/sycl/test-e2e/InlineAsm/asm_multiple_instructions.cpp @@ -6,7 +6,7 @@ // RUN: %{run} %t.out // The test is failing when writing directly to output buffer. // If temporary variable is used (see TO_PASS mode) the test succeeded. -// XFAIL: gpu +// XFAIL: gpu && run-mode #include "include/asmhelper.h" #include #include diff --git a/sycl/test-e2e/InvokeSimd/Feature/ImplicitSubgroup/invoke_simd_struct.cpp b/sycl/test-e2e/InvokeSimd/Feature/ImplicitSubgroup/invoke_simd_struct.cpp index 43a776fcee3c8..74b82dfc85ddc 100644 --- a/sycl/test-e2e/InvokeSimd/Feature/ImplicitSubgroup/invoke_simd_struct.cpp +++ b/sycl/test-e2e/InvokeSimd/Feature/ImplicitSubgroup/invoke_simd_struct.cpp @@ -1,6 +1,6 @@ // TODO: Passing/returning structures via invoke_simd() API is not implemented // in GPU driver yet. Enable the test when GPU RT supports it. -// XFAIL: gpu +// XFAIL: gpu && run-mode // // RUN: %{build} -DIMPL_SUBGROUP -fno-sycl-device-code-split-esimd -Xclang -fsycl-allow-func-ptr -o %t.out // RUN: env IGC_VCSaveStackCallLinkage=1 IGC_VCDirectCallsOnly=1 %{run} %t.out diff --git a/sycl/test-e2e/InvokeSimd/Feature/invoke_simd_struct.cpp b/sycl/test-e2e/InvokeSimd/Feature/invoke_simd_struct.cpp index 75bd87d74d0f3..014027460301c 100644 --- a/sycl/test-e2e/InvokeSimd/Feature/invoke_simd_struct.cpp +++ b/sycl/test-e2e/InvokeSimd/Feature/invoke_simd_struct.cpp @@ -1,6 +1,6 @@ // TODO: Passing/returning structures via invoke_simd() API is not implemented // in GPU driver yet. Enable the test when GPU RT supports it. -// XFAIL: gpu +// XFAIL: gpu, run-mode // // RUN: %{build} -fno-sycl-device-code-split-esimd -Xclang -fsycl-allow-func-ptr -o %t.out // RUN: env IGC_VCSaveStackCallLinkage=1 IGC_VCDirectCallsOnly=1 %{run} %t.out diff --git a/sycl/test-e2e/InvokeSimd/Spec/ImplicitSubgroup/tuple.cpp b/sycl/test-e2e/InvokeSimd/Spec/ImplicitSubgroup/tuple.cpp index c016ba2269ccb..34fe12ebb70e9 100644 --- a/sycl/test-e2e/InvokeSimd/Spec/ImplicitSubgroup/tuple.cpp +++ b/sycl/test-e2e/InvokeSimd/Spec/ImplicitSubgroup/tuple.cpp @@ -1,5 +1,5 @@ // TODO: enable when Jira ticket resolved -// XFAIL: gpu +// XFAIL: * // // Check that full compilation works: // RUN: %clangxx -DIMPL_SUBGROUP -fsycl -fno-sycl-device-code-split-esimd -Xclang -fsycl-allow-func-ptr %S/../tuple.cpp -o %t.out diff --git a/sycl/test-e2e/InvokeSimd/Spec/ImplicitSubgroup/tuple_return.cpp b/sycl/test-e2e/InvokeSimd/Spec/ImplicitSubgroup/tuple_return.cpp index 3894e55f2efff..90c3468b4151f 100644 --- a/sycl/test-e2e/InvokeSimd/Spec/ImplicitSubgroup/tuple_return.cpp +++ b/sycl/test-e2e/InvokeSimd/Spec/ImplicitSubgroup/tuple_return.cpp @@ -1,5 +1,5 @@ // TODO: enable when Jira ticket resolved -// XFAIL: gpu +// XFAIL: * // // Check that full compilation works: // RUN: %clangxx -DIMPL_SUBGROUP -fsycl -fno-sycl-device-code-split-esimd -Xclang -fsycl-allow-func-ptr %S/../tuple_return.cpp -o %t.out diff --git a/sycl/test-e2e/InvokeSimd/Spec/ImplicitSubgroup/tuple_vadd.cpp b/sycl/test-e2e/InvokeSimd/Spec/ImplicitSubgroup/tuple_vadd.cpp index 792a9aad10288..7d2bed1426cd8 100644 --- a/sycl/test-e2e/InvokeSimd/Spec/ImplicitSubgroup/tuple_vadd.cpp +++ b/sycl/test-e2e/InvokeSimd/Spec/ImplicitSubgroup/tuple_vadd.cpp @@ -1,5 +1,5 @@ // TODO: enable when Jira ticket resolved -// XFAIL: gpu +// XFAIL: * // // Check that full compilation works: // RUN: %clangxx -DIMPL_SUBGROUP -fsycl -fno-sycl-device-code-split-esimd -Xclang -fsycl-allow-func-ptr %S/../tuple_vadd.cpp -o %t.out diff --git a/sycl/test-e2e/InvokeSimd/Spec/tuple.cpp b/sycl/test-e2e/InvokeSimd/Spec/tuple.cpp index fd835a147c6f1..6c9d869b3684a 100644 --- a/sycl/test-e2e/InvokeSimd/Spec/tuple.cpp +++ b/sycl/test-e2e/InvokeSimd/Spec/tuple.cpp @@ -1,5 +1,5 @@ // TODO: enable when Jira ticket resolved -// XFAIL: gpu +// XFAIL: * // // Check that full compilation works: // RUN: %{build} -fno-sycl-device-code-split-esimd -Xclang -fsycl-allow-func-ptr -o %t.out diff --git a/sycl/test-e2e/InvokeSimd/Spec/tuple_return.cpp b/sycl/test-e2e/InvokeSimd/Spec/tuple_return.cpp index 14be37cf1c435..bdc5fe9a7e19b 100644 --- a/sycl/test-e2e/InvokeSimd/Spec/tuple_return.cpp +++ b/sycl/test-e2e/InvokeSimd/Spec/tuple_return.cpp @@ -1,5 +1,5 @@ // TODO: enable when Jira ticket resolved -// XFAIL: gpu +// XFAIL: * // // Check that full compilation works: // RUN: %{build} -fno-sycl-device-code-split-esimd -Xclang -fsycl-allow-func-ptr -o %t.out diff --git a/sycl/test-e2e/InvokeSimd/Spec/tuple_vadd.cpp b/sycl/test-e2e/InvokeSimd/Spec/tuple_vadd.cpp index 5663aec9ff23c..38f654ea769b3 100644 --- a/sycl/test-e2e/InvokeSimd/Spec/tuple_vadd.cpp +++ b/sycl/test-e2e/InvokeSimd/Spec/tuple_vadd.cpp @@ -1,5 +1,5 @@ // TODO: enable when Jira ticket resolved -// XFAIL: gpu +// XFAIL: * // // Check that full compilation works: // RUN: %{build} -fno-sycl-device-code-split-esimd -Xclang -fsycl-allow-func-ptr -o %t.out diff --git a/sycl/test-e2e/KernelAndProgram/test_cache_jit_aot.cpp b/sycl/test-e2e/KernelAndProgram/test_cache_jit_aot.cpp index bea437200bdba..09399274e0472 100644 --- a/sycl/test-e2e/KernelAndProgram/test_cache_jit_aot.cpp +++ b/sycl/test-e2e/KernelAndProgram/test_cache_jit_aot.cpp @@ -2,6 +2,7 @@ // cannot do that reliably when number of devices is unknown. // // REQUIRES: level_zero, ocloc +// REQUIRES: build-and-run-mode // // DEFINE: %{cache_vars} = env SYCL_CACHE_PERSISTENT=1 SYCL_CACHE_TRACE=1 SYCL_CACHE_DIR=%t/cache_dir // DEFINE: %{build_cmd} = %{build} diff --git a/sycl/test-e2e/KernelAndProgram/trace_kernel_program_cache.cpp b/sycl/test-e2e/KernelAndProgram/trace_kernel_program_cache.cpp index 447ec12200ade..f9db1b97440a4 100644 --- a/sycl/test-e2e/KernelAndProgram/trace_kernel_program_cache.cpp +++ b/sycl/test-e2e/KernelAndProgram/trace_kernel_program_cache.cpp @@ -6,12 +6,12 @@ // or SYCL_CACHE_TRACE is set to 0. // RUN: env SYCL_CACHE_IN_MEM=0 %{run} %t.out 2> %t.trace1 -// RUN: FileCheck --allow-empty --input-file=%t.trace1 --implicit-check-not "In-Memory Cache" %s +// RUN: %if run-mode %{ FileCheck --allow-empty --input-file=%t.trace1 --implicit-check-not "In-Memory Cache" %s %} // RUN: env SYCL_CACHE_TRACE=0 %{run} %t.out 2> %t.trace2 -// RUN: FileCheck --allow-empty --input-file=%t.trace2 --implicit-check-not "In-Memory Cache" %s +// RUN: %if run-mode %{ FileCheck --allow-empty --input-file=%t.trace2 --implicit-check-not "In-Memory Cache" %s %} // RUN: env SYCL_CACHE_TRACE=2 %{run} %t.out 2> %t.trace3 -// RUN: FileCheck %s --input-file=%t.trace3 --check-prefix=CHECK-CACHE-TRACE +// RUN: %if run-mode %{ FileCheck %s --input-file=%t.trace3 --check-prefix=CHECK-CACHE-TRACE %} #include diff --git a/sycl/test-e2e/KernelCompiler/kernel_compiler_sycl_jit.cpp b/sycl/test-e2e/KernelCompiler/kernel_compiler_sycl_jit.cpp index 01f25f813b826..cc12f20d8891f 100644 --- a/sycl/test-e2e/KernelCompiler/kernel_compiler_sycl_jit.cpp +++ b/sycl/test-e2e/KernelCompiler/kernel_compiler_sycl_jit.cpp @@ -16,14 +16,14 @@ // -- Test again, with caching. // DEFINE: %{cache_vars} = %{l0_leak_check} env SYCL_CACHE_PERSISTENT=1 SYCL_CACHE_TRACE=5 SYCL_CACHE_DIR=%t/cache_dir -// RUN: rm -rf %t/cache_dir -// RUN: %{cache_vars} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK-WRITTEN-TO-CACHE -// RUN: %{cache_vars} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK-READ-FROM-CACHE +// RUN: %if run-mode %{ rm -rf %t/cache_dir %} +// RUN: %{cache_vars} %{run-unfiltered-devices} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK-WRITTEN-TO-CACHE +// RUN: %{cache_vars} %{run-unfiltered-devices} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK-READ-FROM-CACHE // -- Add leak check. -// RUN: rm -rf %t/cache_dir -// RUN: %{l0_leak_check} %{cache_vars} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK-WRITTEN-TO-CACHE -// RUN: %{l0_leak_check} %{cache_vars} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK-READ-FROM-CACHE +// RUN: %if run-mode %{ rm -rf %t/cache_dir %} +// RUN: %{l0_leak_check} %{cache_vars} %{run-unfiltered-devices} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK-WRITTEN-TO-CACHE +// RUN: %{l0_leak_check} %{cache_vars} %{run-unfiltered-devices} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK-READ-FROM-CACHE // CHECK-WRITTEN-TO-CACHE: [Persistent Cache]: enabled // CHECK-WRITTEN-TO-CACHE-NOT: [kernel_compiler Persistent Cache]: using cached binary diff --git a/sycl/test-e2e/Matrix/SG32/joint_matrix_colA_rowB_colC.cpp b/sycl/test-e2e/Matrix/SG32/joint_matrix_colA_rowB_colC.cpp index a10810bf4549c..0c3b778457036 100644 --- a/sycl/test-e2e/Matrix/SG32/joint_matrix_colA_rowB_colC.cpp +++ b/sycl/test-e2e/Matrix/SG32/joint_matrix_colA_rowB_colC.cpp @@ -11,7 +11,7 @@ // RUN: %{build} -o %t.out // RUN: %{run} %t.out -// XFAIL:* +// XFAIL: run-mode #include "../common.hpp" diff --git a/sycl/test-e2e/Matrix/joint_matrix_colA_rowB_colC.cpp b/sycl/test-e2e/Matrix/joint_matrix_colA_rowB_colC.cpp index 71e3cb6501bb6..338564207c4ac 100644 --- a/sycl/test-e2e/Matrix/joint_matrix_colA_rowB_colC.cpp +++ b/sycl/test-e2e/Matrix/joint_matrix_colA_rowB_colC.cpp @@ -10,7 +10,7 @@ // RUN: %{build} -o %t.out // RUN: %{run} %t.out -// XFAIL:* +// XFAIL: run-mode #include "common.hpp" diff --git a/sycl/test-e2e/Matrix/joint_matrix_hip_gfx90a.cpp b/sycl/test-e2e/Matrix/joint_matrix_hip_gfx90a.cpp index c126a96bcb2ab..fbcf2c70558f4 100644 --- a/sycl/test-e2e/Matrix/joint_matrix_hip_gfx90a.cpp +++ b/sycl/test-e2e/Matrix/joint_matrix_hip_gfx90a.cpp @@ -10,6 +10,7 @@ // RUN: %{run} %t.out // REQUIRES: arch-amd_gpu_gfx90a +// REQUIRES: build-and-run-mode #include "joint_matrix_hip_apply.hpp" #include "joint_matrix_hip_copy.hpp" diff --git a/sycl/test-e2e/Matrix/joint_matrix_hip_half_gfx90a.cpp b/sycl/test-e2e/Matrix/joint_matrix_hip_half_gfx90a.cpp index c39832cd64357..7c8d576ba39d0 100644 --- a/sycl/test-e2e/Matrix/joint_matrix_hip_half_gfx90a.cpp +++ b/sycl/test-e2e/Matrix/joint_matrix_hip_half_gfx90a.cpp @@ -11,6 +11,7 @@ // REQUIRES: arch-amd_gpu_gfx90a // REQUIRES: aspect-fp16 +// REQUIRES: build-and-run-mode #include "joint_matrix_hip_apply.hpp" #include "joint_matrix_hip_copy.hpp" diff --git a/sycl/test-e2e/Matrix/joint_matrix_tensorcores_sm70.cpp b/sycl/test-e2e/Matrix/joint_matrix_tensorcores_sm70.cpp index b383c07f018a6..dc084b7c23c0e 100644 --- a/sycl/test-e2e/Matrix/joint_matrix_tensorcores_sm70.cpp +++ b/sycl/test-e2e/Matrix/joint_matrix_tensorcores_sm70.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // REQUIRES: cuda +// REQUIRES: build-and-run-mode // RUN: %{build} -Xsycl-target-backend --cuda-gpu-arch=sm_70 -o %t.out // RUN: %{run} %t.out // diff --git a/sycl/test-e2e/Matrix/runtime_query_hip_gfx90a.cpp b/sycl/test-e2e/Matrix/runtime_query_hip_gfx90a.cpp index ec9ecadf1ae16..a7bdd0c056db1 100644 --- a/sycl/test-e2e/Matrix/runtime_query_hip_gfx90a.cpp +++ b/sycl/test-e2e/Matrix/runtime_query_hip_gfx90a.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // REQUIRES: arch-amd_gpu_gfx90a +// REQUIRES: build-and-run-mode // RUN: %clangxx -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend=amdgcn-amd-amdhsa --offload-arch=gfx90a %s -o %t.out // RUN: %{run} %t.out diff --git a/sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_amdgcn.cpp b/sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_amdgcn.cpp index 5e240044483b7..e1616ec80dec0 100644 --- a/sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_amdgcn.cpp +++ b/sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_amdgcn.cpp @@ -1,4 +1,5 @@ // REQUIRES: hip_amd, opencl, gpu, cpu +// REQUIRES: build-and-run-mode // RUN: %clangxx -fsycl -Xsycl-target-backend=amdgcn-amd-amdhsa --offload-arch=gfx906 -fsycl-targets=amdgcn-amd-amdhsa %S/Inputs/is_compatible_with_env.cpp -o %t.out diff --git a/sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_nvptx64.cpp b/sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_nvptx64.cpp index ccfa829293c3f..20a5139fc12cd 100644 --- a/sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_nvptx64.cpp +++ b/sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_nvptx64.cpp @@ -1,4 +1,5 @@ // REQUIRES: cuda, opencl, gpu, cpu +// REQUIRES: build-and-run-mode // RUN: %clangxx -fsycl -fsycl-targets=nvptx64-nvidia-cuda %S/Inputs/is_compatible_with_env.cpp -o %t.out diff --git a/sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_several_targets.cpp b/sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_several_targets.cpp index 042874b90290c..55b9f7037e4f2 100644 --- a/sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_several_targets.cpp +++ b/sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_several_targets.cpp @@ -1,4 +1,5 @@ // REQUIRES: ocloc, level_zero, gpu, cpu +// REQUIRES: build-and-run-mode // RUN: %clangxx -fsycl -fsycl-targets=spir64_fpga,spir64_gen -Xsycl-target-backend "-device *" %S/Inputs/is_compatible_with_env.cpp -o %t.out diff --git a/sycl/test-e2e/Plugin/cuda_queue_priority.cpp b/sycl/test-e2e/Plugin/cuda_queue_priority.cpp index 031dc252c578f..008637b91f3e2 100644 --- a/sycl/test-e2e/Plugin/cuda_queue_priority.cpp +++ b/sycl/test-e2e/Plugin/cuda_queue_priority.cpp @@ -1,4 +1,5 @@ // REQUIRES: gpu, cuda, cuda_dev_kit +// REQUIRES: build-and-run-mode // RUN: %{build} %cuda_options -o %t.out // RUN: %{run} %t.out // diff --git a/sycl/test-e2e/Plugin/dll-detach-order.cpp b/sycl/test-e2e/Plugin/dll-detach-order.cpp index 207b958397b27..e6e45f6dc4db5 100644 --- a/sycl/test-e2e/Plugin/dll-detach-order.cpp +++ b/sycl/test-e2e/Plugin/dll-detach-order.cpp @@ -1,4 +1,5 @@ // REQUIRES: windows +// REQUIRES: build-and-run-mode // RUN: env SYCL_UR_TRACE=-1 sycl-ls | FileCheck %s // ensure that the plugins are detached AFTER urLoaderTearDown is done executing diff --git a/sycl/test-e2e/Plugin/level_zero_sub_sub_device.cpp b/sycl/test-e2e/Plugin/level_zero_sub_sub_device.cpp index fd05d1071870b..f7bd7b4cad233 100644 --- a/sycl/test-e2e/Plugin/level_zero_sub_sub_device.cpp +++ b/sycl/test-e2e/Plugin/level_zero_sub_sub_device.cpp @@ -1,6 +1,6 @@ // REQUIRES: arch-intel_gpu_pvc, level_zero -// XFAIL: arch-intel_gpu_pvc +// XFAIL: arch-intel_gpu_pvc && run-mode // XFAIL-TRACKER: https://github.com/intel/llvm/issues/15602 // RUN: %{build} %level_zero_options -o %t.out diff --git a/sycl/test-e2e/Plugin/sycl-ls-gpu-cuda.cpp b/sycl/test-e2e/Plugin/sycl-ls-gpu-cuda.cpp index 2d1ff0ac92ad1..c81d1284a4fc4 100644 --- a/sycl/test-e2e/Plugin/sycl-ls-gpu-cuda.cpp +++ b/sycl/test-e2e/Plugin/sycl-ls-gpu-cuda.cpp @@ -1,4 +1,5 @@ // REQUIRES: gpu, cuda +// REQUIRES: build-and-run-mode // RUN: env ONEAPI_DEVICE_SELECTOR="cuda:*" sycl-ls --verbose >%t.cuda.out // RUN: FileCheck %s --check-prefixes=CHECK-BUILTIN-GPU-CUDA,CHECK-CUSTOM-GPU-CUDA --input-file %t.cuda.out diff --git a/sycl/test-e2e/Plugin/sycl-ls-gpu-hip.cpp b/sycl/test-e2e/Plugin/sycl-ls-gpu-hip.cpp index 67c9cd2eb365e..64ca76b948c6d 100644 --- a/sycl/test-e2e/Plugin/sycl-ls-gpu-hip.cpp +++ b/sycl/test-e2e/Plugin/sycl-ls-gpu-hip.cpp @@ -1,4 +1,5 @@ // REQUIRES: gpu, hip, sycl-ls +// REQUIRES: build-and-run-mode // RUN: env ONEAPI_DEVICE_SELECTOR="hip:*" sycl-ls --verbose >%t.hip.out // RUN: FileCheck %s --check-prefixes=CHECK-BUILTIN-GPU-HIP,CHECK-CUSTOM-GPU-HIP --input-file %t.hip.out diff --git a/sycl/test-e2e/Plugin/sycl-ls-gpu-sycl-be.cpp b/sycl/test-e2e/Plugin/sycl-ls-gpu-sycl-be.cpp index 81e5b3694c5b7..9a0e2786c03f6 100644 --- a/sycl/test-e2e/Plugin/sycl-ls-gpu-sycl-be.cpp +++ b/sycl/test-e2e/Plugin/sycl-ls-gpu-sycl-be.cpp @@ -1,4 +1,5 @@ // REQUIRES: gpu, cuda, hip, opencl, sycl-ls +// REQUIRES: build-and-run-mode // RUN: sycl-ls --verbose >%t.default.out // RUN: FileCheck %s --check-prefixes=CHECK-BUILTIN-GPU-OPENCL,CHECK-CUSTOM-GPU-OPENCL --input-file %t.default.out diff --git a/sycl/test-e2e/Plugin/sycl-targets-order.cpp b/sycl/test-e2e/Plugin/sycl-targets-order.cpp index 090e819c0305d..273d3f51ec328 100644 --- a/sycl/test-e2e/Plugin/sycl-targets-order.cpp +++ b/sycl/test-e2e/Plugin/sycl-targets-order.cpp @@ -6,6 +6,7 @@ // RUN: %{run-unfiltered-devices} env ONEAPI_DEVICE_SELECTOR="cuda:*" %t-nvptx64-spir64.out // REQUIRES: opencl, cuda +// REQUIRES: build-and-run-mode //==------- sycl-targets-order.cpp - SYCL -fsycl-targets order test --------==// // diff --git a/sycl/test-e2e/Regression/compile_on_win_with_mdd.cpp b/sycl/test-e2e/Regression/compile_on_win_with_mdd.cpp index 57826c81ece2e..ea1e1c7d49891 100644 --- a/sycl/test-e2e/Regression/compile_on_win_with_mdd.cpp +++ b/sycl/test-e2e/Regression/compile_on_win_with_mdd.cpp @@ -1,4 +1,5 @@ // REQUIRES: windows +// REQUIRES: build-and-run-mode // RUN: %clangxx --driver-mode=cl -fsycl /MDd -c %s -o %t.obj // RUN: %clangxx --driver-mode=cl -fsycl %t.obj -Wno-unused-command-line-argument -o %t.out diff --git a/sycl/test-e2e/Regression/fsycl-host-compiler-win.cpp b/sycl/test-e2e/Regression/fsycl-host-compiler-win.cpp index 4ffe42c45c52f..e4073831bb71b 100644 --- a/sycl/test-e2e/Regression/fsycl-host-compiler-win.cpp +++ b/sycl/test-e2e/Regression/fsycl-host-compiler-win.cpp @@ -1,6 +1,7 @@ // RUN: %{build} -fsycl-host-compiler=cl -DDEFINE_CHECK -fsycl-host-compiler-options="-DDEFINE_CHECK /std:c++17 /Zc:__cplusplus" -o %t.exe // RUN: %{run} %t.exe // REQUIRES: windows +// REQUIRES: build-and-run-mode // //==------- fsycl-host-compiler-win.cpp - external host compiler test ------==// // diff --git a/sycl/test-e2e/Regression/msvc_crt.cpp b/sycl/test-e2e/Regression/msvc_crt.cpp index 9d59547e50d7b..a54570efd820c 100644 --- a/sycl/test-e2e/Regression/msvc_crt.cpp +++ b/sycl/test-e2e/Regression/msvc_crt.cpp @@ -3,6 +3,7 @@ // RUN: %{build} /MDd -o %t2.exe // RUN: %{run} %t2.exe // REQUIRES: system-windows, cl_options +// REQUIRES: build-and-run-mode //==-------------- msvc_crt.cpp - SYCL MSVC CRT test -----------------------==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/sycl/test-e2e/Regression/multiple-targets.cpp b/sycl/test-e2e/Regression/multiple-targets.cpp index 84bc68d6238bc..8a8c893f45ff2 100644 --- a/sycl/test-e2e/Regression/multiple-targets.cpp +++ b/sycl/test-e2e/Regression/multiple-targets.cpp @@ -3,6 +3,7 @@ // The test is repeated for per_kernel device code splitting. // // REQUIRES: cuda || hip || native_cpu +// REQUIRES: build-and-run-mode // RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple},spir64 -o %t1.out %s // RUN: %{run} %t1.out // diff --git a/sycl/test-e2e/SpecConstants/2020/non_native/cuda.cpp b/sycl/test-e2e/SpecConstants/2020/non_native/cuda.cpp index 12d2ce6a9faf9..af12b66208dad 100644 --- a/sycl/test-e2e/SpecConstants/2020/non_native/cuda.cpp +++ b/sycl/test-e2e/SpecConstants/2020/non_native/cuda.cpp @@ -1,4 +1,5 @@ // REQUIRES: cuda +// REQUIRES: build-and-run-mode // RUN: %clangxx -fsycl -fsycl-targets=nvptx64-nvidia-cuda %S/Inputs/common.cpp -o %t.out // RUN: %{run-unfiltered-devices} env ONEAPI_DEVICE_SELECTOR="cuda:*" %t.out diff --git a/sycl/test-e2e/VirtualFunctions/multiple-translation-units/separate-call.cpp b/sycl/test-e2e/VirtualFunctions/multiple-translation-units/separate-call.cpp index 8edb62e93d9b0..96ebac1c494e3 100644 --- a/sycl/test-e2e/VirtualFunctions/multiple-translation-units/separate-call.cpp +++ b/sycl/test-e2e/VirtualFunctions/multiple-translation-units/separate-call.cpp @@ -3,7 +3,7 @@ // VTables are global variables with possibly external linkage and that causes // them to be copied into every module we produce during device code split // which in turn leads to multiple definitions error at runtime. -// XFAIL: * +// XFAIL: run-mode // XFAIL-TRACKER: https://github.com/intel/llvm/issues/15069 // // This test covers a scenario where virtual functions defintion and their uses diff --git a/sycl/test-e2e/VirtualFunctions/multiple-translation-units/separate-vf-defs-and-call.cpp b/sycl/test-e2e/VirtualFunctions/multiple-translation-units/separate-vf-defs-and-call.cpp index 31c3adaf6a406..a0815f1bcaed2 100644 --- a/sycl/test-e2e/VirtualFunctions/multiple-translation-units/separate-vf-defs-and-call.cpp +++ b/sycl/test-e2e/VirtualFunctions/multiple-translation-units/separate-vf-defs-and-call.cpp @@ -5,7 +5,7 @@ // function definitions and therefore we won't mark construct kernel as using // virtual functions and link operation at runtime will fail due to undefined // references to virtual functions from vtable. -// XFAIL: * +// XFAIL: run-mode // XFAIL-TRACKER: https://github.com/intel/llvm/issues/15071 // // This test covers a scenario where virtual functions defintion and their uses diff --git a/sycl/test-e2e/VirtualFunctions/multiple-translation-units/separate-vf-defs.cpp b/sycl/test-e2e/VirtualFunctions/multiple-translation-units/separate-vf-defs.cpp index a682e2a7f15d9..ba0f2d25c9dde 100644 --- a/sycl/test-e2e/VirtualFunctions/multiple-translation-units/separate-vf-defs.cpp +++ b/sycl/test-e2e/VirtualFunctions/multiple-translation-units/separate-vf-defs.cpp @@ -5,7 +5,7 @@ // function definitions and therefore we won't mark construct kernel as using // virtual functions and link operation at runtime will fail due to undefined // references to virtual functions from vtable. -// XFAIL: * +// XFAIL: run-mode // XFAIL-TRACKER: https://github.com/intel/llvm/issues/15071 // // This test covers a scenario where virtual functions defintion and their uses diff --git a/sycl/test-e2e/bindless_images/cubemap/cubemap_sampled.cpp b/sycl/test-e2e/bindless_images/cubemap/cubemap_sampled.cpp index 71f9253b239a2..d228b308ab72e 100644 --- a/sycl/test-e2e/bindless_images/cubemap/cubemap_sampled.cpp +++ b/sycl/test-e2e/bindless_images/cubemap/cubemap_sampled.cpp @@ -1,5 +1,6 @@ // REQUIRES: cuda,aspect-ext_oneapi_cubemap // REQUIRES: aspect-ext_oneapi_cubemap_seamless_filtering +// REQUIRES: build-and-run-mode // RUN: %{build} -o %t.out // RUN: %{run} %t.out diff --git a/sycl/test-e2e/bindless_images/dx12_interop/read_write_unsampled.cpp b/sycl/test-e2e/bindless_images/dx12_interop/read_write_unsampled.cpp index 9985b27a0c4a9..aac2c1f23d788 100644 --- a/sycl/test-e2e/bindless_images/dx12_interop/read_write_unsampled.cpp +++ b/sycl/test-e2e/bindless_images/dx12_interop/read_write_unsampled.cpp @@ -1,5 +1,6 @@ // REQUIRES: aspect-ext_oneapi_bindless_images // REQUIRES: windows +// REQUIRES: build-and-run-mode // DEFINE: %{link-flags}=%if cl_options %{ /clang:-ld3d12 /clang:-ldxgi /clang:-ldxguid %} %else %{ -ld3d12 -ldxgi -ldxguid %} // RUN: %{build} %{link-flags} -o %t.out diff --git a/sycl/test-e2e/bindless_images/examples/example_1_1D_read_write.cpp b/sycl/test-e2e/bindless_images/examples/example_1_1D_read_write.cpp index 15ef93a9deffc..cc7425a1e585c 100644 --- a/sycl/test-e2e/bindless_images/examples/example_1_1D_read_write.cpp +++ b/sycl/test-e2e/bindless_images/examples/example_1_1D_read_write.cpp @@ -1,7 +1,7 @@ // REQUIRES: cuda // RUN: %{build} -o %t.out -// RUN: %t.out +// RUN: %{run} %t.out #include #include diff --git a/sycl/test-e2e/bindless_images/examples/example_2_2D_dynamic_read.cpp b/sycl/test-e2e/bindless_images/examples/example_2_2D_dynamic_read.cpp index 035c5314d4585..f98c4c4fb073a 100644 --- a/sycl/test-e2e/bindless_images/examples/example_2_2D_dynamic_read.cpp +++ b/sycl/test-e2e/bindless_images/examples/example_2_2D_dynamic_read.cpp @@ -1,7 +1,7 @@ // REQUIRES: cuda // RUN: %{build} -o %t.out -// RUN: %t.out +// RUN: %{run} %t.out #include #include diff --git a/sycl/test-e2e/bindless_images/examples/example_4_1D_array_read_write.cpp b/sycl/test-e2e/bindless_images/examples/example_4_1D_array_read_write.cpp index 511c5a66e1828..69fb804f977c5 100644 --- a/sycl/test-e2e/bindless_images/examples/example_4_1D_array_read_write.cpp +++ b/sycl/test-e2e/bindless_images/examples/example_4_1D_array_read_write.cpp @@ -1,7 +1,7 @@ // REQUIRES: cuda // RUN: %{build} -o %t.out -// RUN: %t.out +// RUN: %{run} %t.out #include #include diff --git a/sycl/test-e2e/bindless_images/examples/example_5_sample_cubemap.cpp b/sycl/test-e2e/bindless_images/examples/example_5_sample_cubemap.cpp index b84e86bb86cf9..c6ba9b48fad52 100644 --- a/sycl/test-e2e/bindless_images/examples/example_5_sample_cubemap.cpp +++ b/sycl/test-e2e/bindless_images/examples/example_5_sample_cubemap.cpp @@ -1,4 +1,5 @@ // REQUIRES: cuda +// REQUIRES: build-and-run-mode // RUN: %{build} -o %t.out // RUN: %{run} %t.out diff --git a/sycl/test-e2e/bindless_images/mipmap/mipmap_read_3D.cpp b/sycl/test-e2e/bindless_images/mipmap/mipmap_read_3D.cpp index e269eab7d8453..2369fa1f58aea 100644 --- a/sycl/test-e2e/bindless_images/mipmap/mipmap_read_3D.cpp +++ b/sycl/test-e2e/bindless_images/mipmap/mipmap_read_3D.cpp @@ -1,5 +1,5 @@ // REQUIRES: cuda -// XFAIL: * +// XFAIL: run-mode // XFAIL-TRACKER: https://github.com/intel/llvm/issues/15727 // RUN: %{build} -o %t.out // RUN: %{run-unfiltered-devices} %t.out diff --git a/sycl/test-e2e/bindless_images/vulkan_interop/mipmaps.cpp b/sycl/test-e2e/bindless_images/vulkan_interop/mipmaps.cpp index 1e826270f827c..57623c1b2da03 100644 --- a/sycl/test-e2e/bindless_images/vulkan_interop/mipmaps.cpp +++ b/sycl/test-e2e/bindless_images/vulkan_interop/mipmaps.cpp @@ -1,5 +1,6 @@ // REQUIRES: cuda // REQUIRES: vulkan +// REQUIRES: build-and-run-mode // RUN: %{build} %link-vulkan -o %t.out // RUN: %{run} %t.out diff --git a/sycl/test-e2e/bindless_images/vulkan_interop/sampled_images.cpp b/sycl/test-e2e/bindless_images/vulkan_interop/sampled_images.cpp index 1417a237f0c02..f09b786e2ced2 100644 --- a/sycl/test-e2e/bindless_images/vulkan_interop/sampled_images.cpp +++ b/sycl/test-e2e/bindless_images/vulkan_interop/sampled_images.cpp @@ -1,5 +1,6 @@ // REQUIRES: cuda || (windows && level_zero && aspect-ext_oneapi_bindless_images) // REQUIRES: vulkan +// REQUIRES: build-and-run-mode // RUN: %{build} %link-vulkan -o %t.out %if any-device-is-level_zero %{ -Wno-ignored-attributes -DENABLE_LINEAR_TILING -DTEST_L0_SUPPORTED_VK_FORMAT %} // RUN: %{run} env NEOReadDebugKeys=1 UseBindlessMode=1 UseExternalAllocatorForSshAndDsh=1 %t.out diff --git a/sycl/test-e2e/bindless_images/vulkan_interop/sampled_images_USM.cpp b/sycl/test-e2e/bindless_images/vulkan_interop/sampled_images_USM.cpp index d480d4fed3db8..159b1c9ec1b44 100644 --- a/sycl/test-e2e/bindless_images/vulkan_interop/sampled_images_USM.cpp +++ b/sycl/test-e2e/bindless_images/vulkan_interop/sampled_images_USM.cpp @@ -1,5 +1,6 @@ // REQUIRES: cuda // REQUIRES: vulkan +// REQUIRES: build-and-run-mode // RUN: %{build} %link-vulkan -o %t.out // RUN: %{run} %t.out diff --git a/sycl/test-e2e/bindless_images/vulkan_interop/unsampled_images.cpp b/sycl/test-e2e/bindless_images/vulkan_interop/unsampled_images.cpp index 043fba15297ae..1fdf317aed983 100644 --- a/sycl/test-e2e/bindless_images/vulkan_interop/unsampled_images.cpp +++ b/sycl/test-e2e/bindless_images/vulkan_interop/unsampled_images.cpp @@ -1,5 +1,6 @@ // REQUIRES: cuda || (windows && level_zero && aspect-ext_oneapi_bindless_images) // REQUIRES: vulkan +// REQUIRES: build-and-run-mode // RUN: %{build} %link-vulkan -o %t.out %if any-device-is-level_zero %{ -Wno-ignored-attributes -DTEST_L0_SUPPORTED_VK_FORMAT %} // RUN: %{run} env NEOReadDebugKeys=1 UseBindlessMode=1 UseExternalAllocatorForSshAndDsh=1 %t.out diff --git a/sycl/test-e2e/bindless_images/vulkan_interop/unsampled_images_semaphore.cpp b/sycl/test-e2e/bindless_images/vulkan_interop/unsampled_images_semaphore.cpp index 54fc2d7bfb984..af9163311727c 100644 --- a/sycl/test-e2e/bindless_images/vulkan_interop/unsampled_images_semaphore.cpp +++ b/sycl/test-e2e/bindless_images/vulkan_interop/unsampled_images_semaphore.cpp @@ -1,5 +1,6 @@ // REQUIRES: cuda // REQUIRES: vulkan +// REQUIRES: build-and-run-mode // RUN: %{build} %link-vulkan -o %t.out // RUN: %{run} %t.out diff --git a/sycl/test-e2e/format.py b/sycl/test-e2e/format.py index e0cf41d8b118f..e6d0da2c39b7b 100644 --- a/sycl/test-e2e/format.py +++ b/sycl/test-e2e/format.py @@ -154,18 +154,26 @@ def execute(self, test, litConfig): if isinstance(script, lit.Test.Result): return script - devices_for_test = self.select_devices_for_test(test) - if not devices_for_test: - return lit.Test.Result( - lit.Test.UNSUPPORTED, "No supported devices to run the test on" - ) - - substitutions = lit.TestRunner.getDefaultSubstitutions(test, tmpDir, tmpBase) + devices_for_test = [] triples = set() - for sycl_device in devices_for_test: - (backend, _) = sycl_device.split(":") - triples.add(get_triple(test, backend)) + if test.config.test_mode == "build-only": + if "build-and-run-mode" in test.requires or "true" in test.unsupported: + return lit.Test.Result( + lit.Test.UNSUPPORTED, "Test unsupported for this environment" + ) + triples = {"spir64"} + else: + devices_for_test = self.select_devices_for_test(test) + if not devices_for_test: + return lit.Test.Result( + lit.Test.UNSUPPORTED, "No supported devices to run the test on" + ) + for sycl_device in devices_for_test: + (backend, _) = sycl_device.split(":") + triples.add(get_triple(test, backend)) + + substitutions = lit.TestRunner.getDefaultSubstitutions(test, tmpDir, tmpBase) substitutions.append(("%{sycl_triple}", format(",".join(triples)))) # -fsycl-targets is needed for CUDA/HIP, so just use it be default so # -that new tests by default would runnable there (unless they have @@ -223,6 +231,17 @@ def get_extra_env(sycl_devices): new_script.append(directive) continue + # Filter commands based on split-mode + is_run_line = any( + i in directive.command + for i in ["%{run}", "%{run-unfiltered-devices}", "%if run-mode"] + ) + + if (is_run_line and test.config.test_mode == "build-only") or ( + not is_run_line and test.config.test_mode == "run-only" + ): + directive.command = "" + if "%{run}" not in directive.command: new_script.append(directive) continue @@ -278,7 +297,7 @@ def get_extra_env(sycl_devices): test, litConfig, useExternalSh, script, tmpBase ) - if len(devices_for_test) > 1: + if len(devices_for_test) > 1 or test.config.test_mode == "build-only": return result # Single device - might be an XFAIL. diff --git a/sycl/test-e2e/lit.cfg.py b/sycl/test-e2e/lit.cfg.py index c0e68f2a051ca..2ef9ac91ce299 100644 --- a/sycl/test-e2e/lit.cfg.py +++ b/sycl/test-e2e/lit.cfg.py @@ -37,6 +37,22 @@ config.required_features = [] config.unsupported_features = [] +# test-mode: Set if tests should run normally or only build/run +match lit_config.params.get("test-mode", "full"): + case "run-only": + config.test_mode = "run-only" + config.available_features.add("run-mode") + case "build-only": + config.test_mode = "build-only" + config.sycl_devices = [] + arch_flag = "" + case "full": + config.test_mode = "full" + config.available_features.add("run-mode") + config.available_features.add("build-and-run-mode") + case _: + lit_config.error("Invalid argument for test-mode") + # Cleanup environment variables which may affect tests possibly_dangerous_env_vars = [ "COMPILER_PATH", diff --git a/sycl/test-e2e/syclcompat/kernel/kernel_win.cpp b/sycl/test-e2e/syclcompat/kernel/kernel_win.cpp index 52c324fdfcb4d..02ec26ab78a48 100644 --- a/sycl/test-e2e/syclcompat/kernel/kernel_win.cpp +++ b/sycl/test-e2e/syclcompat/kernel/kernel_win.cpp @@ -1,4 +1,5 @@ // REQUIRES: windows +// REQUIRES: build-and-run-mode // DEFINE: %{sharedflag} = %if cl_options %{/clang:-shared%} %else %{-shared%} diff --git a/sycl/test-e2e/syclcompat/launch/launch_properties.cpp b/sycl/test-e2e/syclcompat/launch/launch_properties.cpp index 2ed7fc673b09a..5d07ad256b328 100644 --- a/sycl/test-e2e/syclcompat/launch/launch_properties.cpp +++ b/sycl/test-e2e/syclcompat/launch/launch_properties.cpp @@ -23,6 +23,7 @@ **************************************************************************/ // REQUIRES: aspect-ext_oneapi_cuda_cluster_group +// REQUIRES: build-and-run-mode // RUN: %{build} -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_90 -o %t.out // RUN: %{run} %t.out diff --git a/sycl/test-e2e/syclcompat/memory/local_memory_ptr_to_integer.cpp b/sycl/test-e2e/syclcompat/memory/local_memory_ptr_to_integer.cpp index 184f7b5835810..edd9e63a3752a 100644 --- a/sycl/test-e2e/syclcompat/memory/local_memory_ptr_to_integer.cpp +++ b/sycl/test-e2e/syclcompat/memory/local_memory_ptr_to_integer.cpp @@ -1,4 +1,5 @@ // REQUIRES: cuda +// REQUIRES: build-and-run-mode // RUN: %{build} -Xsycl-target-backend --cuda-gpu-arch=sm_75 -o %t.out // RUN: %{run} %t.out #include