Commit Graph

21 Commits

Author SHA1 Message Date
Sreelakshmi Haridas Maruthur
32361e1d89 bruteforce: Check both input values for nan (#2270) 2025-02-18 20:51:36 -08:00
Marcin Hajder
bcfa1f7c26 Added corrections to re-enable reciprocal test in math_brute_force suite for relaxed math mode (#2221)
fixes #2145

As suggested by @svenvh reciprocal has different precision requirements
than divide. This PR introduces special path for reciprocal for
binar_float_operator to test reciprocal with relaxed math. If this PR
will get approvals, invalidate PR #2162
2025-02-04 08:45:20 -08:00
Qichao Gu
ccd455040a Enable building OpenCL-CTS with Intel DPC++/C++ compiler ICX on Windows (#2088)
Currently Intel® C++ Compiler Classic (ICC) is supported to build
OpenCL-CTS on Windows. This compiler has been discontinued since the
second half of 2023. Instead, Intel recommends that users transition to
use the LLVM-based Intel® oneAPI DPC++/C++ Compiler (ICX).
This change is to enable users to build OpenCL-CTS with ICX on Windows.
2024-11-05 08:52:16 -08:00
Grzegorz Wawiorko
97cf4c7e25 Math bruteforce test - enable erf/erfc functions (#1289)
It was disabled because lack of reference implementation. However the
reference implementation exists. Then no reason to start testing these
functions.
2024-10-01 09:25:45 -07:00
Harald van Dijk
80a02cbd48 Disable implicit conversion of copysign arguments. (#1970)
In binary_float.cpp, copysign is special cased. All the reference
functions there take double arguments, except for reference_copysign
which takes float. This commit copies that approach to special case
copysign in binary_double.cpp as well: all the reference functions there
take long double arguments, but this commit changes reference_copysignl
to take double. The rationale for this in binary_float applies equally
to binary_double: conversions of NAN are not required to preserve its
sign bit. On architectures where conversion of NAN resets the sign bit,
copysign fp64 would return incorrect reference results.
2024-06-25 09:42:58 -07:00
Sven van Haastregt
b6941b6c61 Add fp16 testing to conversions and bruteforce (#1975)
Merge the `fp16-staging` branch into `main`, adding fp16 (`half`)
testing to the conversions and math bruteforce tests.

---------

Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
Signed-off-by: Guo, Yilong <yilong.guo@intel.com>
Signed-off-by: John Kesapides <john.kesapides@arm.com>
Co-authored-by: Marcin Hajder <marcin.hajder@gmail.com>
Co-authored-by: Ewan Crawford <ewan@codeplay.com>
Co-authored-by: Wawiorko, Grzegorz <grzegorz.wawiorko@intel.com>
Co-authored-by: Sreelakshmi Haridas Maruthur <sharidas@quicinc.com>
Co-authored-by: Harald van Dijk <harald@gigawatt.nl>
Co-authored-by: Ben Ashbaugh <ben.ashbaugh@intel.com>
Co-authored-by: Haonan Yang <haonan.yang@intel.com>
Co-authored-by: Ahmed Hesham <117350656+ahesham-arm@users.noreply.github.com>
Co-authored-by: niranjanjoshi121 <43807392+niranjanjoshi121@users.noreply.github.com>
Co-authored-by: Wenwan Xing <wenwan.xing@intel.com>
Co-authored-by: Yilong Guo <yilong.guo@intel.com>
Co-authored-by: Romaric Jodin <89833130+rjodinchr@users.noreply.github.com>
Co-authored-by: joshqti <127994991+joshqti@users.noreply.github.com>
Co-authored-by: Pekka Jääskeläinen <pekka.jaaskelainen@tuni.fi>
Co-authored-by: imilenkovic00 <155085410+imilenkovic00@users.noreply.github.com>
Co-authored-by: John Kesapides <46718829+JohnKesapidesARM@users.noreply.github.com>
Co-authored-by: Aharon Abramson <aharon.abramson@mobileye.com>
2024-06-18 09:43:11 -07:00
Sven van Haastregt
a87e686757 Fix more warnings in math_brute_force (#1502)
* Fix "‘nadj’ may be used uninitialized in this function
   [-Werror=maybe-uninitialized]".

 * Fix "specified bound 4096 equals destination size
   [-Werror=stringop-truncation]".

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2022-09-16 13:34:36 +01:00
Sven van Haastregt
6554c49018 [NFCI] Remove unused variables and enable -Wunused-variable (#1483)
Remove unused variables throughout the code base and enable the
`-Wunused-variable` warning flag globally to prevent new unused
variable issues being introduced in the future.

This is mostly a non-functional change, with one exception:

 - In `test_conformance/api/test_kernel_arg_info.cpp`, an error check
   of the clGetDeviceInfo return value was added.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2022-09-08 12:54:36 +01:00
Sven van Haastregt
d647529fec [NFC] Fix missing double_double.lo initializer (#1466)
Fixes a missing-field-initializers warning.  The original intent was
most likely to initialize both fields (similar to other functions in
this file), but a `,` was missed.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2022-08-16 14:42:33 +01:00
Jim Lewis
3c4a1a3ce6 Fix build error for linux with clang-8 (#1304)
-Wabsolute-value warning reported as error (long double truncated to
double)
2022-03-02 18:31:14 +00:00
Marco Antognini
17a0d09567 Cleanup usage of static, extern and typedef (#1256)
* Cleanup usage of static, extern and typedef

Remove static on functions defined headers, as it can result in
duplication in binaries.

Remove unnecessary extern keyword on a function declaration, as it is
the default behavior and can be puzzling when reading the code.

Remove the unused declaration of my_ilogb, which is never defined.

Remove unnecessary usage of typedef, as they are only increasing the
cognitive load of the code for no purpose.

Signed-off-by: Marco Antognini <marco.antognini@arm.com>

* Improve usage of inline and static in harness

Functions declared in header as static can trigger unused warnings when
(indirectly) included in translation units that do not use such
functions. Use inline instead, which also avoids duplicating symbols in
binaries.

Signed-off-by: Marco Antognini <marco.antognini@arm.com>
2021-05-18 18:09:46 +01:00
Marco Antognini
5daca107ad Remove dead variables and functions (#1238)
These were identified using Clang's -Wunused warning flag.

Signed-off-by: Marco Antognini <marco.antognini@arm.com>
2021-05-07 09:28:38 +01:00
Marco Antognini
e2fb655e4c Use C++ headers instead of C headers (#1179)
Remove some unnecessary includes.

Signed-off-by: Marco Antognini <marco.antognini@arm.com>
2021-03-05 14:24:03 +00:00
Marco Antognini
70b2492f30 Regroup vtbl definitions to one translation unit (#1167)
Move function declarations to a new header file, with relevant existing
documentation.

Signed-off-by: Marco Antognini <marco.antognini@arm.com>
2021-02-18 10:06:37 +00:00
Marco Antognini
7181bcdbac Rename files for consistency (#1166)
Signed-off-by: Marco Antognini <marco.antognini@arm.com>
2021-02-17 17:05:09 +00:00
Marco Antognini
be93630330 Remove dead code in math_brute_force (#1117)
* Remove dead code

Signed-off-by: Marco Antognini <marco.antognini@arm.com>

* Remove tautological statements

PARALLEL_REFERENCE is unconditionally defined. Remove preprocessor
condition that always hold.

Signed-off-by: Marco Antognini <marco.antognini@arm.com>

* Remove unnecessary declarations

Also removed unused macro.

Signed-off-by: Marco Antognini <marco.antognini@arm.com>

* Format code

An unnecessary scope was removed. This formats the code using
clang-format.

Signed-off-by: Marco Antognini <marco.antognini@arm.com>
2021-01-20 15:01:59 +00:00
Marco Antognini
e5f89249fa Apply clang-format on math_brute_force (#1104)
Signed-off-by: Marco Antognini <marco.antognini@arm.com>
2021-01-14 13:27:18 +00:00
alan-baker
b7adaa5c3b Add more relaxed math conformance tests (#1079)
* Add relaxed tests for functions (in an implementation that uses
  derived functions) that define an absolute ULP error requirement, but
  were not tested in the current conformance suite
  * acos
  * asin
  * atan
  * cospi
  * sinpi
  * log10
2020-12-09 16:12:19 +00:00
Grzegorz Wawiorko
519f658b51 Test bruteforce - fix islessgreater function for intel compiler (#811) 2020-06-04 10:44:19 +01:00
James Price
944b0a8178 Enable -Werror for GCC/Clang builds (#786)
* Enable -Werror for GCC/Clang builds

Fixes many of the errors this produces, and disables a handful that
didn't have solutions that were obvious (to me).

* Check for `-W*` flags empirically

* Remove cl_APPLE_fp64_basic_ops support

* Undo NAN conversion fix

* Add comments to warning override flags

* Remove unneeded STRINGIFY definition

* Fix tautological compare issue in basic

* Use ABS_ERROR macro in image tests

* Use fabs for ABS_ERROR macro

* Move ABS_ERROR definition to common header
2020-05-27 19:13:11 +01:00
James Price
40f50d77a3 Rename test .c sources to .cpp where necessary (#604)
Remove hacks to force language from CMake files.

Closes KhronosGroup/OpenCL-CTS#25
2020-02-21 17:34:31 +00:00