Commit Graph

32 Commits

Author SHA1 Message Date
Jack Frankland
0ba7cf1369 Dynamically Select -cl-std Option (#879)
* Dynamically select the `-cl-std` option on the basic `sizeof` and
`wg_barrier` tests to be one of `CL1.X`, `CL2.0` or `CL3.0`.
Use the most recent CL C standard supported on the device.
2020-08-25 09:32:08 -07:00
Jack Frankland
655d83db80 Optionally Skip progvar Tests (#878)
* Optionally skip the proram scope globa variable tests on OpenCL-3.0
devices that optionally do not support programscope global variables.
2020-08-14 13:49:51 +01:00
Jack Frankland
48114a4e55 Run test_enqueued_local_size if Non-Uniform Work-Groups Not Supported (#789)
* `test_enqueued_local_size` will be skipped for OpenCL < 2.0. However,
non-uniform work-groups became optional in 3.0 and so check that they
are supported before running `test_enqueued_local_size`. If they are not
suppported round the global sizes up to the next multiple of the local
size, so that we can still test that `get_enqueued_local_size() ==
get_local_size()` in the case of uniform workgroups.
2020-08-11 08:04:46 -07: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
James Price
09aa54246f Fix warnings in basic suite (#782)
* Fix "ignored typedef" warning

* Fix "returning reference to temporary" warning
2020-05-20 15:16:18 -04:00
Ankit Goyal
833f0d029e Fix return-type warnings with harness library and basic test (#776)
* Fix offending `-Wreturn-type` in harness library

* Fix offending `-Wreturn-type` in basic test
2020-05-18 13:03:17 +01:00
John Kesapides
3afe926416 Mem-leaks from conformance test_basic (#771)
Release some leaked events

Signed-off-by: John Kesapides <john.kesapides@arm.com>
2020-05-14 12:57:20 +01:00
James Price
bda0285c2a Refactor basic/intmath tests into a single file (#757)
* Refactor basic/intmath tests into a single file

These six tests previously duplicated almost all of their sources in
separate files. Bring them into a single file with templated routines
to perform the tests.

This change also makes use of more C++ features and utilities from the
harness library to make the code cleaner.

* Fix array indices for initialization

* Use loop for buffer creation

* Refactor to remove duplicate verification code

Remove need for hardcoded number of test operations.

* Address review comments

* Use TEST_SKIPPED_ITSELF
2020-05-06 11:32:31 -04:00
Kévin Petit
2fa8611862 Make it possible for enqueue_map tests to catch more USE_HOST_PTR issues (#730)
* Make it possible for enqueue_map tests to catch more USE_HOST_PTR issues

Don't update the memory passed as host_ptr with the correct result
and compute the reference result using a separate allocation so that
implementations that use copies to manage the host_ptr and never update
as part of map/unmap commands the memory pointed to by host_ptr fail
the test.

Rename initialData to hostPtrData for clarity.

Fixes #700

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

* format fixes

* more format fixes?
2020-04-16 10:23:03 +01:00
ellnor01
3b79ecdb87 Replace get_device_version with get_cl_device_version (#733)
They are duplicate functions

Fixes #709

Change-Id: I8f7d6b8254047adb9e09ede4951dedc3ec5c1099
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
2020-04-15 14:31:22 +01:00
Kévin Petit
cd3b552094 Clean up enqueue_map_{buffer,image} tests a bit (#701)
- Introduce MTdataHolder
- Use BufferOwningPtr to manage allocations (fixes a few leaks in error cases)
- Introduce variable for common expressions
- Remove image format support check as the format is required by OpenCL 1.0

Contributes to #700

Signed-off-by: Kévin Petit <kpet@free.fr>
2020-04-02 21:46:41 +01:00
ellnor01
08b52d036f Remove explicit_s2v_bool test (#688)
The test does not do anything other than print a skipping test
message.

Fixes #438

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
2020-03-20 12:00:40 +00:00
Marco Antognini
3e771b0070 Fixes #498 - Extend progvar_prog_scope_uninit checks (#544)
This adds checks to progvar_prog_scope_uninit which ensure that
program-scope variables are default-initialized to the zero-value for
their type.
2020-03-11 18:18:12 +00:00
Kévin Petit
4c5a8fff6d Conditionally test BGRA in Basic readimage3d (#623) (#624)
* imageHelpers: Created generic function that returns a vector of required image formats.

An upcoming commit requires access to the vector of required image formats, separatley from check_minimum_supported.

* imageHelpers: Added a new function is_image_format_required.

This function can be used to determine for any given cl_image_format, whether the implementaion is required to support it.

Conditionally test BGRA in Basic readimage3d (#623)

This change adds checks to see if testing against an embedded implementation and if so, queries whether BGRA is supported or not.

* Refactor based on PR review.

* Update passed message code.

* Changed scope of struct to be within test_readimage3d.
2020-03-05 18:47:51 +00:00
Kévin Petit
b2eba77d42 Get rid of test_finish macro and related ATF cruft (#633)
Closes #431

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-03-02 15:06:44 +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
Kévin Petit
3f11868e11 Fix warnings reported by -Wconversion-null (#603)
Fix error reporting in clFillImage as a result.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-02-21 12:21:53 +00:00
Kevin Petit
e306ecd691 Remove most remaining clCreate*WithProperties calls in tests that run on 1.2
Don't touch interop suites or code only run with options not required
for conformance.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-02-20 14:38:08 +00:00
jiabaxie
943ba04c0c set gDeviceType in testharness.c (#597)
* set gDeviceType in testharness.c, also moved gTestRounding to imageHelpers.cpp & .h and removed duplicate code from host_atomics.cpp

* Cleaned up some redundant code

* Reversed the change in testharness.c
2020-02-20 10:39:55 +00:00
jiabaxie
68d08e07bf Moved all instances of gDeviceType to imageHelper.cpp (#575)
* Moved all instances of gDeviceType to imageHelper.cpp

* Missed one instance of gDeviceType

* Removed all instances of extern cl_device_type gDeviceType, except in imageHelpers.h
2020-02-06 08:27:13 +01:00
Kévin Petit
695960df2e Remove duplicate sizeof test from the compatibility suite (#545)
... and fix bug 16041 in the main suite.

The only diffs were:
- changes made to support both 1.2 and 2.0 on master
- changes to fix bug 16041 in the compatibility version that
  hadn't made it to the main version.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-01-15 10:09:25 +00:00
Kévin Petit
1c04050b5b Use old-style sampler creation in basic suite and remove duplicate compatibility tests (#510)
As agreed in the WG calls, the query tests are sufficient to cover
both old-style and new-style sampler and command queue creation
entrypoints.

Use old-style entrypoints in all tests that don't require 2.x
features to get compatibility with 1.x implementations.
This makes it possible to remove duplicate compatibility tests.

Contributes to #494.

Signed-off-by: Kévin Petit <kpet@free.fr>
2019-12-11 10:36:45 +00:00
Grzegorz Wawiorko
18046e65d1 Fixes issue #499 - Test basic from master branch on OCL 1.2 device (#500)
* Fixes issue #499 - Test basic from master branch on OCL 1.2 device

* Restore pitch tests for CL1.X
2019-11-25 09:24:26 +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
Sam Laynton
12bc0c1f3f Check max work group size in test basic (#414)
The test enqueued_local_size in test_basic used a
local work group size larger than the minimum max
supported work group size supported by some platforms.

This change checks the max and clamps to it if
requested size would be larger than supported.

Signed-off-by: Sam Laynton <sam.laynton@arm.com>
2019-08-05 11:26:17 +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
Kevin Petit
d3fb3d975f User create_* helper functions in most tests
Ported from master.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-07-31 16:00:45 +01:00
Kevin Petit
59e2da3b4e Port framework changes from master
Now requiring the headers to be configured for OpenCL > 2.1.
2019-07-31 16:00:45 +01:00
Radek Szymanski
a344529c9b cl20: Use single array for function list (#146)
Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2019-04-10 12:29:22 +01:00
Kevin Petit
f6a2955758 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:48:26 +00:00
Kevin Petit
53db6e7f9f 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:06 +00:00
Kedar Patil
3a440d17c8 Initial open source release of OpenCL 2.0 CTS. 2017-05-16 18:50:35 +05:30