* Using helper functions for clCreateKernel
Uses of clCreateKernel following create program helper
functions, have been incorporated into
create_single_kernel_helper when suitable.
Contributes #31
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
* Skip tests using clCompileProgram in offline mode
Contributes #31
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
* Using type wrappers when using kernel helper functions
Also includes fix for windows build
Fixes#31
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
* Remove clReleaseKernel for wrapped kernel
Fixes#31
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
In this test we repeated call create_single_kernel_helper
to create different kernels but reuse the same clProgramWrapper.
create_single_kernel_helper() creates a new program each time it
is called, creating a new reference on the underlying context.
When the test ends, the program is released (as it should when
using the clProgramWrapper), however there are multiple program
objects attached to the context resulting in reference leak errors.
Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com>
* Making object queries tests exhaustive
Tests which were only testing fixed values have been made exhaustive
and refactored. They only use properties from the core spec.
Associated Macros have been turned into templated functions.
Comparison of devices with cl_device_id rather than vendor ids.
All object queries tests are now in test_queries.cpp.
Fixes#508
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
* Remove unnecessary arguments from test_queries.cpp functions
Fixes#508
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
* Using test_assert_error in test_queries.cpp
This commit also fixes the queue properties array and
corrects for on device queues being optional in CL3.0
test_queries_compatibility.cpp has been removed as
tests are now in test_queries.cpp
Contributes #508
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
* Correct api test boolean for device queue support
Contributes #508
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
* 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>
* Add kernel private memory size to CMake build
* Fix kernel private memory size build error
* Use uint for kernel private memory size test
Not all devices support 64-bit types.
* Register kernel private memory size test
Implement a test to ensure that the CL_KERNEL_PRIVATE_MEM_SIZE
flag for clGetKernelWorkGroupInfo passes.
Change-Id: Ibd6d64d185c00ddbd23467692717c534498bb901
Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com>
In embedded profile with cles_khr_int64 support,
the test did not consider the size of long. Thus the
number of argument computation was not coherent with
the returned CL_DEVICE_MAX_PARAMETER_SIZE leaded to test failure.
We fix this by taking the size of long when cles_khr_int64
is available in the device extension.
* added pipes test
clang-format fixes
* simplify diffs
* added pipes test
clang-format fixes
* simplify diffs
* add Program Scope Global Variables consistency test
* switched other checks to test_assert_error
* add non-uniform work group consistency test
* added read-write images consistency test
* add Creating 2D Images from Buffers consistency test
* add Device and Host Timer Synchronization consistency test
* add Intermediate Language Programs consistency test
* add Subgroups consistency test
* add Program Initialization and Clean-Up Kernels consistency test
* add 3D Image Writes consistency test
* clang-format fixes
* switch the check for 3D image writes extension for clarity
* add Depth Images consistency test
* update test for CL_QUEUE_SIZE, must return CL_INVALID_COMMAND_QUEUE
* formatting fixes
* fix copy-paste typo
* change expected error codes to CL_INVALID_OPERATION
* address review comments
* fix formatting
* address review feedback
Since pipes are cl_mems, We can spec and test that clGetPipeInfo
returns CL_INVALID_OPERATION when pipes are not supported by
passing a non-pipe memory object to the function.
* use the CTS framework to choose the OpenCL C version
* address review feedback
... as required by the OpenCL specification.
Also introduce a utility function to manage polling for changes
via a user-supplied function. Several tests we introduced lately
could have used this.
Signed-off-by: Kévin Petit <kpet@free.fr>
* OpenCL 3.0 test CL_QUEUE_PROPERTIES_ARRAY
* add verification if requested_size <= CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE
* remove test_case - set NULL properties, get not empty array with 0 terminator
* add printing test_case description
* change logic of checking if requested properties are supported by device
depending on host/device type queue.
* fix a few bugs, rename test for consistency
* add utility function for comparing properties
Co-authored-by: Grzegorz Wawiorko <grzegorz.wawiorko@intel.com>
* add api consistency test for Shared Virtual Memory
* add memory model and device enqueue consistency tests
* added pipes test
clang-format fixes
* simplify diffs
* add negative tests for when features are not supported
Previously, this test emitted warnings in the log if a feature
wasn't supported and a query or API call didn't generated the
expected value. After this change, these tests will fail if
a query or API call does not generate the expected value or
error condition.
* switch handling of expected error codes to test_failure_error
* fix formatting
* use valid pipe creation parameters
* remove calls to clFinish as per review comments
* purposefully pass a bogus pointer to SVM free functions
* fix pointer passed to clEnqueueSVMFree
* change the bogus pointer to a known bit pattern
* Test against clCreateBufferWithProperties and clCreateImageWithProperties OpenCL 3.0 API
* Test against clCreateBufferWithProperties and clCreateImageWithProperties - review fixes
* Do not use enum query_type
* Fix test success/failure conditions
* Fix test_mem_object_properties_queries.cpp build error.
* Review Fix test_mem_object_properties_queries.cpp
* add a test for clSetContextDestructorCallback
* add a 10 second timeout for mem object and context destructor callbacks
* clang-format fixes
* address review comments
* Skip sub_group_dispatch.
If sub groups aren't supported, skip the test.
* Do not test for cl_khr_subgroups as the extension requires IFP.
3.0 allows sub groups *without* IFP so the check was invalid.
* 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
* 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.
enqueue_kernel was being run when the cl_khr_create_command_queue was *not* present. The test should only be run when the extension *is* present.
Regressed in 93e76a8a4a.
(Patch1)
A number of tests have got their own code for checking the presence of
extensions. This change replaces that code with is_extension_available
function.
Contributes to #627
Change-Id: I8dd2233719aa8c84841ac61776437d7f6e3fafe6
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
The test enqueues kernel and requests event associated with its
execution, but then never releases the event.
Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
code for test_api sub_group_dispatch. Although subgroups
is a core feature there is no separate 2.1 language spec
so we use the 2.0 with the pragma.
Signed-off-by: John Kesapides <john.kesapides@arm.com>
* 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