From 7c40c95c5fcd1e9b515f346ef8df49608ff3a60c Mon Sep 17 00:00:00 2001 From: "Garcia Orozco, David" Date: Tue, 4 Feb 2025 13:39:49 -0800 Subject: [PATCH 1/3] Repace any-device-is with target features in %if markup --- sycl/test-e2e/AtomicRef/atomic_memory_order_acq_rel.cpp | 2 +- sycl/test-e2e/AtomicRef/atomic_memory_order_seq_cst.cpp | 2 +- sycl/test-e2e/BFloat16/bfloat16_builtins.cpp | 4 ++-- sycl/test-e2e/BFloat16/bfloat16_builtins_cuda_generic.cpp | 4 ++-- sycl/test-e2e/BFloat16/bfloat16_type.cpp | 2 +- sycl/test-e2e/Basic/interop/interop_all_backends.cpp | 8 ++++---- sycl/test-e2e/DeviceLib/cmath_test.cpp | 2 +- sycl/test-e2e/GroupAlgorithm/root_group.cpp | 2 +- sycl/test-e2e/NewOffloadDriver/lit.local.cfg | 2 +- sycl/test-e2e/NonUniformGroups/ballot_group.cpp | 2 +- .../test-e2e/NonUniformGroups/ballot_group_algorithms.cpp | 2 +- sycl/test-e2e/NonUniformGroups/fixed_size_group.cpp | 2 +- .../NonUniformGroups/fixed_size_group_algorithms.cpp | 2 +- sycl/test-e2e/NonUniformGroups/opportunistic_group.cpp | 2 +- .../NonUniformGroups/opportunistic_group_algorithms.cpp | 2 +- sycl/test-e2e/NonUniformGroups/tangle_group.cpp | 2 +- .../test-e2e/NonUniformGroups/tangle_group_algorithms.cpp | 2 +- sycl/test-e2e/Reduction/reduction_range_1d_dw.cpp | 2 +- sycl/test-e2e/Reduction/reduction_range_1d_dw_64bit.cpp | 2 +- .../Reduction/reduction_range_1d_reducer_skip.cpp | 2 +- sycl/test-e2e/Reduction/reduction_range_1d_rw.cpp | 2 +- sycl/test-e2e/Reduction/reduction_range_2d_dw.cpp | 2 +- .../Reduction/reduction_range_2d_dw_reducer_skip.cpp | 2 +- sycl/test-e2e/Reduction/reduction_range_2d_rw.cpp | 2 +- sycl/test-e2e/Reduction/reduction_range_3d_dw.cpp | 2 +- sycl/test-e2e/Reduction/reduction_range_3d_rw.cpp | 2 +- .../Reduction/reduction_range_3d_rw_reducer_skip.cpp | 2 +- sycl/test-e2e/Reduction/reduction_range_usm_dw.cpp | 2 +- sycl/test-e2e/USM/P2P/p2p_atomics.cpp | 2 +- .../bindless_images/dx12_interop/read_write_unsampled.cpp | 2 +- .../bindless_images/vulkan_interop/sampled_images.cpp | 2 +- .../bindless_images/vulkan_interop/unsampled_images.cpp | 2 +- sycl/test-e2e/syclcompat/atomic/atomic_class.cpp | 2 +- sycl/test-e2e/syclcompat/atomic/atomic_memory_acq_rel.cpp | 2 +- sycl/test-e2e/syclcompat/math/math_byte_dot_product.cpp | 2 +- 35 files changed, 40 insertions(+), 40 deletions(-) diff --git a/sycl/test-e2e/AtomicRef/atomic_memory_order_acq_rel.cpp b/sycl/test-e2e/AtomicRef/atomic_memory_order_acq_rel.cpp index 2697855754f74..bac155b16b3c4 100644 --- a/sycl/test-e2e/AtomicRef/atomic_memory_order_acq_rel.cpp +++ b/sycl/test-e2e/AtomicRef/atomic_memory_order_acq_rel.cpp @@ -1,4 +1,4 @@ -// RUN: %{build} -O3 -o %t.out %if any-device-is-cuda %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_70 %} +// RUN: %{build} -O3 -o %t.out %if target-nvidia %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_70 %} // RUN: %{run} %t.out // NOTE: Tests fetch_add for acquire and release memory ordering. diff --git a/sycl/test-e2e/AtomicRef/atomic_memory_order_seq_cst.cpp b/sycl/test-e2e/AtomicRef/atomic_memory_order_seq_cst.cpp index c29f3a3005a0b..462834453129e 100644 --- a/sycl/test-e2e/AtomicRef/atomic_memory_order_seq_cst.cpp +++ b/sycl/test-e2e/AtomicRef/atomic_memory_order_seq_cst.cpp @@ -1,4 +1,4 @@ -// RUN: %{build} -O3 -o %t.out %if any-device-is-cuda %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_70 %} +// RUN: %{build} -O3 -o %t.out %if target-nvidia %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_70 %} // RUN: %{run} %t.out #include "atomic_memory_order.h" diff --git a/sycl/test-e2e/BFloat16/bfloat16_builtins.cpp b/sycl/test-e2e/BFloat16/bfloat16_builtins.cpp index 08f0d943a2dd0..d157c68dcaca2 100644 --- a/sycl/test-e2e/BFloat16/bfloat16_builtins.cpp +++ b/sycl/test-e2e/BFloat16/bfloat16_builtins.cpp @@ -5,11 +5,11 @@ // + below sm_80 always uses generic impls // DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%} -// RUN: %clangxx -fsycl %{sycl_target_opts} %if any-device-is-cuda %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_80 %} %s -o %t.out %{mathflags} +// RUN: %clangxx -fsycl %{sycl_target_opts} %if target-nvidia %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_80 %} %s -o %t.out %{mathflags} // RUN: %{run} %t.out // Test "new" (ABI breaking) for all platforms ( sm_80/native if CUDA ) -// RUN: %if preview-breaking-changes-supported %{ %clangxx -fsycl -fpreview-breaking-changes %{sycl_target_opts} %if any-device-is-cuda %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_80 %} %s -o %t2.out %{mathflags} %} +// RUN: %if preview-breaking-changes-supported %{ %clangxx -fsycl -fpreview-breaking-changes %{sycl_target_opts} %if target-nvidia %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_80 %} %s -o %t2.out %{mathflags} %} // RUN: %if preview-breaking-changes-supported %{ %{run} %t2.out %} // Flaky timeout on CPU. Enable when fixed. diff --git a/sycl/test-e2e/BFloat16/bfloat16_builtins_cuda_generic.cpp b/sycl/test-e2e/BFloat16/bfloat16_builtins_cuda_generic.cpp index 719bf4709ae4c..f233d198535ca 100644 --- a/sycl/test-e2e/BFloat16/bfloat16_builtins_cuda_generic.cpp +++ b/sycl/test-e2e/BFloat16/bfloat16_builtins_cuda_generic.cpp @@ -7,8 +7,8 @@ // DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%} // If CUDA, test "new" again for sm_75/generic -// RUN: %if any-device-is-cuda %{ %if preview-breaking-changes-supported %{ %clangxx -fsycl -fpreview-breaking-changes %{sycl_target_opts} -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_75 %s -o %t3.out %{mathflags} %} %} -// RUN: %if any-device-is-cuda %{ %if preview-breaking-changes-supported %{ %{run} %t3.out %} %} +// RUN: %if target-nvidia %{ %if preview-breaking-changes-supported %{ %clangxx -fsycl -fpreview-breaking-changes %{sycl_target_opts} -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_75 %s -o %t3.out %{mathflags} %} %} +// RUN: %if target-nvidia %{ %if preview-breaking-changes-supported %{ %{run} %t3.out %} %} #include "bfloat16_builtins.hpp" diff --git a/sycl/test-e2e/BFloat16/bfloat16_type.cpp b/sycl/test-e2e/BFloat16/bfloat16_type.cpp index 7e7972f949522..20ac1d311ed9c 100644 --- a/sycl/test-e2e/BFloat16/bfloat16_type.cpp +++ b/sycl/test-e2e/BFloat16/bfloat16_type.cpp @@ -1,4 +1,4 @@ -// RUN: %if any-device-is-cuda %{ %{build} -DUSE_CUDA_SM80=1 -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_80 -o %t.cuda.out %} +// RUN: %if target-nvidia %{ %{build} -DUSE_CUDA_SM80=1 -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_80 -o %t.cuda.out %} // RUN: %if cuda %{ %{run} %t.cuda.out %} // RUN: %{build} -o %t.out // RUN: %{run} %t.out diff --git a/sycl/test-e2e/Basic/interop/interop_all_backends.cpp b/sycl/test-e2e/Basic/interop/interop_all_backends.cpp index 902ab1f1d09b9..c4dec5e6f670c 100644 --- a/sycl/test-e2e/Basic/interop/interop_all_backends.cpp +++ b/sycl/test-e2e/Basic/interop/interop_all_backends.cpp @@ -1,8 +1,8 @@ -// XFAIL: any-device-is-cuda +// XFAIL: target-nvidia // XFAIL-TRACKER: https://github.com/intel/llvm/issues/16070 -// RUN: %if any-device-is-opencl %{ %{build} -o %t-opencl.out %} -// RUN: %if any-device-is-cuda %{ %{build} -isystem %sycl_include -DBUILD_FOR_CUDA -o %t-cuda.out %} -// RUN: %if any-device-is-hip %{ %{build} -DBUILD_FOR_HIP -o %t-hip.out %} +// RUN: %if target-spir %{ %{build} -o %t-opencl.out %} +// RUN: %if target-nvidia %{ %{build} -isystem %sycl_include -DBUILD_FOR_CUDA -o %t-cuda.out %} +// RUN: %if target-amd %{ %{build} -DBUILD_FOR_HIP -o %t-hip.out %} #include #include diff --git a/sycl/test-e2e/DeviceLib/cmath_test.cpp b/sycl/test-e2e/DeviceLib/cmath_test.cpp index 97a92bc2b3885..8c16c589bff3e 100644 --- a/sycl/test-e2e/DeviceLib/cmath_test.cpp +++ b/sycl/test-e2e/DeviceLib/cmath_test.cpp @@ -7,7 +7,7 @@ // RUN: %if !gpu %{ %{run} %t2.out %} // // // Check that --fast-math works with cmath funcs for CUDA -// RUN: %if any-device-is-cuda %{ %{build} -Wno-nan-infinity-disabled -fno-builtin %{mathflags} -o %t3.out -ffast-math -DSYCL_E2E_FASTMATH %} +// RUN: %if target-nvidia %{ %{build} -Wno-nan-infinity-disabled -fno-builtin %{mathflags} -o %t3.out -ffast-math -DSYCL_E2E_FASTMATH %} // RUN: %if cuda %{ %{run} %t3.out %} #include "math_utils.hpp" diff --git a/sycl/test-e2e/GroupAlgorithm/root_group.cpp b/sycl/test-e2e/GroupAlgorithm/root_group.cpp index 257b5a4e4457f..c1fdeb58acec7 100644 --- a/sycl/test-e2e/GroupAlgorithm/root_group.cpp +++ b/sycl/test-e2e/GroupAlgorithm/root_group.cpp @@ -5,7 +5,7 @@ // TODO: Currently using the -Wno-deprecated-declarations flag due to issue // https://github.com/intel/llvm/issues/16451. Rewrite testRootGroup() amd // remove the flag once the issue is resolved. -// RUN: %{build} -I . -o %t.out -Wno-deprecated-declarations %if any-device-is-cuda %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_70 %} +// RUN: %{build} -I . -o %t.out -Wno-deprecated-declarations %if target-nvidia %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_70 %} // RUN: %{run} %t.out // Disabled temporarily while investigation into the failure is ongoing. diff --git a/sycl/test-e2e/NewOffloadDriver/lit.local.cfg b/sycl/test-e2e/NewOffloadDriver/lit.local.cfg index 1e48e3bd2ad52..892e3cddea99e 100644 --- a/sycl/test-e2e/NewOffloadDriver/lit.local.cfg +++ b/sycl/test-e2e/NewOffloadDriver/lit.local.cfg @@ -3,5 +3,5 @@ import platform config.unsupported_features += ['accelerator'] config.substitutions.append( - ("%{embed-ir}", "%if any-device-is-hip || any-device-is-cuda %{ -fsycl-embed-ir %}") + ("%{embed-ir}", "%if target-amd || target-nvidia %{ -fsycl-embed-ir %}") ) diff --git a/sycl/test-e2e/NonUniformGroups/ballot_group.cpp b/sycl/test-e2e/NonUniformGroups/ballot_group.cpp index 1532c54879ecc..8401ad5dbc8aa 100644 --- a/sycl/test-e2e/NonUniformGroups/ballot_group.cpp +++ b/sycl/test-e2e/NonUniformGroups/ballot_group.cpp @@ -1,7 +1,7 @@ // RUN: %{build} -o %t.out // RUN: %{run} %t.out // -// RUN: %if any-device-is-cpu && opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s %} +// RUN: %if opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s %} // RUN: %if cpu %{ %{run} %t.x86.out %} // // REQUIRES: build-and-run-mode diff --git a/sycl/test-e2e/NonUniformGroups/ballot_group_algorithms.cpp b/sycl/test-e2e/NonUniformGroups/ballot_group_algorithms.cpp index da9154ae602d0..61a93910c2479 100644 --- a/sycl/test-e2e/NonUniformGroups/ballot_group_algorithms.cpp +++ b/sycl/test-e2e/NonUniformGroups/ballot_group_algorithms.cpp @@ -1,7 +1,7 @@ // RUN: %{build} -o %t.out // RUN: %{run} %t.out // -// RUN: %if any-device-is-cpu && opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s %} +// RUN: %if opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s %} // RUN: %if cpu %{ %{run} %t.x86.out %} // // REQUIRES: build-and-run-mode diff --git a/sycl/test-e2e/NonUniformGroups/fixed_size_group.cpp b/sycl/test-e2e/NonUniformGroups/fixed_size_group.cpp index 5d2b98b58ddc2..dceb636728eb0 100644 --- a/sycl/test-e2e/NonUniformGroups/fixed_size_group.cpp +++ b/sycl/test-e2e/NonUniformGroups/fixed_size_group.cpp @@ -1,7 +1,7 @@ // RUN: %{build} -o %t.out // RUN: %{run} %t.out // -// RUN: %if any-device-is-cpu && opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s %} +// RUN: %if opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s %} // RUN: %if cpu %{ %{run} %t.x86.out %} // // REQUIRES: build-and-run-mode diff --git a/sycl/test-e2e/NonUniformGroups/fixed_size_group_algorithms.cpp b/sycl/test-e2e/NonUniformGroups/fixed_size_group_algorithms.cpp index 07898d0146fb9..706a3523d3bf6 100644 --- a/sycl/test-e2e/NonUniformGroups/fixed_size_group_algorithms.cpp +++ b/sycl/test-e2e/NonUniformGroups/fixed_size_group_algorithms.cpp @@ -1,7 +1,7 @@ // RUN: %{build} -fsycl-device-code-split=per_kernel -o %t.out // RUN: %{run} %t.out // -// RUN: %if any-device-is-cpu && opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -fsycl-device-code-split=per_kernel -o %t.x86.out %s %} +// RUN: %if opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -fsycl-device-code-split=per_kernel -o %t.x86.out %s %} // RUN: %if cpu %{ %{run} %t.x86.out %} // // REQUIRES: build-and-run-mode diff --git a/sycl/test-e2e/NonUniformGroups/opportunistic_group.cpp b/sycl/test-e2e/NonUniformGroups/opportunistic_group.cpp index 2069113c3f939..a35c8f3d9a8fd 100644 --- a/sycl/test-e2e/NonUniformGroups/opportunistic_group.cpp +++ b/sycl/test-e2e/NonUniformGroups/opportunistic_group.cpp @@ -1,7 +1,7 @@ // RUN: %{build} -o %t.out // RUN: %{run} %t.out // -// RUN: %if any-device-is-cpu && opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s %} +// RUN: %if opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s %} // RUN: %if cpu %{ %{run} %t.x86.out %} // // REQUIRES: build-and-run-mode diff --git a/sycl/test-e2e/NonUniformGroups/opportunistic_group_algorithms.cpp b/sycl/test-e2e/NonUniformGroups/opportunistic_group_algorithms.cpp index 8e7626650e01c..cdb56b3943978 100644 --- a/sycl/test-e2e/NonUniformGroups/opportunistic_group_algorithms.cpp +++ b/sycl/test-e2e/NonUniformGroups/opportunistic_group_algorithms.cpp @@ -1,7 +1,7 @@ // RUN: %{build} -o %t.out // RUN: %{run} %t.out // -// RUN: %if any-device-is-cpu && opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s %} +// RUN: %if opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s %} // RUN: %if cpu %{ %{run} %t.x86.out %} // // REQUIRES: build-and-run-mode diff --git a/sycl/test-e2e/NonUniformGroups/tangle_group.cpp b/sycl/test-e2e/NonUniformGroups/tangle_group.cpp index 686d1b34c6185..869d26af26b8f 100644 --- a/sycl/test-e2e/NonUniformGroups/tangle_group.cpp +++ b/sycl/test-e2e/NonUniformGroups/tangle_group.cpp @@ -1,7 +1,7 @@ // RUN: %{build} -fno-sycl-early-optimizations -o %t.out // RUN: %{run} %t.out // -// RUN: %if any-device-is-cpu && opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -fno-sycl-early-optimizations -o %t.x86.out %s %} +// RUN: %if opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -fno-sycl-early-optimizations -o %t.x86.out %s %} // RUN: %if cpu %{ %{run} %t.x86.out %} // // REQUIRES: build-and-run-mode diff --git a/sycl/test-e2e/NonUniformGroups/tangle_group_algorithms.cpp b/sycl/test-e2e/NonUniformGroups/tangle_group_algorithms.cpp index 51070ed1731e4..35626bb927f62 100644 --- a/sycl/test-e2e/NonUniformGroups/tangle_group_algorithms.cpp +++ b/sycl/test-e2e/NonUniformGroups/tangle_group_algorithms.cpp @@ -1,7 +1,7 @@ // RUN: %{build} -fno-sycl-early-optimizations -o %t.out // RUN: %{run} %t.out // -// RUN: %if any-device-is-cpu && opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -fno-sycl-early-optimizations -o %t.x86.out %s %} +// RUN: %if opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -fno-sycl-early-optimizations -o %t.x86.out %s %} // RUN: %if cpu %{ %{run} %t.x86.out %} // // REQUIRES: build-and-run-mode diff --git a/sycl/test-e2e/Reduction/reduction_range_1d_dw.cpp b/sycl/test-e2e/Reduction/reduction_range_1d_dw.cpp index 4906b91350259..9e2f59c9ae3e8 100644 --- a/sycl/test-e2e/Reduction/reduction_range_1d_dw.cpp +++ b/sycl/test-e2e/Reduction/reduction_range_1d_dw.cpp @@ -1,4 +1,4 @@ -// RUN: %{build} -DENABLE_64_BIT=false -o %t.out %if any-device-is-cuda %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_60 %} +// RUN: %{build} -DENABLE_64_BIT=false -o %t.out %if target-nvidia %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_60 %} // RUN: %{run} %t.out // Windows doesn't yet have full shutdown(). diff --git a/sycl/test-e2e/Reduction/reduction_range_1d_dw_64bit.cpp b/sycl/test-e2e/Reduction/reduction_range_1d_dw_64bit.cpp index fc1f83d558be7..e1f2245485f1a 100644 --- a/sycl/test-e2e/Reduction/reduction_range_1d_dw_64bit.cpp +++ b/sycl/test-e2e/Reduction/reduction_range_1d_dw_64bit.cpp @@ -1,4 +1,4 @@ -// RUN: %{build} -DENABLE_64_BIT=true -o %t.out %if any-device-is-cuda %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_60 %} +// RUN: %{build} -DENABLE_64_BIT=true -o %t.out %if target-nvidia %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_60 %} // RUN: %{run} %t.out // Windows doesn't yet have full shutdown(). diff --git a/sycl/test-e2e/Reduction/reduction_range_1d_reducer_skip.cpp b/sycl/test-e2e/Reduction/reduction_range_1d_reducer_skip.cpp index bb8c56d1a8c2d..3f74339a6e640 100644 --- a/sycl/test-e2e/Reduction/reduction_range_1d_reducer_skip.cpp +++ b/sycl/test-e2e/Reduction/reduction_range_1d_reducer_skip.cpp @@ -1,4 +1,4 @@ -// RUN: %{build} -o %t.out %if any-device-is-cuda %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_60 %} +// RUN: %{build} -o %t.out %if target-nvidia %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_60 %} // RUN: %{run} %t.out // Windows doesn't yet have full shutdown(). diff --git a/sycl/test-e2e/Reduction/reduction_range_1d_rw.cpp b/sycl/test-e2e/Reduction/reduction_range_1d_rw.cpp index c8eb129a06ad4..816611ea3be44 100644 --- a/sycl/test-e2e/Reduction/reduction_range_1d_rw.cpp +++ b/sycl/test-e2e/Reduction/reduction_range_1d_rw.cpp @@ -1,4 +1,4 @@ -// RUN: %{build} -o %t.out %if any-device-is-cuda %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_60 %} +// RUN: %{build} -o %t.out %if target-nvidia %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_60 %} // RUN: %{run} %t.out // Windows doesn't yet have full shutdown(). diff --git a/sycl/test-e2e/Reduction/reduction_range_2d_dw.cpp b/sycl/test-e2e/Reduction/reduction_range_2d_dw.cpp index e59061f6b88a2..bede263e59ad5 100644 --- a/sycl/test-e2e/Reduction/reduction_range_2d_dw.cpp +++ b/sycl/test-e2e/Reduction/reduction_range_2d_dw.cpp @@ -1,4 +1,4 @@ -// RUN: %{build} -o %t.out %if any-device-is-cuda %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_60 %} +// RUN: %{build} -o %t.out %if target-nvidia %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_60 %} // RUN: %{run} %t.out // Windows doesn't yet have full shutdown(). diff --git a/sycl/test-e2e/Reduction/reduction_range_2d_dw_reducer_skip.cpp b/sycl/test-e2e/Reduction/reduction_range_2d_dw_reducer_skip.cpp index 4a2c7fd24ac00..c58010ab666d8 100644 --- a/sycl/test-e2e/Reduction/reduction_range_2d_dw_reducer_skip.cpp +++ b/sycl/test-e2e/Reduction/reduction_range_2d_dw_reducer_skip.cpp @@ -1,4 +1,4 @@ -// RUN: %{build} -o %t.out %if any-device-is-cuda %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_60 %} +// RUN: %{build} -o %t.out %if target-nvidia %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_60 %} // RUN: %{run} %t.out // Windows doesn't yet have full shutdown(). diff --git a/sycl/test-e2e/Reduction/reduction_range_2d_rw.cpp b/sycl/test-e2e/Reduction/reduction_range_2d_rw.cpp index c1854ad044146..6fe6ae756a87a 100644 --- a/sycl/test-e2e/Reduction/reduction_range_2d_rw.cpp +++ b/sycl/test-e2e/Reduction/reduction_range_2d_rw.cpp @@ -1,4 +1,4 @@ -// RUN: %{build} -o %t.out %if any-device-is-cuda %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_60 %} +// RUN: %{build} -o %t.out %if target-nvidia %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_60 %} // RUN: %{run} %t.out // Windows doesn't yet have full shutdown(). diff --git a/sycl/test-e2e/Reduction/reduction_range_3d_dw.cpp b/sycl/test-e2e/Reduction/reduction_range_3d_dw.cpp index 735adb82df87d..a832c6ab30046 100644 --- a/sycl/test-e2e/Reduction/reduction_range_3d_dw.cpp +++ b/sycl/test-e2e/Reduction/reduction_range_3d_dw.cpp @@ -1,4 +1,4 @@ -// RUN: %{build} -o %t.out %if any-device-is-cuda %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_60 %} +// RUN: %{build} -o %t.out %if target-nvidia %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_60 %} // RUN: %{run} %t.out // Windows doesn't yet have full shutdown(). diff --git a/sycl/test-e2e/Reduction/reduction_range_3d_rw.cpp b/sycl/test-e2e/Reduction/reduction_range_3d_rw.cpp index 015fa167647db..dfc2366c3cb7e 100644 --- a/sycl/test-e2e/Reduction/reduction_range_3d_rw.cpp +++ b/sycl/test-e2e/Reduction/reduction_range_3d_rw.cpp @@ -1,4 +1,4 @@ -// RUN: %{build} -o %t.out %if any-device-is-cuda %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_60 %} +// RUN: %{build} -o %t.out %if target-nvidia %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_60 %} // RUN: %{run} %t.out // Windows doesn't yet have full shutdown(). diff --git a/sycl/test-e2e/Reduction/reduction_range_3d_rw_reducer_skip.cpp b/sycl/test-e2e/Reduction/reduction_range_3d_rw_reducer_skip.cpp index 85960235d2e3c..31ad10d456011 100644 --- a/sycl/test-e2e/Reduction/reduction_range_3d_rw_reducer_skip.cpp +++ b/sycl/test-e2e/Reduction/reduction_range_3d_rw_reducer_skip.cpp @@ -1,4 +1,4 @@ -// RUN: %{build} -o %t.out %if any-device-is-cuda %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_60 %} +// RUN: %{build} -o %t.out %if target-nvidia %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_60 %} // RUN: %{run} %t.out // Windows doesn't yet have full shutdown(). diff --git a/sycl/test-e2e/Reduction/reduction_range_usm_dw.cpp b/sycl/test-e2e/Reduction/reduction_range_usm_dw.cpp index 9c9f366f6a588..add12df70e305 100644 --- a/sycl/test-e2e/Reduction/reduction_range_usm_dw.cpp +++ b/sycl/test-e2e/Reduction/reduction_range_usm_dw.cpp @@ -1,4 +1,4 @@ -// RUN: %{build} -o %t.out %if any-device-is-cuda %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_60 %} +// RUN: %{build} -o %t.out %if target-nvidia %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_60 %} // RUN: %{run} %t.out // Windows doesn't yet have full shutdown(). diff --git a/sycl/test-e2e/USM/P2P/p2p_atomics.cpp b/sycl/test-e2e/USM/P2P/p2p_atomics.cpp index b81405f316e7c..06ce3efc2ed88 100644 --- a/sycl/test-e2e/USM/P2P/p2p_atomics.cpp +++ b/sycl/test-e2e/USM/P2P/p2p_atomics.cpp @@ -1,5 +1,5 @@ // REQUIRES: cuda || hip || level_zero -// RUN: %{build} %if any-device-is-cuda %{ -Xsycl-target-backend --cuda-gpu-arch=sm_61 %} -o %t.out +// RUN: %{build} %if target-nvidia %{ -Xsycl-target-backend --cuda-gpu-arch=sm_61 %} -o %t.out // RUN: %{run} %t.out #include 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 1aeb63636cc71..e00fd26271372 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 @@ -2,7 +2,7 @@ // REQUIRES: windows // DEFINE: %{link-flags}=%if cl_options %{ /clang:-ld3d12 /clang:-ldxgi /clang:-ldxguid %} %else %{ -ld3d12 -ldxgi -ldxguid %} -// RUN: %{build} %{link-flags} -o %t.out %if any-device-is-level_zero %{ -DDISABLE_UNORM_TESTS %} +// RUN: %{build} %{link-flags} -o %t.out %if target-spir %{ -DDISABLE_UNORM_TESTS %} // RUN: %{run-unfiltered-devices} env NEOReadDebugKeys=1 UseBindlessMode=1 UseExternalAllocatorForSshAndDsh=1 %t.out #pragma clang diagnostic ignored "-Waddress-of-temporary" 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 5eb9f915ebd27..880989df48df2 100644 --- a/sycl/test-e2e/bindless_images/vulkan_interop/sampled_images.cpp +++ b/sycl/test-e2e/bindless_images/vulkan_interop/sampled_images.cpp @@ -1,7 +1,7 @@ // REQUIRES: target-nvidia || (windows && level_zero && aspect-ext_oneapi_bindless_images) // REQUIRES: vulkan -// 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: %{build} %link-vulkan -o %t.out %if target-spir %{ -Wno-ignored-attributes -DENABLE_LINEAR_TILING -DTEST_L0_SUPPORTED_VK_FORMAT %} // RUN: %{run} env NEOReadDebugKeys=1 UseBindlessMode=1 UseExternalAllocatorForSshAndDsh=1 %t.out // Uncomment to print additional test information 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 a320277d2d2ec..adc70a9397763 100644 --- a/sycl/test-e2e/bindless_images/vulkan_interop/unsampled_images.cpp +++ b/sycl/test-e2e/bindless_images/vulkan_interop/unsampled_images.cpp @@ -1,7 +1,7 @@ // REQUIRES: target-nvidia || (windows && level_zero && aspect-ext_oneapi_bindless_images) // REQUIRES: vulkan -// RUN: %{build} %link-vulkan -o %t.out %if any-device-is-level_zero %{ -Wno-ignored-attributes -DTEST_L0_SUPPORTED_VK_FORMAT %} +// RUN: %{build} %link-vulkan -o %t.out %if target-spir %{ -Wno-ignored-attributes -DTEST_L0_SUPPORTED_VK_FORMAT %} // RUN: %{run} env NEOReadDebugKeys=1 UseBindlessMode=1 UseExternalAllocatorForSshAndDsh=1 %t.out // Uncomment to print additional test information diff --git a/sycl/test-e2e/syclcompat/atomic/atomic_class.cpp b/sycl/test-e2e/syclcompat/atomic/atomic_class.cpp index 123f5a2c73dbd..f43c60d8a3589 100644 --- a/sycl/test-e2e/syclcompat/atomic/atomic_class.cpp +++ b/sycl/test-e2e/syclcompat/atomic/atomic_class.cpp @@ -32,7 +32,7 @@ // UNSUPPORTED: hip || (windows && level_zero) -// RUN: %{build} %if any-device-is-cuda %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_70 %} -o %t.out +// RUN: %{build} %if target-nvidia %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_70 %} -o %t.out // RUN: %{run} %t.out #include diff --git a/sycl/test-e2e/syclcompat/atomic/atomic_memory_acq_rel.cpp b/sycl/test-e2e/syclcompat/atomic/atomic_memory_acq_rel.cpp index 609652a58b17d..b3c48d0867b9f 100644 --- a/sycl/test-e2e/syclcompat/atomic/atomic_memory_acq_rel.cpp +++ b/sycl/test-e2e/syclcompat/atomic/atomic_memory_acq_rel.cpp @@ -32,7 +32,7 @@ // UNSUPPORTED: hip -// RUN: %{build} %if any-device-is-cuda %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_70 %} -o %t.out +// RUN: %{build} %if target-nvidia %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_70 %} -o %t.out // RUN: %{run} %t.out #include diff --git a/sycl/test-e2e/syclcompat/math/math_byte_dot_product.cpp b/sycl/test-e2e/syclcompat/math/math_byte_dot_product.cpp index 41421ee2b9d85..a53408157ecf6 100644 --- a/sycl/test-e2e/syclcompat/math/math_byte_dot_product.cpp +++ b/sycl/test-e2e/syclcompat/math/math_byte_dot_product.cpp @@ -29,7 +29,7 @@ // // ===---------------------------------------------------------------------===// -// RUN: %{build} %if any-device-is-cuda %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_61 %} -o %t.out +// RUN: %{build} %if target-nvidia %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_61 %} -o %t.out // RUN: %{run} %t.out #include From 6ae617d30a87bd79fb103da11ba831b972ed528f Mon Sep 17 00:00:00 2001 From: "Garcia Orozco, David" Date: Wed, 5 Feb 2025 06:19:41 -0800 Subject: [PATCH 2/3] Restore changes to NonUniformGroups tests --- sycl/test-e2e/NonUniformGroups/ballot_group.cpp | 2 +- sycl/test-e2e/NonUniformGroups/ballot_group_algorithms.cpp | 2 +- sycl/test-e2e/NonUniformGroups/fixed_size_group.cpp | 2 +- sycl/test-e2e/NonUniformGroups/fixed_size_group_algorithms.cpp | 2 +- sycl/test-e2e/NonUniformGroups/opportunistic_group.cpp | 2 +- .../NonUniformGroups/opportunistic_group_algorithms.cpp | 2 +- sycl/test-e2e/NonUniformGroups/tangle_group.cpp | 2 +- sycl/test-e2e/NonUniformGroups/tangle_group_algorithms.cpp | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sycl/test-e2e/NonUniformGroups/ballot_group.cpp b/sycl/test-e2e/NonUniformGroups/ballot_group.cpp index 8401ad5dbc8aa..1532c54879ecc 100644 --- a/sycl/test-e2e/NonUniformGroups/ballot_group.cpp +++ b/sycl/test-e2e/NonUniformGroups/ballot_group.cpp @@ -1,7 +1,7 @@ // RUN: %{build} -o %t.out // RUN: %{run} %t.out // -// RUN: %if opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s %} +// RUN: %if any-device-is-cpu && opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s %} // RUN: %if cpu %{ %{run} %t.x86.out %} // // REQUIRES: build-and-run-mode diff --git a/sycl/test-e2e/NonUniformGroups/ballot_group_algorithms.cpp b/sycl/test-e2e/NonUniformGroups/ballot_group_algorithms.cpp index 61a93910c2479..da9154ae602d0 100644 --- a/sycl/test-e2e/NonUniformGroups/ballot_group_algorithms.cpp +++ b/sycl/test-e2e/NonUniformGroups/ballot_group_algorithms.cpp @@ -1,7 +1,7 @@ // RUN: %{build} -o %t.out // RUN: %{run} %t.out // -// RUN: %if opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s %} +// RUN: %if any-device-is-cpu && opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s %} // RUN: %if cpu %{ %{run} %t.x86.out %} // // REQUIRES: build-and-run-mode diff --git a/sycl/test-e2e/NonUniformGroups/fixed_size_group.cpp b/sycl/test-e2e/NonUniformGroups/fixed_size_group.cpp index dceb636728eb0..5d2b98b58ddc2 100644 --- a/sycl/test-e2e/NonUniformGroups/fixed_size_group.cpp +++ b/sycl/test-e2e/NonUniformGroups/fixed_size_group.cpp @@ -1,7 +1,7 @@ // RUN: %{build} -o %t.out // RUN: %{run} %t.out // -// RUN: %if opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s %} +// RUN: %if any-device-is-cpu && opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s %} // RUN: %if cpu %{ %{run} %t.x86.out %} // // REQUIRES: build-and-run-mode diff --git a/sycl/test-e2e/NonUniformGroups/fixed_size_group_algorithms.cpp b/sycl/test-e2e/NonUniformGroups/fixed_size_group_algorithms.cpp index 706a3523d3bf6..07898d0146fb9 100644 --- a/sycl/test-e2e/NonUniformGroups/fixed_size_group_algorithms.cpp +++ b/sycl/test-e2e/NonUniformGroups/fixed_size_group_algorithms.cpp @@ -1,7 +1,7 @@ // RUN: %{build} -fsycl-device-code-split=per_kernel -o %t.out // RUN: %{run} %t.out // -// RUN: %if opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -fsycl-device-code-split=per_kernel -o %t.x86.out %s %} +// RUN: %if any-device-is-cpu && opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -fsycl-device-code-split=per_kernel -o %t.x86.out %s %} // RUN: %if cpu %{ %{run} %t.x86.out %} // // REQUIRES: build-and-run-mode diff --git a/sycl/test-e2e/NonUniformGroups/opportunistic_group.cpp b/sycl/test-e2e/NonUniformGroups/opportunistic_group.cpp index a35c8f3d9a8fd..2069113c3f939 100644 --- a/sycl/test-e2e/NonUniformGroups/opportunistic_group.cpp +++ b/sycl/test-e2e/NonUniformGroups/opportunistic_group.cpp @@ -1,7 +1,7 @@ // RUN: %{build} -o %t.out // RUN: %{run} %t.out // -// RUN: %if opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s %} +// RUN: %if any-device-is-cpu && opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s %} // RUN: %if cpu %{ %{run} %t.x86.out %} // // REQUIRES: build-and-run-mode diff --git a/sycl/test-e2e/NonUniformGroups/opportunistic_group_algorithms.cpp b/sycl/test-e2e/NonUniformGroups/opportunistic_group_algorithms.cpp index cdb56b3943978..8e7626650e01c 100644 --- a/sycl/test-e2e/NonUniformGroups/opportunistic_group_algorithms.cpp +++ b/sycl/test-e2e/NonUniformGroups/opportunistic_group_algorithms.cpp @@ -1,7 +1,7 @@ // RUN: %{build} -o %t.out // RUN: %{run} %t.out // -// RUN: %if opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s %} +// RUN: %if any-device-is-cpu && opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s %} // RUN: %if cpu %{ %{run} %t.x86.out %} // // REQUIRES: build-and-run-mode diff --git a/sycl/test-e2e/NonUniformGroups/tangle_group.cpp b/sycl/test-e2e/NonUniformGroups/tangle_group.cpp index 869d26af26b8f..686d1b34c6185 100644 --- a/sycl/test-e2e/NonUniformGroups/tangle_group.cpp +++ b/sycl/test-e2e/NonUniformGroups/tangle_group.cpp @@ -1,7 +1,7 @@ // RUN: %{build} -fno-sycl-early-optimizations -o %t.out // RUN: %{run} %t.out // -// RUN: %if opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -fno-sycl-early-optimizations -o %t.x86.out %s %} +// RUN: %if any-device-is-cpu && opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -fno-sycl-early-optimizations -o %t.x86.out %s %} // RUN: %if cpu %{ %{run} %t.x86.out %} // // REQUIRES: build-and-run-mode diff --git a/sycl/test-e2e/NonUniformGroups/tangle_group_algorithms.cpp b/sycl/test-e2e/NonUniformGroups/tangle_group_algorithms.cpp index 35626bb927f62..51070ed1731e4 100644 --- a/sycl/test-e2e/NonUniformGroups/tangle_group_algorithms.cpp +++ b/sycl/test-e2e/NonUniformGroups/tangle_group_algorithms.cpp @@ -1,7 +1,7 @@ // RUN: %{build} -fno-sycl-early-optimizations -o %t.out // RUN: %{run} %t.out // -// RUN: %if opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -fno-sycl-early-optimizations -o %t.x86.out %s %} +// RUN: %if any-device-is-cpu && opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -fno-sycl-early-optimizations -o %t.x86.out %s %} // RUN: %if cpu %{ %{run} %t.x86.out %} // // REQUIRES: build-and-run-mode From 8758e76dab9239002d4c567871264002994d2fac Mon Sep 17 00:00:00 2001 From: "Garcia Orozco, David" Date: Fri, 7 Feb 2025 09:53:15 -0800 Subject: [PATCH 3/3] Fix two run lines when building for multiple triples --- sycl/test-e2e/DeviceLib/cmath_test.cpp | 2 +- sycl/test-e2e/USM/P2P/p2p_atomics.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sycl/test-e2e/DeviceLib/cmath_test.cpp b/sycl/test-e2e/DeviceLib/cmath_test.cpp index 8c16c589bff3e..86fdb3e7c87ab 100644 --- a/sycl/test-e2e/DeviceLib/cmath_test.cpp +++ b/sycl/test-e2e/DeviceLib/cmath_test.cpp @@ -7,7 +7,7 @@ // RUN: %if !gpu %{ %{run} %t2.out %} // // // Check that --fast-math works with cmath funcs for CUDA -// RUN: %if target-nvidia %{ %{build} -Wno-nan-infinity-disabled -fno-builtin %{mathflags} -o %t3.out -ffast-math -DSYCL_E2E_FASTMATH %} +// RUN: %if target-nvidia %{ %clangxx -fsycl -fsycl-targets=nvptx64-nvidia-cuda %s -Wno-nan-infinity-disabled -fno-builtin %{mathflags} -o %t3.out -ffast-math -DSYCL_E2E_FASTMATH %} // RUN: %if cuda %{ %{run} %t3.out %} #include "math_utils.hpp" diff --git a/sycl/test-e2e/USM/P2P/p2p_atomics.cpp b/sycl/test-e2e/USM/P2P/p2p_atomics.cpp index 06ce3efc2ed88..1feb4c4b01163 100644 --- a/sycl/test-e2e/USM/P2P/p2p_atomics.cpp +++ b/sycl/test-e2e/USM/P2P/p2p_atomics.cpp @@ -1,5 +1,5 @@ // REQUIRES: cuda || hip || level_zero -// RUN: %{build} %if target-nvidia %{ -Xsycl-target-backend --cuda-gpu-arch=sm_61 %} -o %t.out +// RUN: %{build} %if target-nvidia %{ -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_61 %} -o %t.out // RUN: %{run} %t.out #include