Skip to content

Commit efec956

Browse files
[SYCL][E2E] Add -fno-fast-math to tests that relies on it (#9419)
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
1 parent 5cf0f7c commit efec956

File tree

4 files changed

+19
-9
lines changed

4 files changed

+19
-9
lines changed

sycl/test-e2e/DeviceLib/cmath-aot.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
// REQUIRES: opencl-aot, cpu
22
// UNSUPPORTED: windows
33

4-
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 %S/cmath_test.cpp -o %t.cmath.out
4+
// DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%}
5+
6+
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 %{mathflags} %S/cmath_test.cpp -o %t.cmath.out
57
// RUN: %{run} %t.cmath.out
68

7-
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 %S/cmath_fp64_test.cpp -o %t.cmath.fp64.out
9+
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 %{mathflags} %S/cmath_fp64_test.cpp -o %t.cmath.fp64.out
810
// RUN: %{run} %t.cmath.fp64.out
911

10-
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 %S/std_complex_math_test.cpp -o %t.complex.out
12+
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 %{mathflags} %S/std_complex_math_test.cpp -o %t.complex.out
1113
// RUN: %{run} %t.complex.out
1214

13-
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 %S/std_complex_math_fp64_test.cpp -o %t.complex.fp64.out
15+
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 %{mathflags} %S/std_complex_math_fp64_test.cpp -o %t.complex.fp64.out
1416
// RUN: %{run} %t.complex.fp64.out

sycl/test-e2e/DeviceLib/cmath_fp64_test.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
// REQUIRES: aspect-fp64
22
// UNSUPPORTED: gpu
3-
// RUN: %{build} -o %t.out
3+
4+
// DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%}
5+
6+
// RUN: %{build} %{mathflags} -o %t.out
47
// RUN: %{run} %t.out
58

6-
// RUN: %{build} -fsycl-device-lib-jit-link -o %t.out
9+
// RUN: %{build} -fsycl-device-lib-jit-link %{mathflags} -o %t.out
710
// RUN: %{run} %t.out
811

912
#include "math_utils.hpp"

sycl/test-e2e/DeviceLib/math_fp64_test.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
// REQUIRES: aspect-fp64
22
// UNSUPPORTED: hip
3-
// RUN: %{build} -o %t.out
3+
4+
// DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%}
5+
6+
// RUN: %{build} %{mathflags} -o %t.out
47
// RUN: %{run} %t.out
58

6-
// RUN: %clangxx -fsycl -fsycl-device-lib-jit-link %s -o %t.out
9+
// RUN: %clangxx -fsycl -fsycl-device-lib-jit-link %{mathflags} %s -o %t.out
710
// RUN: %if !gpu %{ %{run} %t.out %}
811

912
#include "math_utils.hpp"

sycl/test-e2e/DeviceLib/math_test.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
// RUN: %{build} -o %t.out
33
// RUN: %{run} %t.out
44

5-
// RUN: %{build} -fsycl-device-lib-jit-link -o %t.out
5+
// DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%}
6+
7+
// RUN: %{build} -fsycl-device-lib-jit-link %{mathflags} -o %t.out
68
// RUN: %if !gpu %{ %{run} %t.out %}
79

810
#include "math_utils.hpp"

0 commit comments

Comments
 (0)