From 322a09df1ac2a24bcec2e11870bd39320297dce0 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Tue, 22 Oct 2024 08:18:51 -0700 Subject: [PATCH] [SYCL][ESIMD][E2E] Add driver requirement to sqrt tests Signed-off-by: Sarnie, Nick --- sycl/test-e2e/ESIMD/ext_math.cpp | 2 ++ sycl/test-e2e/ESIMD/ext_math_fast.cpp | 2 ++ sycl/test-e2e/ESIMD/ext_math_fast_pvc.cpp | 25 +++++++++++++++++++ .../test-e2e/ESIMD/ext_math_ieee_sqrt_div.cpp | 1 + sycl/test-e2e/ESIMD/ext_math_pvc.cpp | 20 +++++++++++++++ sycl/test-e2e/ESIMD/ext_math_saturate.cpp | 2 ++ sycl/test-e2e/ESIMD/ext_math_saturate_pvc.cpp | 21 ++++++++++++++++ 7 files changed, 73 insertions(+) create mode 100644 sycl/test-e2e/ESIMD/ext_math_fast_pvc.cpp create mode 100644 sycl/test-e2e/ESIMD/ext_math_pvc.cpp create mode 100644 sycl/test-e2e/ESIMD/ext_math_saturate_pvc.cpp diff --git a/sycl/test-e2e/ESIMD/ext_math.cpp b/sycl/test-e2e/ESIMD/ext_math.cpp index aa3cbd67ee7a4..ae750692b7372 100644 --- a/sycl/test-e2e/ESIMD/ext_math.cpp +++ b/sycl/test-e2e/ESIMD/ext_math.cpp @@ -10,6 +10,8 @@ // RUN: %{build} -fsycl-device-code-split=per_kernel %{mathflags} -o %t.out // RUN: %{run} %t.out +// UNSUPPORTED: arch-intel_gpu_pvc + // This test checks extended math operations. Combinations of // - argument type - half, float // - math function - sin, cos, ..., div_ieee, pow diff --git a/sycl/test-e2e/ESIMD/ext_math_fast.cpp b/sycl/test-e2e/ESIMD/ext_math_fast.cpp index 0ea2d65531c90..2e687f9534e91 100644 --- a/sycl/test-e2e/ESIMD/ext_math_fast.cpp +++ b/sycl/test-e2e/ESIMD/ext_math_fast.cpp @@ -9,6 +9,8 @@ // RUN: %{build} -fsycl-device-code-split=per_kernel -ffast-math %{slpflags} -o %t.out // RUN: %{run} %t.out +// UNSUPPORTED: arch-intel_gpu_pvc + // This test checks extended math operations. Combinations of // - argument type - half, float // - math function - sin, cos, ..., div_ieee, pow diff --git a/sycl/test-e2e/ESIMD/ext_math_fast_pvc.cpp b/sycl/test-e2e/ESIMD/ext_math_fast_pvc.cpp new file mode 100644 index 0000000000000..3f0b81931a45f --- /dev/null +++ b/sycl/test-e2e/ESIMD/ext_math_fast_pvc.cpp @@ -0,0 +1,25 @@ +//==----------- ext_math_fast.cpp - DPC++ ESIMD extended math test --------==// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// REQUIRES-INTEL-DRIVER: lin: 31294 +// DEFINE: %{slpflags} = %if cl_options %{/clang:-fno-slp-vectorize%} %else %{-fno-slp-vectorize%} +// RUN: %{build} -fsycl-device-code-split=per_kernel -ffast-math %{slpflags} -o %t.out +// RUN: %{run} %t.out + +// REQUIRES: arch-intel_gpu_pvc + +// This test checks extended math operations. Combinations of +// - argument type - half, float +// - math function - sin, cos, ..., div_ieee, pow +// - SYCL vs ESIMD APIs + +// This version of the test checks -ffast-math option which may cause code-gen +// of different-precision variants of math functions. +// The option -fno-slp-vectorize prevents vectorization of code in kernel +// operator() to avoid the extra difficulties in results verification. + +#include "ext_math_fast.cpp" diff --git a/sycl/test-e2e/ESIMD/ext_math_ieee_sqrt_div.cpp b/sycl/test-e2e/ESIMD/ext_math_ieee_sqrt_div.cpp index bc3033b49bc21..7aba22046a4c6 100644 --- a/sycl/test-e2e/ESIMD/ext_math_ieee_sqrt_div.cpp +++ b/sycl/test-e2e/ESIMD/ext_math_ieee_sqrt_div.cpp @@ -6,6 +6,7 @@ // //===----------------------------------------------------------------------===// // REQUIRES: arch-intel_gpu_pvc +// REQUIRES-INTEL-DRIVER: lin: 31294 // DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%} // RUN: %{build} -fsycl-device-code-split=per_kernel %{mathflags} -o %t.out diff --git a/sycl/test-e2e/ESIMD/ext_math_pvc.cpp b/sycl/test-e2e/ESIMD/ext_math_pvc.cpp new file mode 100644 index 0000000000000..0e31af8b24481 --- /dev/null +++ b/sycl/test-e2e/ESIMD/ext_math_pvc.cpp @@ -0,0 +1,20 @@ +//==--- ext_math_pvc.cpp - DPC++ ESIMD extended math test ---==// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// REQUIRES-INTEL-DRIVER: lin: 31294 +// DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%} +// RUN: %{build} -fsycl-device-code-split=per_kernel %{mathflags} -o %t.out +// RUN: %{run} %t.out + +// REQUIRES: arch-intel_gpu_pvc + +// This test checks extended math operations. Combinations of +// - argument type - half, float +// - math function - sin, cos, ..., div_ieee, pow +// - SYCL vs ESIMD APIs + +#include "ext_math.cpp" diff --git a/sycl/test-e2e/ESIMD/ext_math_saturate.cpp b/sycl/test-e2e/ESIMD/ext_math_saturate.cpp index 07090c22e11f6..9dcc45d21c17d 100644 --- a/sycl/test-e2e/ESIMD/ext_math_saturate.cpp +++ b/sycl/test-e2e/ESIMD/ext_math_saturate.cpp @@ -10,6 +10,8 @@ // RUN: %{build} -fsycl-device-code-split=per_kernel %{mathflags} -o %t.out // RUN: %{run} %t.out +// UNSUPPORTED: arch-intel_gpu_pvc + // This test checks extended math operations called with saturation. // Combinations of // - argument type - half, float diff --git a/sycl/test-e2e/ESIMD/ext_math_saturate_pvc.cpp b/sycl/test-e2e/ESIMD/ext_math_saturate_pvc.cpp new file mode 100644 index 0000000000000..d3d0da1abbb69 --- /dev/null +++ b/sycl/test-e2e/ESIMD/ext_math_saturate_pvc.cpp @@ -0,0 +1,21 @@ +//==---- ext_math_saturate_pvc.cpp - DPC++ ESIMD extended math test ----==// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// REQUIRES-INTEL-DRIVER: lin: 31294 +// DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%} +// RUN: %{build} -fsycl-device-code-split=per_kernel %{mathflags} -o %t.out +// RUN: %{run} %t.out + +// REQUIRES: arch-intel_gpu_pvc + +// This test checks extended math operations called with saturation. +// Combinations of +// - argument type - half, float +// - math function - sin, cos, ..., div_ieee, pow +// - SYCL vs ESIMD APIs + +#include "ext_math_saturate.cpp"