Call `getAllowedUlpError` to obtain the allowed ULP error for all of the
double type (fp64) tests. The aim is to standardise obtaining the
desired ULP requirement and pave the way for adding the Embedded Profile
ULP errors.
Contributes to https://github.com/KhronosGroup/OpenCL-CTS/issues/867
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
Remove the `CREATE_OPENCL_SEMAPHORE` macro and use derived class
instantiations of the `clExternalSemaphore` class, rather than base
pointers to derived class objects.
Remove the default argument for `queryParamName` in
`check_external_semaphore_handle_type()`.
Move `check_external_semaphore_handle_type()` checks to constructors of
`clExternalImportableSemaphore` and `clExternalExportableSemaphore`,
rather than manually making the check before creating an external
semaphore.
---------
Signed-off-by: Gorazd Sumkovski <gorazd.sumkovski@arm.com>
Co-authored-by: Kévin Petit <kpet@free.fr>
Co-authored-by: Kevin Petit <kevin.petit@arm.com>
Using C++17's `if constexpr` avoids Wformat warnings in this template
function, as it is now made explicit that the various format strings are
only used with appropriate types.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
Support for optimally-tiled images and tiling inference in general is
implementation-defined. It should not be relied upon in the CTS.
Also build the code base as C++17 for std::optional. Many Khronos
projects are now using C++17 and the transition in the CTS is IMO
overdue.
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
After https://github.com/KhronosGroup/SPIRV-Tools/pull/6027 spirv-val is
now rejecting `Aligned 0` Memory Operands. This causes the spirv_new
test binary to no longer build with a recent SPIRV-Tools version.
Mechanically remove all occurrences of `Aligned 0` in the SPIR-V
assembly files.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
This change mainly extends `clFillImage` and `clCopyImage` test function
to include memory flags to be used during creating the image instead of
hard-coding these values. The memory flags are also different parameters
for source and destination images in `clCopyImage` tests.
---------
Signed-off-by: Michael Rizkalla <michael.rizkalla@arm.com>
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
We noticed such issue
expected: ^(K{C, -30304.8, -22634.574219, 24476.882812, E4929EC2,
1467582223, 96vL.+
got: ^(K{C, -30304.8, -22634.574219, 24476.882813, E4929EC2, 1467582223,
96vL.+
The input value is 24476.882812 and cannot be precisely represented as a
single-floating point, so compilers are allowed to round it to the
nearest representable value. In this case, the closest representable
value to 24476.882812 is 24476.8828125, which rounds to 24476.882813.
Even some versions of MSVC prints that value as 24476.882813 and some
24476.882812 : https://godbolt.org/z/5GhEf8KPT
The proposal is to set precisely how many number should be displayed to
avoid rounding.
Fix all `-Wformat` warnings in the basic test suite, and re-enable the
warning.
---------
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
The test is using CL_DEVICE_MAX_WORK_GROUP_SIZE as first dimension of
local work size. But it can be bigger than the first dimension of
CL_DEVICE_MAX_WORK_ITEM_SIZEs which results in failure.
This patch corrects it to query and use the first dimension of
CL_DEVICE_MAX_WORK_ITEM_SIZES instead.
Signed-off-by: Xing Huang <xing.huang@arm.com>
Fix warnings such as:
test_vloadstore.cpp:330:49: error: format string is not a string literal
(potentially insecure)
There were no security issues here as the format string arguments do not
contain any conversion specifiers and are never written to. Make that
latter fact explicit to avoid the warnings.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
Reflects the changes to the specification:
https://github.com/KhronosGroup/OpenCL-Docs/pull/1318
Relaxed embedded exp and exp2 ulps will be 4 + floor(fabs(2 * x)).
Reciprocal and divide are unchanged because the code already handles the
embedded profile case, see unary_float.c and binary_operator_float.c.
---------
Co-authored-by: Sven van Haastregt <sven.vanhaastregt@arm.com>