Commit Graph

14 Commits

Author SHA1 Message Date
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
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
Ben Ashbaugh
bbc7ccfc58 add a prefix to OpenCL extension names (#1311)
* add a prefix to OpenCL extension names

* fix formatting
2022-03-02 18:34:06 +00:00
Ben Ashbaugh
b500da5fbc add basic test for cl_khr_pci_bus_info (#1227)
* add basic test for cl_khr_pci_bus_info

* correctly use TEST_SKIPPED_ITSELF

Co-authored-by: Kévin Petit <kpet@free.fr>

* fix related usage of TEST_SKIPPED_ITSELF

Co-authored-by: Kévin Petit <kpet@free.fr>
2021-07-21 08:48:48 +01:00
ellnor01
18c54be0a4 Validate CL_DEVICE_LATEST_CONFORMANCE_VERSION_PASSED (#1086)
* Validate CL_DEVICE_LATEST_CONFORMANCE_VERSION_PASSED

Adding test to validate value returned from clGetDeviceInfo with
CL_DEVICE_LATEST_CONFORMANCE_VERSION_PASSED.

Fixes #993

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

* Fixes for formatting on computeinfo add tests

Fixes #993

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
2021-01-07 11:39:57 +00: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
Grzegorz Wawiorko
bfc1cc47f3 Add OpenCL 3.0 deviceInfo capabilities (#833)
* Add OpenCL 3.0 deviceInfo capabilities

* Fix variable/type names collisions

* Fix build error - variable initialization

* Add support for CL_DEVICE_DEVICE_ENQUEUE_CAPABILITIES

* Fix - test_error exits err != CL_SUCCESS

* Fix - redundant variable never used in function

* Fix - remove duplicated capabilities for device

* Test computeinfo - display 3.0 platform capabilities

* refactor existing code
* add CL_PLATFORM_EXTENSIONS_WITH_VERSION
* add CL_PLATFORM_NUMERIC_VERSION

* Review fixes in computeinfo

* Fixes review - define variable inside of case block.
2020-07-22 23:01:18 -07:00
Einar Hov
bb1285f6f2 Tests for cl_khr_device_uuid (#813)
Basic conformance testing for the cl_khr_device_uuid extension.  Checks
that the ID queries return the right sizes and that the returned IDs are
stable across two calls to clGetDeviceInfo. If device LUID validity is
true, also checks that one and only one bit is set in the device node
mask.

Signed-off-by: Einar Hov <einar.hov@arm.com>
2020-07-09 11:23:38 +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
Pierre Moreau
fe12c4e378 computeinfo: Attach min version to image types and flags
This is mostly required for OpenCL 1.0 and 1.1 conformance tests, but
also avoids testing for CL_MEM_KERNEL_READ_AND_WRITE on OpenCL 1.2.
2020-05-20 14:31:58 +01:00
Pierre Moreau
2d124f61eb computeinfo/main: Fix format specifiers for unsigned long 2020-05-20 14:31:58 +01:00
Pierre Moreau
0ed62b4fbe Reformat computeinfo/ tests 2020-05-20 14:31:58 +01:00
Jack Frankland
8d28a5dc83 Add 3.0 as valid device version to version parsing logic (#765) 2020-05-06 13:09:20 +01: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