* Fix enqueue_flags test to use correct barrier type.
Currently, enqueue_flags test uses CLK_LOCAL_MEM_FENCE.
Use CLK_GLOBAL_MEM_FENCE instead as all threads across work-groups
need to wait here.
* Add check for support for Read-Wrie images
Read-Write images have required OpenCL 2.x.
Read-Write image tests are already being skipped
for 1.x devices.
With OpenCL 3.0, read-write images being optional,
the tests should be run or skipped
depending on the implementation support.
Add a check to decide if Read-Write images are
supported or required to be supported depending
on OpenCL version and decide if the tests should
be run on skipped.
Fixes issue #894
* Fix formatting in case of Read-Write image checks.
Fix formatting in case of Read-write image checks.
Also, combine two ifs into one in case of
kerne_read_write tests
* Fix some more formatting for RW-image checks
Remove unnecessary spaces at various places.
Also, fix lengthy lines.
* Fix malloc-size calculation in test imagedim
unsigned char size is silently assumed to be 1
in imagedim test of test_basic.
Pass sizeof(type) in malloc size calculation.
Also, change loop variable from signed to unsigned.
Add checks for null pointer for malloced memory.
* Use size_t instead of int for imagedim
The size calculation for image with larger dimensions
is overflowing with int values.
Change image dim variables to use size_t
to avoid overflow.
While at it, fix formatting at various places.
* Use new instead of malloc in test imagedim
Use new and delete in place of malloc
and free through test_basic imagedim
to avoid NULL pointer checks.
* Revert sizeof changes from size calculation
As the types of width and height are now
changed to size_t, sizeof is not required
in size calculation.
Revert the same.
* 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>
* initial version, tests vec2 and vec4
* added all types and vector sizes
* fix formatting
* add checks for long and ulong support
* test floats unconditionally, not tied to long support (oops)
* fix for vec3 kernel arguments
* remove generic address space dependency
* Skip `rw_image_access_qualifier` if images are not supported.
* Skip `rw_image_access_qualifier` if read-write images are optionally
not supported on a OpenCL-3.0 or later device.
* Stop assuming `-cl-std=CL3.0` and default to latest OpenCL C supported
by the device.
* 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.
* `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.
* 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
* 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
* 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?
They are duplicate functions
Fixes#709
Change-Id: I8f7d6b8254047adb9e09ede4951dedc3ec5c1099
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
- 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>
* 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.
* 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
* 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
... 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>
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>
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>
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>