36 Commits

Author SHA1 Message Date
vangthao95
2174715160 Fix incompatiable pointer type warning for device_execution test (#2558)
There are multiple incompatiable pointer types warnings when compiling
the device_execution test with clang. There was an upstream llvm patch
that will turn these warnings into an error
https://github.com/llvm/llvm-project/pull/157364.

To not encounter this issue in the future, fix these warnings by
changing the parameter types.

```
warning: incompatible pointer types passing '__global ulong (*)[512]' (aka '__global unsigned long (*)[512]') to parameter of type 'const __generic ulong *' (aka 'const __generic unsigned long *') [-Wincompatible-pointer-types]
   37 |         void (^checkBlock) (void) = ^{ check_res(tid, &value, res); };
      |                                                       ^~~~~~
note: passing argument to parameter 'value' here
--
warning: incompatible pointer types passing '__global int *const __private' to parameter of type '__global atomic_uint *' (aka '__global _Atomic(unsigned int) *') [-Wincompatible-pointer-types]
   10 |   void (^kernelBlock)(void) = ^{ block_fn(len, val); };
      |                                                ^~~
note: passing argument to parameter 'val' here
--
warning: incompatible pointer types passing '__global int *const __private' to parameter of type '__global atomic_uint *' (aka '__global _Atomic(unsigned int) *') [-Wincompatible-pointer-types]
   10 |   void (^kernelBlock)(void) = ^{ block_fn(len, val); };
      |                                                ^~~
note: passing argument to parameter 'val' here
--
warning: incompatible pointer types passing '__global int *const __private' to parameter of type '__global atomic_uint *' (aka '__global _Atomic(unsigned int) *') [-Wincompatible-pointer-types]
   10 |   void (^kernelBlock)(void) = ^{ block_fn(len, val); };
      |                                                ^~~
note: passing argument to parameter 'val' here
--
warning: incompatible pointer types passing '__global int *const __private' to parameter of type '__global atomic_uint *' (aka '__global _Atomic(unsigned int) *') [-Wincompatible-pointer-types]
   10 |   void (^kernelBlock)(void) = ^{ block_fn(len, val); };
      |                                                ^~~
note: passing argument to parameter 'val' here
--
warning: incompatible pointer types passing '__global int *const __private' to parameter of type '__global atomic_uint *' (aka '__global _Atomic(unsigned int) *') [-Wincompatible-pointer-types]
   10 |   void (^kernelBlock)(void) = ^{ block_fn(len, val); };
      |                                                ^~~
note: passing argument to parameter 'val' here
--
warning: incompatible pointer types passing '__global int *const __private' to parameter of type '__global atomic_uint *' (aka '__global _Atomic(unsigned int) *') [-Wincompatible-pointer-types]
   10 |   void (^kernelBlock)(void) = ^{ block_fn(len, val); };
      |                                                ^~~
note: passing argument to parameter 'val' here
```
2025-11-26 16:25:02 -08:00
Romaric Jodin
8e125bd2e8 Refactor wimpy feature (#2507)
- Make it a common parameter in harness using either '-w', '--wimpy' or
'CL_WIMPY_MODE' environment variable.
- Remove all test specific wimpy variable.

---------

Co-authored-by: Kévin Petit <kpet@free.fr>
2025-09-02 09:47:44 -07:00
Ahmed Hesham
bb331c2c92 Migrate device_execution suite to the new test registration framework (#2323)
Contributes to #2181.

Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
2025-03-11 21:54:22 +00:00
ellnor01
617e7cb233 Re-enabling narrowing errors (#1144)
Fixes narrowing conversion build errors in test_common

Removing disable of narrowing errors in main CMakeLists.txt
and moving it down to specific test_conformance suite's 
CMakeLists.txt where there are many more build errors revealed
from this fix. 

Fixes a few simple issues under test_conformance in the process.

Contributes #787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>

---------

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
2024-10-08 09:54:32 -07:00
Kamil-Goras-Mobica
746544af80 Strengthen testing of CL_DEVICE_TYPE query and use of CL_DEVICE_TYPE* (#1977)
Issue: #1930
2024-08-20 08:54:06 -07:00
Sven van Haastregt
1139f54bde device_execution: fix -Wformat warnings (#1938)
Printing of a `size_t` requires the `%zu` specifier.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2024-04-15 13:37:07 +02:00
Sven van Haastregt
d8ad10d1ea device_execution: fix CL_QUEUE_* in error messages (#1896)
When reporting errors from `clCreateCommandQueueWithProperties`,
report the correct property names.  In particular:

`CL_QUEUE_DEVICE` should be `CL_QUEUE_ON_DEVICE`.
`CL_QUEUE_DEFAULT` should be `CL_QUEUE_ON_DEVICE_DEFAULT`.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2024-03-12 09:36:02 -07:00
Sven van Haastregt
aa953aaa51 [NFC] cmake: do not suppress -Wsign-compare globally (#1810)
Only disable `-Wsign-compare` for tests that do not compile cleanly
with this warning enabled.  Re-enable the warning for the other tests,
so that it can catch any new occurrences.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2023-09-20 15:48:25 +01:00
Sven van Haastregt
729cd8b7a9 [NFC] device_execution: use raw string literals for block kernels (#1767)
Modernize by using raw string literals, which makes the kernel sources
easier to read/extract.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2023-06-28 09:34:07 +01:00
Ben Ashbaugh
02bf24d2b1 remove min max macros (#1310)
* remove the MIN and MAX macros and use the std versions instead

* fix formatting

* fix Arm build

* remove additional MIN and MAX macros from compat.h
2021-09-13 13:25:32 +01:00
Grzegorz Wawiorko
216455842d Change arg type to unsigned int from signed int (#1078)
* Change arg type to unsigned int from signed int

* Fix formatting issues
2021-02-02 16:43:37 +00:00
Grzegorz Wawiorko
2597027737 Use highest OpenCL C version (#1081)
* Set the highest supported OpenCL C version.

* Remove gDeviceLt20 variable - not used anymore.

* Fix formatting issues
2021-01-11 13:54:19 +00:00
Sreelakshmi Haridas Maruthur
f627a68dd6 device_execution: Modify the check in profiling subtest (#962)
As per the spec CL_PROFILING_COMMAND_COMPLETE is required to
be equal to CL_PROFILING_COMMAND_END only on devices that
do not support the on-device queue.

For other cases it can be >= CL_PROFILING_COMMAND_END
2020-09-17 09:36:43 +01:00
ouakheli
590321d98d Add test for CL_PROFILING_COMMAND_COMPLETE (#841)
The test checks profiling value CL_PROFILING_COMMAND_COMPLETE
compared to CL_PROFILING_COMMAND_END for two cases:
1) kernel with children with different levels of nesting
2) kernel without children
2020-08-30 13:51:38 +01:00
Grzegorz Wawiorko
f1dd503c6c Fix code format errors vs.3 2020-07-23 17:21:07 +01:00
Grzegorz Wawiorko
450f583800 Fix code format errors vs.2 2020-07-23 17:21:07 +01:00
Grzegorz Wawiorko
44a240367e Fix code format errors 2020-07-23 17:21:07 +01:00
Grzegorz Wawiorko
d643dc5399 Add API name to version_expected_info function 2020-07-23 17:21:07 +01:00
Ankit Goyal
4fbcd96e7f Remove "C" linkages (#781)
* Remove extern C linkages

* Update crc32 to cpp and remove extern C linkage
2020-05-20 14:16:19 +01:00
Kévin Petit
5e2f5b857e Accept OpenCL 3.0 in version parsing code and use where appropriate (#752)
* Accept OpenCL 3.0 in version parsing code and use where appropriate

There were a number of tests against 2.2 that are clearer against 3.0.

Fixes #751

Signed-off-by: Kévin Petit <kpet@free.fr>

* Remove CL_EXPERIMENTAL guards

Signed-off-by: Kévin Petit <kpet@free.fr>

* formatting

* Configure the headers for OpenCL 3.0

* more format fixes
2020-04-30 11:51:06 +01:00
Grzegorz Wawiorko
78fc283069 Fix test skip handling while test initialization (#670) 2020-03-11 18:14:29 +00:00
Radek Szymanski
80c3a27a6a Remove unused parameter (#630)
The imageSupportRequired param is not needed in runTestHarnessWithCheck,
so just remove it.

Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2020-02-27 15:36:28 +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
boazo
7d8dcbe678 Device enqueue optional (#579)
* optional execution of device side enqueue

* make device enqueue test suite optional
2020-02-20 19:38:23 +00:00
Anastasia Stulova
e6d15a2bfc Release event in host_enqueue_order test.
Signed-off-by: Anastasia Stulova <anastasia.stulova@arm.com>
2019-08-14 16:02:39 +01: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
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
Bartosz Sochacki
b99c6004ce cl20: Khronos Bug 15619 Race condition in device execution enqueue_flags test 2019-07-31 10:41:18 +01:00
Nikhil Joshi
6e29a04870 Fix enqueue_flags test to use correct barrier type. (#276)
Currently, enqueue_flags test uses CLK_LOCAL_MEM_FENCE.
Use CLK_GLOBAL_MEM_FENCE instead as all threads across work-groups
need to wait here.
2019-07-03 14:11:02 +01:00
Nikhil Joshi
2edcc56117 Fix test_host_queue_order not to rely on bit accurate float ops (#277)
Currently, test_host_queue_order relies on bit accurate float ops.
It expects expects that sqrt((float)i * i) == i.
This is not always true due to floating point precision limitations.
The test does not really need the sqrt operation and it can be removed
instead of trying to correct the floating point check.

Replace problematic float operation with constant value of 1.
2019-05-29 11:09:28 +01:00
Kévin Petit
509172b780 cl20: Khronos Bug 16235: Allow the barrier test to pass in isolation (#262)
The input buffer to tests in execute_block suite is set to some
value (0xdeadbeef) but supposed to be reset in each test such
so that observing 0 after executing the test guarantees that
the status is that of the test and not a pre-existing value.

This commit adds missing initialisation to block_barrier kernel code
and removes an extra redundant barrier at the end.

This test is the last in the suite. After executing other tests the
input/output buffer is not being reset on a host side and therefore
running the test after successful execution of the previous test
(resulting in writing expected 0 into the buffer) was hiding the
problem.

Change-Id: Ia9310d095993703c32ee1f664aed9ff72b26367a
Signed-off-by: Anastasia Stulova <anastasia.stulova@arm.com>
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-05-03 01:16:46 +08:00
Kévin Petit
d536a019d1 Bugfix for Khronos Bug 16242. (#261)
Use convert_int_rte for the result of the sqrt instead of casting to int.

Fixes possible rounding issues.
2019-05-03 01:16:31 +08: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
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
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
Kedar Patil
2821bf1323 Initial open source release of OpenCL 2.2 CTS. 2017-05-16 18:44:33 +05:30