GCC 11.2.0 warns about a possible string overflow (when
num_not_supported_extensions+num_of_supported_extensions == 0)
since no space would be allocated for the terminating
null byte that string manipulation fns expect to find.
This unconditionally adds an extra byte to the allocation to silence
the warning and fix building with -Werror.
The slice pitch/padding calculation assumed that the 'height' variable contained the pixel height of the image, which it doesn't for IMAGE1D_ARRAY.
Fixes#1257
Fill in the placeholder readme with some basic information on building and
running the project. Information on the conformance submission process and
contributing are also included.
Should help close a few issues referenced in
https://github.com/KhronosGroup/OpenCL-CTS/issues/1096
I don't think this is all the information we want, but is a starting point
from which we can progress. For example, adding the android build instructions
from https://github.com/KhronosGroup/OpenCL-CTS/pull/1021
* images: Stop checking gDeviceType != CL_DEVICE_TYPE_GPU
If the device type also advertises CL_DEVICE_TYPE_DEFAULT (which should
be valid), this causes it to be considered a CPU device and the tests
enforce different precision and rounding expectations.
* Fix clang-format
* Drop redundant NORM_OFFSET checks
- Add one Windows build to Github Actions
- Remove Appveyor config
- Move a few build steps out of the script
- Use Ninja as the generator (makes for more readable logs)
- Add build cache (except on Windows where it seems to break)
Change-Id: Ida90ee1842af98aff86e5144ab7b9766480378c9
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
* Change memory order and scope for atomics that gate final results being stored.
memory_order_acq_rel with memory_scope_device is now used to guarantee that the correct memory consistency is observed before final results are stored.
Previously it was possible for kernels to be generated that all used relaxed memory ordering, which could lead to false-positive failures.
Fixes#1370
* Disable atomics tests with global, in-program atomics.
If the device does not support `memory_order_relaxed` or `memory_scope_device`, disable atomics tests that declare their atomics in-program with global memory.
There is now an implicit requirement to support `memory_order_relaxed` and `memory_scope_device` for these tests.
* Fix misplaced parentheses.
* Change memory scope for atomic fetch and load calls in kernel
Change the memory scope from memory_scope_work_group to
memory_scope_device so the ordering applies across all work items
Co-authored-by: Sreelakshmi Haridas <sharidas@quicinc.com>
* imageHelpers: add CL_UNORM_SHORT_{555, 565} in get_max_absolute_error
Working on a device supporting CL_UNORM_SHORT_565 image data type, I
noticed that the max absolute error authorized was not the right one
for such image data type.
Also because of normalization, there is always an absolute error
authorized whatever the filtering of the sampler.
Ref #1140
* put back if statement on filter_mode
* Fix clang 10 build errors
Lossy casts due to inexact float representation of CL_INT_MAX
* Fix clang format
* Remove implicit-const-int-float-conversion flag
* 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>