Commit Graph

15 Commits

Author SHA1 Message Date
Sven van Haastregt
90f523ea57 api: fix -Wformat warnings (#2025)
The main sources of warnings were:

 * Printing of a `size_t` which requires the `%zu` specifier.

 * Printing of `cl_long`/`cl_ulong` which 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>
2024-09-02 12:02:28 +02:00
Sven van Haastregt
2d8028668f [NFC] api: remove duplicate and unused macros (#1949)
The removed macros were never used.

Use the more common `ARRAY_SIZE` macro instead of defining an identical
`NELEMS` macro.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2024-07-02 09:37:49 -07:00
niranjanjoshi121
1fe72877d7 Check that CL_DEVICE_COMPILER_AVAILABLE is CL_TRUE for FULL_PROFILE (#1804)
OpenCL FULL profile requires that online compiler be available.
OpenCL-CTS currently queries profile as well as online compiler
availability via device queries, but doesn't check for the consistency.

Check for consistency that if CL_DEVICE_PROFILE is "FULL_PROFILE"
(or technically is not "EMBEDDED_PROFILE") then CL_DEVICE_COMPILER_AVAILABLE
is CL_TRUE for that device.

Fixes #1763
2023-10-03 09:33:47 -07:00
Vishal Patil
c511ac62b0 fix memory leak from argList and from wrong ordering of free and return statement (#1792) 2023-08-29 09:19:45 -07:00
Sven van Haastregt
605228ae7f [NFC] api: Fix sign-compare warnings (#1692)
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2023-04-03 16:29:51 +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
Jim Lewis
51c6d97d2f Fix test_api get_command_queue_info (#1324)
* Fix test_api get_command_queue_info

Decouple host and device out-of-order test enabling

* Rename property sets more generically

* Refactor to use std::vector to accumulate test permutations
2022-01-06 10:26:20 +00:00
Grzegorz Wawiorko
0d74b3f926 Test api fix - sampler properties is 0 in compatibility mode (#1106) 2021-01-15 16:31:03 +00:00
ellnor01
72998af43c Making object queries tests exhaustive (#1008)
* Making object queries tests exhaustive

Tests which were only testing fixed values have been made exhaustive
and refactored. They only use properties from the core spec.

Associated Macros have been turned into templated functions.

Comparison of devices with cl_device_id rather than vendor ids.

All object queries tests are now in test_queries.cpp.

Fixes #508

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

* Remove unnecessary arguments from test_queries.cpp functions

Fixes #508

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

* Using test_assert_error in test_queries.cpp

This commit also fixes the queue properties array and
corrects for on device queues being optional in CL3.0

test_queries_compatibility.cpp has been removed as
tests are now in test_queries.cpp

Contributes #508

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

* Correct api test boolean for device queue support

Contributes #508

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
2021-01-04 15:00:45 +00:00
Ben Ashbaugh
e075026819 test CL_QUEUE_ARRAY_PROPERTIES query (#925)
* OpenCL 3.0 test CL_QUEUE_PROPERTIES_ARRAY

* add verification if requested_size <= CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE
* remove test_case - set NULL properties, get not empty array with 0 terminator
* add printing test_case description

* change logic of checking if requested properties are supported by device
depending on host/device type queue.

* fix a few bugs, rename test for consistency

* add utility function for comparing properties

Co-authored-by: Grzegorz Wawiorko <grzegorz.wawiorko@intel.com>
2020-09-01 10:16:18 +01:00
Grzegorz Wawiorko
c9f4ef23f6 OpenCL 3.0 CL_SAMPLER_PROPERTIES tests. (#858)
* OpenCL 3.0 CL_SAMPLER_PROPERTIES tests.

* Test CL_SAMPLER_PROPERTIES - fix misspelling

* Test CL_SAMPLER_PROPERTIES - fix results verification
2020-08-06 10:02:46 +01:00
Sreelakshmi Haridas Maruthur
46b6bae001 cl20: api: Allow vendor flags (#666)
Mask off vendor extensions when querying host command queue properties.

Khronos Bug: https://github.com/KhronosGroup/OpenCL-CTS/issues/642
Test Suite Affected: api
2020-03-23 15:58:20 +00:00
Kévin Petit
32bbb19885 Fix a couple of typos (#478)
Signed-off-by: Kévin Petit <kpet@free.fr>
2019-11-11 17:07:40 +00: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
Kedar Patil
2821bf1323 Initial open source release of OpenCL 2.2 CTS. 2017-05-16 18:44:33 +05:30