Commit Graph

27 Commits

Author SHA1 Message Date
Ahmed Hesham
baed156699 Migrate the select suite to the new test registration framework (#2198)
Contirbutes to #2181

Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
2024-12-18 20:29:16 +00:00
Steven Winston
43d6886810 rewrite test_select to run in a few seconds. (#1665)
* rewrite test_select to run in a few seconds.

* removing the threading; reverting to the original method.

* Merge from Master, remove all suggested changes and start with a simple change report on each change's cost savings:
 BEFORE:
        real    47m8.497s
        user    48m8.860s
        sys     0m14.952s
AFTER:
        real    17m53.383s
        user    18m53.342s
        sys     0m13.297s

initSrcBuffer generates the same random noise every iteration through the loop.  There is no change to the arguments, and the host data itself doesn't need to get rewritten.  Profiling realizes a 2 times speed accel from simply relying upon the buffer to remain randomized at the next loop iteration.

* BEFORE:
        real    17m53.383s
        user    18m53.342s
        sys     0m13.297s
AFTER:
real    12m26.035s
user    13m15.505s
sys     0m15.414s

rearrange a few things in the loops to allow for vectorized / interleaved loop traversal.  NB: not all loops are vectorizable obviously; but this addresses the worst offenders.  Also note, to enable compiler to generate vectorized and interleaved loop traversal build with -o3.

* address the CI format requirements.

* address the CI format requirements.

* address the CI format requirements.
2023-10-03 09:26:48 -07:00
Sven van Haastregt
b143a990d9 select: fix -Wformat warnings (#1817)
* Printing of a `size_t` requires the `%z` specifier.

 * Printing of `cl_long`/`cl_ulong` is now done using the `PRI*64`
   macros to ensure portability across 32 and 64-bit builds.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2023-09-22 07:10:44 -07:00
Sven van Haastregt
d7f24a7986 Fix more -Wsign-compare warnings (#1779)
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2023-09-14 11:00:30 +01:00
Marcin Hajder
60f025a7da Added cl_half support for test_select (#1617)
* Added cl_half support for test_select (issue #142, select)

* Added corrections due to code review + performance optimization + replaced C object with wrappers

* minor fix

* Corrected use of user event

* Removed unnecessary user event
2023-06-27 08:40:35 -07:00
Zhaoyu Zhang
38abfc7d24 select: using clEnqueueReadBuffer rather than clEnqueueMapBuffer (#1712)
* select: using clEnqueueReadBuffer rather than clEnqueueMapBuffer

* Update code to be compatible with clang-format

* update code again to be compatible with clang-format

* update code again to comply with clang-format

* updata code again to be compatible with clang-format

The clang-format tool is so weird, it's not even consistent between runs...
2023-05-30 08:54:32 -07:00
Sven van Haastregt
2318cedb21 select: Use MTdataHolder (#1609)
Simplify code by avoiding manual resource management.

This fixes use of an uninitialized `d` in the `free_mtdata` call, in
the case a `goto exit` was executed before initializing `d`.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2023-01-31 09:50:21 -08:00
Krzysztof Kosiński
180adef84c Remove __DATE__ and __TIME__ usage (#1506)
These macros make the build non-deterministic.
2022-09-23 17:29:18 +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
38639f229d Fix test_select verification failure reporting (#1462)
When verification of the computed result fails, the test would still
report as "passed".  This is because `s_test_fail` is only written to
and never read.

Fix the immediate issue by returning a failure value and incrementing
`gFailCount` if any error was detected.  The error handling can be
improved further, but I'm leaving that out of the scope of this fix.

Fixes https://github.com/KhronosGroup/OpenCL-CTS/issues/1445

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2022-08-04 15:05:10 +01:00
Jeremy Kemp
3615c4eea6 Use memcmp for select verification. (#1084)
* Use memcmp for select verification.

If memcmp fails, fall back to looping through the result buffer to find the incorrect result.

* Removed extra prints for check_int.
2020-12-23 17:05:38 -05:00
ellnor01
5ae5e7a1fa Remove imageSupportRequired parameter to runTestHarness (#1077)
* Tests requiring image support use runTestHarnessWithCheck

Removing special case for images in runTestHarness.

Fixes #710

* Remove imageSupportRequired argument

Tests which require image support now specify this while
calling runTestHarnessWithCheck.

Fixes #710

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
2020-12-09 16:12:40 +00:00
Pierre Moreau
c001dc2d9c Only include sys/sysctl.h on for Apple (#916)
glibc deprecated that header in version 2.30, and removed it in 2.32.
2020-08-27 18:31:51 +01:00
Stuart Brady
afa2fcca96 Simplify call to create_single_kernel_helper() in test_select (#900)
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
2020-08-19 19:16:48 +01:00
Kévin Petit
b2eba77d42 Get rid of test_finish macro and related ATF cruft (#633)
Closes #431

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-03-02 15:06:44 +00: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
Kévin Petit
88004077e3 select: don't forget to count tests when failing to create programs (#483)
A test writer really shouldn't have to think about this...

Signed-off-by: Kévin Petit <kpet@free.fr>
2019-11-15 13:13:30 +00:00
Kévin Petit
fa4b278432 Build the harness as a static library (#430)
This reduces by a factor of roughly two the number of files to build.

Fixes #193.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-08-07 17:18:10 +01:00
Stuart Brady
67655e6fe5 Fix parsing of offline compilation options in test_select (#429)
The local parsing of arguments in test_select.c throws away any unknown
arguments.  Pass these to parseCustomParam() before the local argument
parsing, so that the offline compilation options work as expected.

Fixes #327.

Signed-off-by: Stuart Brady <stuart.brady@arm.com>
2019-08-07 16:23:16 +01:00
Kevin Petit
ef832c330c Stop using ../../test_common to include common headers
Fixes #395.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-08-01 18:41:12 +01:00
Grzegorz Wawiorko
6c999818ee cl22: Improved CRC calculation (#133)
* Improved CRC calculation

* Improved CRC calculation - review fix

* Improved CRC calculation - build brake fix

* Improved CRC calculation - remove external initializaiton
2019-04-18 15:00:45 +01:00
Grzegorz Wawiorko
c1cd117265 Make wimpy factor argument parsing logic common (#155) 2019-04-11 12:10:45 +01:00
Radek Szymanski
07196c351a cl22: Use single array for function list (#148)
Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2019-04-10 12:30:38 +01:00
Radek Szymanski
39da344d34 cl22: Convert select to testHarness (#88)
Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2019-03-18 10:06:30 +00:00
Kevin Petit
b6446a2f1d Remove build systems other than CMake
Make it clear that CMake is the only supported build system.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-03-15 09:47:56 +00:00
Kevin Petit
95b040bec2 Synchronise with Khronos-private Gitlab branch
The maintenance of the conformance tests is moving to Github.

This commit contains all the changes that have been done in
Gitlab since the first public release of the conformance tests.

Signed-off-by: Kevin Petit kevin.petit@arm.com
2019-03-05 16:24:50 +00:00
Kedar Patil
2821bf1323 Initial open source release of OpenCL 2.2 CTS. 2017-05-16 18:44:33 +05:30