* updated reduce test
* switched all reduce tests to new framework
* switch over scans to new framework
* remove old files
* minor fixes
* add type type name to the kernel name
* fix Windows build and warnings
* address review comments
As per the OpenCL Extension Specification § 38.6 Ballots:
If no bits representing predicate values from all work items in
the subgroup are set in the bitfield value then the return value
is undefined.
The case with no bits set is still worth testing, as it does not result
in undefined behavior, but only an undefined return value.
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
Test cases where the index/mask/delta is greater than or equal to the
maximum subgroup size. These are cases that return undefined results
but are not undefined behavior.
The index/mask/delta values now include values less than twice the
subgroup size, and 0xffffffff.
Testing for sub_group_shuffle_xor() already allowed inputs that were
greater or equal to the subgroup size for the last subgroup in a
workgroup, but did not properly account for this in the verification
function, potentially resulting in out of bounds accesses.
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
`master` is now `main`, so update `check-format.sh` accordingly.
Also completely drop the Travis badge as we now use GitHub actions. There is
no replacement badge as the current action is pre-submission, not
post-submission.
The test now checks that CL_KERNEL_ARG_INFO_NOT_AVAILABLE is returned
when calling clGetKernelArgInfo() with offline compilation modes.
The correct function name is printed if clGetKernelArgInfo() fails
when using online compilation (and not "clSetKernelArgInfo()").
When using online compilation, if the actual arg type is not as
expected, the actual arg type is now logged, and the return value
is now TEST_FAIL (-1) as per other failures (and not 1).
All other test pass/fail values used in the test now use TEST_PASS
and TEST_FAIL instead of 0 and -1 literals.
An unnecessary cast of pipe_kernel_code has been removed.
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
This changes compilation of subgroup test kernels so that a separate
compilation is no longer performed for each divergence mask value.
The divergence mask is now passed as a kernel argument.
This also fixes all subgroup_functions_non_uniform_arithmetic testing
and the sub_group_elect and sub_group_any/all_equal subtests of the
subgroup_functions_non_uniform_vote test to use the correct order of
vector components for GPUs with a subgroup size greater than 64.
The conversion of divergence mask bitsets to uint4 vectors has been
corrected to match code comments in WorkGroupParams::load_masks()
in test_conformance/subgroups/subhelpers.h.
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
* Fix test_api get_command_queue_info
Decouple host and device out-of-order test enabling
* Rename property sets more generically
* Refactor to use std::vector to accumulate test permutations
* Set safe input values for half type and mul, add operations
* Set safe values for all data types
* Typo fix
* Set constant seed for shuffle
* Change function name to more specific
* set_value takes an integer value, not a bit pattern
Remove unused code that hasn't been used for the last three years
and isn't included in makefiles.
Co-authored-by: oramirez <oramirez@qti.qualcomm.com>
Note that this also corrects the start messages logged for the
sub_group_ballot_bit_count/find_msb/find_lsb tests.
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
* test api - fix code formatting only
* Fix printing cl_ulong type to avoid overloading.
* Fix printing size_t data type
* Fix printing size_t data type - set unsinged
* Fix formatting for maxArgs (uint) and numberOfInts (size_t)
It seems more intuitive to set only the bits that are required, rather
than to set one more bit than is required, only to clear it again.
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
sub_group_ballot_bit_count() and sub_group_ballot_find_msb() mask
their input according to a subgroup size, which is assumed to be the
maximum subgroup size, and not the actual subgroup size excluding
non-existent work-items in the "remainder" subgroup.
Fix this as per the the clarification made to the OpenCL C specification
in revision 3.0.9 for issue KhronosGroup/OpenCL-Docs#626 by pull request
KhronosGroup/OpenCL-Docs#689.
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
The way that program sources were being constructed involved capturing
pointers to strings that were allocated on the stack, and then trying
to use them outside of that scope. This change uses a stringstream
defined in the outer scope to build the program instead.
The tests were logging scalar results as vectors padded with zeroes for
no apparent benefit. Fix this.
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
* Extended subgroups - use 128bit masks
* Refactoring to avoid kernels code duplication
* unification kernel names as test_ prefix +subgroups function name
* use string literals that improve readability
* use kernel templates that limit code duplication
* WorkGroupParams allows define default kernel - kernel template for multiple functions
* WorkGroupParams allows define kernel for specific one subgroup function
Co-authored-by: Stuart Brady <stuart.brady@arm.com>
* Report unsupported extended subgroup tests as skipped rather than passed
Also don't check the presence of extensions for each sub-test.
Signed-off-by: Kévin Petit <kpet@free.fr>
* address review comments
* Update cl_khr_integer_dot_product tests for v2
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
Signed-off-by: Marco Cattani <marco.cattani@arm.com>
Change-Id: I97dbd820f1f32f6b377e47d0bf638f36bb91930a
* only query acceleration properties with v2+
Change-Id: I3f13a0cba7f1f686365b10adf81690e089cd3d74
* gles: Fix double frees.
Remove a few explicit frees in the redirect_buffers test which are
already handled by a wrapper.
* gles: Fix double frees
A recent update to the object wrapper classes (#1268) changed the
behavior of assigning to a wrapper, whereby the wrapped object is now
released upon assignment. A couple of tests were manually calling
clReleaseMemObject and then assigning `nullptr` to the wrapper,
resulting in the wrapper calling clReleaseMemObject on an object that
had already been destroyed.
Co-authored-by: spauls <spauls@qti.qualcomm.com>
* Fix memory model issue in atomic_flag.
In atomic_flag sub-tests that modify local memory, compilers may re-order memory accesses between the local and global address spaces which can lead to incorrect test failures.
This commit ensures that both local and global memory operations are fenced to prevent this re-ordering from occurring.
Fixes#134.
* Clang format changes.
* Added missing global acquire which is necessary for the corresponding global release.
Thanks to @jlewis-austin for spotting.
* Clang format changes.
* Match the condition for applying acquire/release fences.