Commit Graph

6 Commits

Author SHA1 Message Date
Sven van Haastregt
a8b32b2720 math_brute_force: remove LogBuildError (#2233)
`LogBuildError` was only ever called after `clSetKernelArg`, but setting
a kernel argument has no impact on the program build log. Printing of
the actual build log in case of a build failure is already handled via
`create_single_kernel_helper`.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2025-02-06 10:43:00 -08:00
Sven van Haastregt
dd2454685b [NFC] math_brute_force: use getAllowedUlpError for half (#2086)
Call `getAllowedUlpError` to obtain the allowed ULP error for all of the
half type (fp16) tests. The aim is to standardise obtaining the desired
ULP requirement and pave the way for adding the Embedded Profile ULP
errors.

Contributes to https://github.com/KhronosGroup/OpenCL-CTS/issues/867
Contributes to https://github.com/KhronosGroup/OpenCL-CTS/issues/1685

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2024-10-29 09:37:51 -07:00
Sreelakshmi Haridas Maruthur
7d86714c10 bruteforce: Fix retry logic for cases with subnormals (#2091)
Replace the occurrences of 0.0f == test' with 0.0f == HTF(test)'. The
types of 0.0f and test are not the same, so the equality comparison will
get undesired result when the test represents a -0.0h (i.e., test is
32768=0x8000). In this situation, 0.0f == test will be false, but 0.0f
== HTF(test) will be true.

Revise each if-statement to match the OpenCL s7.5.3 Item 4, specifically
modify to check that the result is subnormal instead of checking that it
is zero. "If the result of 3. is a sub-normal before rounding, the
result may be flushed to zero"

Co-authored-by: tnimburk <tnimburk@qti.qualcomm.com>
2024-10-08 09:53:55 -07:00
Haonan Yang
a7162188d6 [NFC] Use std::vector to store large size array. (#2060)
windows default stack size is 1M, BUFFER_SIZE is 2 * 1024 * 1024, use
array with BUFFER_SIZE elemets on stack can exceed available stack size
limits.
2024-08-29 14:45:40 +02:00
Sven van Haastregt
5be093e0c8 math_brute_force: skip all enqueues in -l mode (#1993)
The math_brute_force test has a link-check-only mode to quickly test if
all math functions are present.

In link-check-only mode, most tests return immediately after kernel
compilation, but some tests also run the kernel and read back the result
data before returning. Running the kernels takes a lot more time,
defeating the purpose of the `-l` mode.

Break out at the start of the main `for` loops in link-check-only mode
instead of returning directly, so that each test can still log its
trailing message (in most cases just a `\n`).

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2024-08-06 09:26:38 -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