Commit Graph

18 Commits

Author SHA1 Message Date
Ahmed
a1d8c3e419 Remove spir half vloada_half tests as this builtin does not exist in OpenCL (#2552)
The test was using vloada_half which does not exist for scalars.

Also removed the files test.vloada_half_*.* from half.zip.

For test.vloada_half3_global, changed the OpenCL kernel to use
vload_half instead of vloada_half.

Build failures will return a proper failure now, before, the test was
passing in this case.

More Info: https://github.com/KhronosGroup/OpenCL-Docs/issues/648
2025-10-21 09:59:13 -07:00
Harald van Dijk
d0b0bd9570 Fix -list option in test_spir (#2509)
This handles the case where test_spir is called without arguments.
2025-09-02 09:23:50 -07:00
Romaric Jodin
cef3ef6b59 Update '-list' option (#2457)
'-list' option is used to print all sub-tests. But some test do not
support it at all. And all test do not display it the same way, making
it quite complicated for external tools to extract them.

That CL clean the usage so that tests:
- Print the sub-tests list with either '-list' (to prevent breaking
legacy usage) or '--list' (to match other options)
- Do not print anything else when the option is used
2025-08-19 17:48:03 +01:00
Ahmed Hesham
82508f709a Fix test_spir not checking for the required extension (#2454)
`clGetDeviceInfo` should fail with `CL_INVALID_VALUE` when queried for
`CL_DEVICE_SPIR_VERSIONS` on devices that do not claim to support the
extension that provides it, `cl_khr_spir`.

Following this change, the test is skipped instead of failing on devices
that do not support `cl_khr_spir`.

Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
2025-07-24 10:43:03 -07:00
cc
9fead88d81 Fix program leaks in test_spir compile_and_link (#2423)
Fixed program leaks caused by missing clRelease calls
2025-07-01 13:01:01 -07: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
Ben Ashbaugh
0a32b5ca9d fix macos builds by avoiding double compilation of function_list.cpp for test_spir (#1866)
* modernize CMakeLists for test_spir

* add the operating system release to the sccache key

* include the math brute force function list vs. building it twice
2024-01-16 09:54:53 -08:00
Sven van Haastregt
9798a96a9f [NFC] Fix some sign-compare warnings (#1670)
In `os_helpers.cpp`, the preceding `if` already handles negative
values, so cast to unsigned.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2023-03-12 11:06:55 +00:00
Sven van Haastregt
3cadff7115 Fix unused-function warnings and enable -Wunused-function (#1576)
Move functions in .h files to .cpp files where appropriate; align
prototypes and definitions; and remove functions that are not used.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2022-12-13 09:47:48 -08:00
Sven van Haastregt
e9d2abf705 spir: Fix -Wcatch-value warnings (#1565)
`std::exception` and `std::runtime_error` are polymorphic types and as
such they shouldn't be passed by value.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2022-11-24 11:43:51 +00:00
Feng Zou
1aa930957a Temporarily disable the test_kernel_attributes test case (#1297)
* Temporarily disable the test_kernel_attributes test case

Per OpenCL spec on CL_KERNEL_ATTRIBUTES, for kernels not created from OpenCL C
source and the clCreateProgramWithSource API call the string returned from this
query will be empty.
But in test_kernel_attributes test, it read from bc binary and expect to get
kernel attribute, which is not consistent with OpenCL spec.

* Fix clang format issue
2021-08-11 18:04:21 +01:00
Alastair Murray
1a3e19c37e Use Version type for cl_khr_spir extension version checks (#953)
* Use Version type for cl_khr_spir extension version checks

The current method of using `std::find(versions, 1.2f)` is unreliable due to
performing a floating point comparison.  I.e. on some compiles it will
spuriously report that the required version is missing and skip the tests.

* Address clang-format failure.

* Correct typo.
2020-09-22 21:49:13 +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
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
Yaxun (Sam) Liu
e1c9ffd394 Add test for -cl-fp32-correctly-rounded-divide-sqrt to spir subtest. 2019-04-15 16:09:13 +01:00
Grzegorz Wawiorko
3b36a66eff Khronos Bug 15728 SPIR 1.2 tests fail when some cases are skipped (#117) 2019-03-21 11:05:09 +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