Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 6585ac7

Browse files
authored
[ESIMD] Separate ieee sqrt/div functions from ext_math.cpp test (#1398)
* [ESIMD] Separate ieee sqrt/div functions from ext_math.cpp test This patch: - separates the ieee_sqrt() and ieee_div() test cases to a new test, which is not started on Gen12 because it doesn't support those operations even for fp32. - enables ext_math.cpp on Windows. Signed-off-by: Vyacheslav N Klochkov <[email protected]>
1 parent c37ee22 commit 6585ac7

File tree

2 files changed

+25
-9
lines changed

2 files changed

+25
-9
lines changed

SYCL/ESIMD/ext_math.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
// - math function - sin, cos, ..., div_ieee, pow
1616
// - SYCL vs ESIMD APIs
1717

18-
// Temporarily disable while the failure is being investigated.
19-
// UNSUPPORTED: windows
20-
2118
#include "esimd_test_utils.hpp"
2219

2320
#include <sycl/builtins_esimd.hpp>
@@ -468,6 +465,14 @@ int main(void) {
468465
std::cout << "Running on " << Dev.get_info<sycl::info::device::name>()
469466
<< "\n";
470467
bool Pass = true;
468+
#ifdef TEST_IEEE_DIV_REM
469+
Pass &= testESIMDSqrtIEEE<float, 16>(Q);
470+
Pass &= testESIMDDivIEEE<float, 8>(Q);
471+
if (Dev.has(sycl::aspect::fp64)) {
472+
Pass &= testESIMDSqrtIEEE<double, 32>(Q);
473+
Pass &= testESIMDDivIEEE<double, 32>(Q);
474+
}
475+
#else // !TEST_IEEE_DIV_REM
471476
Pass &= testESIMD<half, 8>(Q);
472477
Pass &= testESIMD<float, 16>(Q);
473478
Pass &= testESIMD<float, 32>(Q);
@@ -476,14 +481,9 @@ int main(void) {
476481
Pass &= testSYCL<float, 8>(Q);
477482
Pass &= testSYCL<float, 32>(Q);
478483
}
479-
Pass &= testESIMDSqrtIEEE<float, 16>(Q);
480-
if (Dev.has(sycl::aspect::fp64)) {
481-
Pass &= testESIMDSqrtIEEE<double, 32>(Q);
482-
Pass &= testESIMDDivIEEE<double, 32>(Q);
483-
}
484-
Pass &= testESIMDDivIEEE<float, 8>(Q);
485484
Pass &= testESIMDPow<float, 8>(Q);
486485
Pass &= testESIMDPow<half, 32>(Q);
486+
#endif // !TEST_IEEE_DIV_REM
487487
std::cout << (Pass ? "Test Passed\n" : "Test FAILED\n");
488488
return Pass ? 0 : 1;
489489
}

SYCL/ESIMD/ext_math_ieee_sqrt_div.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//==-- ext_math_ieee_qsrt_div.cpp - DPC++ ESIMD ieee sqrt/div test -------==//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
// REQUIRES: gpu-intel-gen9 || gpu-intel-dg2 || gpu-intel-pvc || esimd_emulator
9+
10+
// RUN: %clangxx -fsycl-device-code-split=per_kernel -fsycl %s -o %t.out
11+
// RUN: %GPU_RUN_PLACEHOLDER %t.out
12+
13+
// This test checks ieee_sqrt() and ieee_sqrt() with float and double types.
14+
15+
#define TEST_IEEE_DIV_REM 1
16+
#include "ext_math.cpp"

0 commit comments

Comments
 (0)