Make the number of work-items proportional to size of the allocation so
we launch more work-items and do less work per work-item as buffer sizes
go up with device capabilities.
To test:
test_allocations multiple 5 buffer
test_allocations single 5 buffer
test_copy_1D.cpp: num_mip_levels is a cl_uint, so don't cast and just
print using `%u`.
test_pipe_info.cpp: arg_type_qualifier is a 64-bit wide bitfield, so
print in hexadecimal format using the correct length modifier.
test_device_partition.cpp: it is not clear what the bit width of
`cl_device_partition_property` should be, so cast the operands to align
with the format specifiers.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
Some conformance tests use directly the size returned by the runtime
for max memory size to allocate buffers.
This doesn't leave enough memory for the system to run the tests.
* Increase the number of work items used by the allocations test
The test uses a fixed number of work items to process very large
buffers and images. As devices support more and more memory, this
leads to an ever-increasing amount of work done in each work item.
This results in some implementations and devices hitting timeout
issues.
Furthermore, a greater number of work items can provide performance
benefits on some devices.
Long term, this test should be redesigned to scale the number
of threads dynamically as a function of the max allocation size.
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
* formatting and add parentheses
---------
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
Only disable `-Wsign-compare` for tests that do not compile cleanly
with this warning enabled. Re-enable the warning for the other tests,
so that it can catch any new occurrences.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
All of these if-else chains compare against enums, which is better
done using switch statements. This helps avoid some
`-Wsometimes-uninitialized` warnings of variables that are assigned
inside the switch.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
* allocations: Run buffer non-blocking even without images
Testing buffer non-blocking should not be dependent on whether images
are supported by a device or not.
* allocations: Fix typos
Add size_t overflow contingency code for 32-bit platforms where
max_width,max_height are 64k each. The code is modified to avoid
the overflowing multiplication.
Signed-off-by: John Kesapides <john.kesapides@arm.com>
Some of the setup functionality is already there in the test harness, so
use that and remove the duplicated code from within the suite.
Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>