Test has previously been commented out and adds no value.
Struct array is already tested with test_stream_read.
Change-Id: I4f5acfc431b7cf39408e3e0fd41a6f89fc9353fa
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
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>
The OpenCL SPIR-V Environment Specification was updated to mandate that
all variables decorated with `BuiltIn` must be in the `Input` storage
class, see https://github.com/KhronosGroup/OpenCL-Docs/pull/278.
Global variables with the Input storage class have to be listed in the
entry points’ interface, which was also taken care of in this commit.
* OpenCL versions before 2.0 do not have precision requirements for
reduced precision math.
* Skip reduced precision testing for devices with
versions < 2.0.
* Turn on building test_gl in travis
* Install packages only on native Linux
* Build test_gl use variable
* Travis - skip OSX system
* Fix test_gl build errors
* Fix test_gl build errors - cast to uintptr_t
* Fix redefinition build issues in travis Xenial build env
* Remove duplicate IsXSubnormal functions
Is{Double,FLoat,Half}Subnormal function duplicates are currently in the codebase.
Fixes#511
Change-Id: Ibe97f20a6e38db6aed00c9ba397cfa72036bd1c5
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
* Update conversions.h
Test has been commented out.
This is effecting clang-format checks in the file.
Removing test as it is not in use.
Change-Id: Ic9a7ab68a514fa6dc01e4d86a7bda1a9856a75e8
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
* The global variable `gTestFastRelaxed` has state which is used to
control the behaviour of the compiler flag `-cl-fast-relaxed-math` and
the precision testing of relaxed, fp32 and fp64 types. This is confusing
since the global variable is being set and read in different translation
units, making it very difficult to reason about the logic of the brute
force framework. It is particular difficult to follow since the global
variables is cached and then turned off in the case of fp32 and f64 in
order to use the same code path as relaxed testing, after it is then
turned back on.
* Remove uses of the global variable outside of `main.cpp` (the global
variable remains in use within `main.cpp` since it is a command line
option and used to turn of relaxed testing completely). Replace all uses
of the global variable with boolean `relaxedMode` which is passed as a
function paramter but replaces `gTestFastRelaxed` semantically.
* Improve async build callback testing
Check that the program build status can be queried from inside the
program completion callback, and also add a test to ensure that the
completion callback is called when the build fails.
* Address review comments
* Fix formatting
* Fix test_subgroups - test as core feature.
* Fix kernels pragma in case of OpenCL 2.1 core subgroups
* Change global variable names to gVariable convention
* Allow subgroups tests execute 2 paths
- as core feature
- as extension feature
* Fix code formatting.
* Set correct OpenCL version
* Fix code format
* test_subgroups review fixes:
* do not use global variables
* make IFP as separate tests
* use stringstream data type
* use special class to load function pointer for specific API
* Remove not not used variable
* Test subgroups - use common enums
* Test subgroups - set TEST_SKIPPED_ITSELF
* 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
Fix various memory leaks around events.
Convert test to use supplied typewrappers
to avoid memory leaks. Also use error helper
functions to reduce code size.
Use stringstreams to synthesize kernel sources, and
raw c+11 string literals.
Signed-off-by: John Kesapides <john.kesapides@arm.com>
* Fix test_gl error reporting
Overwriting 'error' variable after check for Msaa/Depth support was clearing
the error counter incremented after failure in test_image_format_write. In
effect the test might return 0 even if there were errors.
* Fix variable name
* Fix formatting
* Fix formatting
* Correct khronos extension device version checks so that 2.0, 2.1 and
2.2 extensions are only require for devices versions < 3.0
(`cl_khr_3d_image_writes`, `cl_khr_image2d_from_buffer` and
`cl_khr_depth_images` are all optional for devices supporting
OpenCL-3.0).
* Remove `cl_khr_fp64` from list or required extensions for 2.0,
`cl_khr_fp64` is a required extension for OpenCL-1.2 devices if they
suport doubles. Check for support of `cl_khr_fp64` on 1.2 devices.
* Remove duplicated `cl_khr_byte_addressable_store` from list of 2.0
extensions. Since this is a 1.1 extension and all versions greater than
1.1 are backwards compatible with 1.1 this will be checked anyway.
* Remove the call to `clCreatePipe` in the `test_clone_kernel` test as
the result of this call (the pipe object) is unused. Further more
`clCreatePipe` is an optional API in OpenCL-3.0, so even if the pipe
object did have a use, support for this API would need to be queried in
the case of a OpenCL-3.0 driver where returning `CL_INVALID_OPERATION`
would be conformant behaviour. As it stands this test will incorrectly
fail for a 3.0 driver which does not support pipes.
* Correct comment regarding pipes and SVM since these features were not
actually tested in the source.
* Update `opencl_conformance_tests_21_full_spirv.csv` with
`/-offlineCompiler/--compilation-mode` and
`/cache/--compilation-cache-path` in order to match the offline
compilation options in the cts executables. Do not add the
`--compilation-cache-mode` and `--compilation-program` options since
they are user specific and the default values are generic.
* Delete `opencl_conformance_tests_generate_spirv.csv` since there is no
longer a `generate` option for offline compilation in the cts
executables.
* 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
This function is duplicated across clCopyImages files, so just keep one
definition in common file, and get rid of the duplicated ones.
Signed-off-by: Radek Szymanski <radek.szymanski@arm.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
This moves the filter_formats and get_format_list functions to a common
file. These functions were roughly the same, with an optional filtering
in some tests for testing mipmaps.
Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
* Allow CL_HALF_FLOAT denorm flushing for write tests (#452)
* On mismatch, add relaxation when denormal half result is expected
* Refactor to use common validation function
* Clean up some diagnostics
* Fix review comments
- use cl_half
- remove extraneous casts
- replace literals with sizeof()
* Document rollover trick for IsHalfSubnormal
* 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?
Removing all references to check_opencl_version as similar
get_device_cl_version() can be used instead.
Fixes#527
Change-Id: I474b6f536033707e1beb9b5b39410de24672c040
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
They are duplicate functions
Fixes#709
Change-Id: I8f7d6b8254047adb9e09ede4951dedc3ec5c1099
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>