- [x] Add `CL_DEVICE_NAME` to list of device properties printed into the
clDeviceInfo file for offline compilation testing.
- [x] Add `get_device_name` helper function.
- [x] Update offline compiler interface explanation file with
`CL_DEVICE_NAME` and `CL_DEVICE_IMAGE_SUPPORT` which was missed from
this file when added.
- [x] Add `CL_DEVICE_IMAGE_SUPPORT` to the clDeviceInfo file
which contains
device specific information for the purposes of offline compilation. For
devices with images support `CL_DEVICE_IMAGE_SUPPORT=1` is printed,
otherwise `CL_DEVICE_IMAGE_SUPPORT=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>
If a change is not added to an origin/master branch, an argument
can be used to specify the relevant branch name for the clang-format
comparison.
Change-Id: I8ce712d077bf4d048a04a29c12bc2cb45e4abb93
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@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>
* Use std::string for get_device_*_string helpers
Removes need to use BufferOwningPtr to avoid memory leaks.
* Rename get_device_info to get_device_info_string
Makes it more obvious that it should only be called for device queries
that return strings.
* Tokenize extensions in is_extension_available
Avoids the potential issue where one extension name is a prefix of
another.
* Throw exception when device info size is 0
* 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?