Commit Graph

29 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
bf883dc800 Fix compilation issues for conforming_version.cpp (#1113)
Previously this file used the auto keyword to
declare a string. This can cause compilation
issues when used in a later function.

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
2021-01-22 10:28:47 -05: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
Ben Ashbaugh
81cea4775e added extended versioning tests for OpenCL 3.0 (#996)
* added extended versioning tests for OpenCL 3.0

* address review feedback
2020-09-30 21:47:42 +01:00
Jim Lewis
0ee260b036 Arbitrary output directory support for compiler test build copies (#848) (#851)
* Move copy from top level down to test_compile module as post-build copy
* Fix windows VS2015 build break
2020-07-24 14:30:24 +01: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
0b4ecd1756 computeinfo/extended_versioning: Add missing arguments to log_error 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
Einar Hov
89ec023110 Add conformance tests for cl_khr_extended_versioning (#548)
Tests that the new queries work, and that what they return is consistent with
the information returned by the string-based queries.

Signed-off-by: Einar Hov <einar.hov@arm.com>
2020-02-20 10:14:17 +00:00
Lukasz Towarek
1497a4a60d computeinfo: Fix printing of size_t values (#555)
Currently capabilities with size_t type like CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE
are printed as signed values for example:
CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE == -881700864
2020-01-15 10:08:58 +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
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
00d0b0ddd7 Test fix - Test computeinfo should know each existing OCL version (#366) 2019-07-08 16:39:22 +01:00
Grzegorz Wawiorko
171c35429a Fix Issue #35 - ask for capability size. Too small size could cause errors (#280)
* Fix Issue #35 - ask for capability size. Too small size could cause errors

* Fix Issue #35 - Review fixes

* Fix Issue #35 - Review fixes - build issues fixed
2019-05-23 18:19:37 +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
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
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