Skip to content

Commit 25e86bd

Browse files
[SYCL][E2E test] Add -fno-fast-math to math tests that relies on it (#9135)
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
1 parent d7a5ec0 commit 25e86bd

File tree

8 files changed

+25
-9
lines changed

8 files changed

+25
-9
lines changed

sycl/test-e2e/Basic/built-ins/marray_math.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
// DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%}
2+
13
// TODO: Re-enable this test on Windows after fixing the following issue:
24
// https://github.com/intel/llvm/issues/8975
35
// UNSUPPORTED: windows
4-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
6+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %{mathflags} %s -o %t.out
57
// RUN: %CPU_RUN_PLACEHOLDER %t.out
68
// RUN: %GPU_RUN_PLACEHOLDER %t.out
79
// RUN: %ACC_RUN_PLACEHOLDER %t.out

sycl/test-e2e/Complex/sycl_complex_math_test.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -fsycl-device-code-split=per_kernel %s -o %t.out
1+
// DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%}
2+
3+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -fsycl-device-code-split=per_kernel %{mathflags} %s -o %t.out
24
// RUN: %CPU_RUN_PLACEHOLDER %t.out
35
// RUN: %GPU_RUN_PLACEHOLDER %t.out
46
// RUN: %ACC_RUN_PLACEHOLDER %t.out

sycl/test-e2e/Complex/sycl_complex_pow_test.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -fsycl-device-code-split=per_kernel %s -o %t.out
1+
// DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%}
2+
3+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -fsycl-device-code-split=per_kernel %{mathflags} %s -o %t.out
24
// RUN: %CPU_RUN_PLACEHOLDER %t.out
35
// RUN: %GPU_RUN_PLACEHOLDER %t.out
46
// RUN: %ACC_RUN_PLACEHOLDER %t.out

sycl/test-e2e/DeviceLib/built-ins/ftz-flag.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -Xclang -fdenormal-fp-math-f32="preserve-sign,preserve-sign" %s -o %t.out
1+
// DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%}
2+
3+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -Xclang -fdenormal-fp-math-f32="preserve-sign,preserve-sign" %s -o %t.out %{mathflags}
24
// RUN: %CPU_RUN_PLACEHOLDER %t.out
35
// RUN: %GPU_RUN_PLACEHOLDER %t.out
46
// RUN: %ACC_RUN_PLACEHOLDER %t.out

sycl/test-e2e/DeviceLib/built-ins/scalar_math.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
1+
// DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%}
2+
3+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %{mathflags} %s -o %t.out
24
// RUN: %CPU_RUN_PLACEHOLDER %t.out
35
// RUN: %GPU_RUN_PLACEHOLDER %t.out
46
// RUN: %ACC_RUN_PLACEHOLDER %t.out

sycl/test-e2e/DeviceLib/cmath_test.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
// DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%}
2+
13
// UNSUPPORTED: hip
2-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -fno-builtin %s -o %t.out
4+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -fno-builtin %{mathflags} %s -o %t.out
35
// RUN: %CPU_RUN_PLACEHOLDER %t.out
46
// RUN: %GPU_RUN_PLACEHOLDER %t.out
57
// RUN: %ACC_RUN_PLACEHOLDER %t.out
68

7-
// RUN: %clangxx -fsycl -fno-builtin -fsycl-device-lib-jit-link %s -o %t.out
9+
// RUN: %clangxx -fsycl -fno-builtin -fsycl-device-lib-jit-link %{mathflags} %s -o %t.out
810
// RUN: %CPU_RUN_PLACEHOLDER %t.out
911
// RUN: %ACC_RUN_PLACEHOLDER %t.out
1012

sycl/test-e2e/DeviceLib/imf_fp16_trivial_test.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
// RUN: %clangxx -fsycl %s -o %t.out
1+
// DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%}
2+
3+
// RUN: %clangxx -fsycl %{mathflags} %s -o %t.out
24
// RUN: %GPU_RUN_PLACEHOLDER %t.out
35

46
// UNSUPPORTED: cuda || hip

sycl/test-e2e/DeviceLib/math_test_marray_vec.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
// DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%}
2+
13
// TODO fix windows failures
24
// UNSUPPORTED: windows && (level_zero || opencl)
3-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
5+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %{mathflags} %s -o %t.out
46
// RUN: %GPU_RUN_PLACEHOLDER %t.out
57
// RUN: %CPU_RUN_PLACEHOLDER %t.out
68
// RUN: %ACC_RUN_PLACEHOLDER %t.out

0 commit comments

Comments
 (0)