Skip to content

Commit 931203f

Browse files
authored
[ESIMD][E2E] Fix error in ext_math_fast test on emulator (#9472)
The test gave different results for data computed inside parallel_for because of SLP vectorizer. It was turned off as SLP vectorization on host was not the purpose of this test. Signed-off-by: Vyacheslav N Klochkov <[email protected]>
1 parent c7759bb commit 931203f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

sycl/test-e2e/ESIMD/ext_math_fast.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,19 @@
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
8-
// RUN: %{build} -fsycl-device-code-split=per_kernel -ffast-math -o %t.out
8+
// RUN: %{build} -fsycl-device-code-split=per_kernel -ffast-math -fno-slp-vectorize -o %t.out
99
// RUN: %{run} %t.out
1010

1111
// This test checks extended math operations. Combinations of
1212
// - argument type - half, float
1313
// - math function - sin, cos, ..., div_ieee, pow
1414
// - SYCL vs ESIMD APIs
1515

16+
// This version of the test checks -ffast-math option which may cause code-gen
17+
// of different-precision variants of math functions.
18+
// The option -fno-slp-vectorize prevents vectorization of code in kernel
19+
// operator() to avoid the extra difficulties in results verification.
20+
1621
#define TEST_FAST_MATH 1
1722

1823
#include "ext_math.cpp"

0 commit comments

Comments
 (0)