Skip to content

Commit fde72c6

Browse files
JackAKirkJackAKirk
andauthored
[SYCL][CUDA] Add no-fast-math to tests that rely on it. (#9889)
Same as #9419. This updates a few tests that were missed where the `fast-math` flag affects at least the cuda backend. These tests assume `no-fast-math` precision. --------- Signed-off-by: JackAKirk <[email protected]> Co-authored-by: JackAKirk <[email protected]>
1 parent 5d92897 commit fde72c6

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

sycl/test-e2e/BFloat16/bfloat16_builtins.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
// DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%}
12
// REQUIRES: aspect-ext_oneapi_bfloat16_math_functions
2-
// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %if any-device-is-cuda %{ -Xsycl-target-backend --cuda-gpu-arch=sm_80 %} %s -o %t.out
3+
// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %if any-device-is-cuda %{ -Xsycl-target-backend --cuda-gpu-arch=sm_80 %} %s -o %t.out %{mathflags}
34
// RUN: %{run} %t.out
45
// Currently the feature isn't supported on FPGA.
56
// UNSUPPORTED: accelerator

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %{build} -fsycl-device-code-split=per_kernel -o %t.out
1+
// DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%}
2+
// RUN: %{build} -fsycl-device-code-split=per_kernel -o %t.out %{mathflags}
23
// RUN: %{run} %t.out
34

45
#include <sycl/sycl.hpp>

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// FIXME unsupported on windows (opencl and level-zero) until fix of libdevice
22
// UNSUPPORTED: windows && (opencl || level_zero)
3-
// RUN: %{build} -o %t.out
3+
// DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%}
4+
// RUN: %{build} -o %t.out %{mathflags}
45
// RUN: %{run} %t.out
56

67
#include <sycl/sycl.hpp>

0 commit comments

Comments
 (0)