Use the explicit version of the atomic_load/store and atomic_fetch_add
with memory order relaxed and memory scope workgroup to allow devices
that only support the minimum CL_DEVICE_ATOMIC_MEMORY_CAPABILITIES which
are (CL_DEVICE_ATOMIC_ORDER_RELAXED | CL_DEVICE_ATOMIC_SCOPE_WORK_GROUP)
to run the tests.
The test should only require the relaxed ordering and memory scope
workgroup anyway.
From the specificiation:
"The non-explicit atomic_store function requires support for OpenCL C
2.0, or OpenCL C 3.0 or newer and both the
__opencl_c_atomic_order_seq_cst and __opencl_c_atomic_scope_device
features"
"The non-explicit atomic_load function requires support for OpenCL C 2.0
or OpenCL C 3.0 or newer and both the __opencl_c_atomic_order_seq_cst
and __opencl_c_atomic_scope_device features."
"The non-explicit atomic_fetch_key functions require support for OpenCL
C 2.0, or OpenCL C 3.0 or newer and both the
__opencl_c_atomic_order_seq_cst and __opencl_c_atomic_scope_device
features."
This fixes occurrences where the previous wrong specifier appears to
work in a typical 64-bit build, but causes a Wformat warning in 32-bit
builds.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
fixes several issues:
* `generic_address_space` test: add check for program scope variables.
The test uses both generic AS and program-scope variables, however it
only checked the generic-AS presence in `clGetDeviceInfo`.
* `compiler/test_compiler_defines_for_extensions.cpp`: add
`cl_khr_command_buffer_multi_device` to the list of recognized
extensions
* `command_buffer_event_sync.cpp`: add delays for testing
`clSetEventCallback` - according to specification, these can be executed
asynchronously (in a separate thread) by the OpenCL implementation,
hence the event callback is not quaranteed to be called before
`clFinish()` returns. Existing test `events/test_callbacks.cpp` also
waits for callback with loops of usleep.
* `images/kernel_image_methods/test_1D_buffer.cpp`: fix allocation size
being too small for the 1D buffer backing the image
---------
Co-authored-by: Ben Ashbaugh <ben.ashbaugh@intel.com>
The atomic operations are tested with generic pointers but in a way
where the compiler can infer the original pointer address space. This
commit adds tests specifically for the case where the compiler cannot
make inferences.
Test that the correct address is used with atomics when the address is
group variant and invariant.
Conformance tests should not assume support for OpenCL 2.0, or specific
features. This patch removes uses of
`__opencl_c_program_scope_global_variables` for devices which do not
support it in the generic address space conformance tests. Additionally,
the `clCompileProgram` options have been updated to select between
`CL2.0` and `CL3.0` depending on which the device under test supports.
Co-authored-by: Amy Worthington <amy@codeplay.com>
* Accept OpenCL 3.0 in version parsing code and use where appropriate
There were a number of tests against 2.2 that are clearer against 3.0.
Fixes#751
Signed-off-by: Kévin Petit <kpet@free.fr>
* Remove CL_EXPERIMENTAL guards
Signed-off-by: Kévin Petit <kpet@free.fr>
* formatting
* Configure the headers for OpenCL 3.0
* more format fixes
* Harness: Added an option for a test to skip itself.
New condtion in callSingleTestFunction. This allows a test to return TEST_SKIP if the device does not support the requested test.
* Split generic_ptr_to_host_mem into two tests.
The old generic_ptr_to_host_mem test tests two different device capabilities (SVM and not SVM). This is a prerequisite for the following commit.
* Generic Address Space: Skip tests utlilising SVM on devices that do not support SVM.
Where a device does not support SVM, do not run the generic address space test(s) that rely on SVM.
* Generic Address Space: Skip test on unsupported devices.
Where a device does not have to support this test, skip it.
* CI: Added USE_CL_EXPERIMENTAL to the CI build(s).