It was disabled because lack of reference implementation. However the
reference implementation exists. Then no reason to start testing these
functions.
Adds test to confirm that the timestamp returned from
clGetEventProfilingInfo for an event on a device and a device
timestamp queried from the same device are in the same timebase.
Fixes#753
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
---------
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
Fixes:
1. Multi import diff ctx subtest which acquires/releases external memory
via queue not associated with the context in which memory was imported.
2. Platform/Device info subtests to handle different platforms and
availability of the query.
glutInit double called in CTS CLGL test case code, which will lead
to an error:
freeglut (./test_gl): illegal glutInit() reinitialization attempt
root cause is in: test_conformance/gl/main.cpp:343
if (glEnv->Init(&argc, (char **)argv, CL_TRUE))
the glEnv->Init has already called in same file line:260, the function
glutInit in glEnv->Init can not be called twice, then a error will occur
although all the gl / CLGL cases are passed. Then in the full quick CTS
running it will appear:
(12-Jul 03:54:01) BEGIN OpenCL-GL Sharing :
PASSED sub-test.
PASSED 23 of 23 tests.
(12-Jul 04:01:48) FAILED OpenCL-GL Sharing : (467s, test 34/53)
Although all the gl/CLGL cases are passed, but this group test is judged
to failed.
This issue already been found in
https://github.com/KhronosGroup/OpenCL-CTS/pull/1885
And fixed partly by:
02471c8f56
But I found in setup_osx.cpp, the glutInit still has double init issue,
I add the same fix like previous fix,
can you please help to review?
Signed-off-by: Honglei Huang <Honglei1.Huang@amd.com>
Co-authored-by: Honglei Huang <Honglei1.Huang@amd.com>
All of these are already set in the top-level `CMakeLists.txt` nowadays,
so no need to repeat them in the test's own `CMakeLists.txt`.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
This will ensure consistent output on any conforming implementation.
Note that the specification does not define the output style when
precision is missing.
---------
Signed-off-by: Cui, Dele <dele.cui@intel.com>
fixes a few minor issues introduced by #1984.
edit: Tested with the updated command buffer emulation layer on a device
that supports out-of-order queues and SVM and all of the
`test_cl_khr_mutable_dispatch` tests pass.
fixes#2040
* Compiles the Vulkan SPIR-V files in a directory based off of
CMAKE_CURRENT_BINARY_DIR.
* Changes the search path for the Vulkan SPIR-V files to this directory
rather than a semi-arbitrary set of directories.
Include `cmath` instead of `math.h` in C++ mode under MSVC, to avoid
build errors inside the header. Ideally we would not condition this
on `_MSC_VER`, but issue 1833 currently prevents doing so.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
The various forms of `TestInfoBase` have many members in common, so
avoid duplicating the struct definition and move it to `common.h`.
Provide a description and initializer for every struct member, and drop
initializations done with `memset`.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
An implementation may not support exportable semaphore, subtests
available in cl_khr_external_semaphore assumes support for exportable
semaphore, resulting in failure on such implementation. Allow
implementations to use importable semaphore in such cases.
The main sources of warnings were:
* Printing of a `size_t` which requires the `%zu` specifier.
* Printing of `cl_long`/`cl_ulong` which is now done using the `PRI*64`
macros to ensure portability across 32 and 64-bit builds.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
Basic explicit_s2v:
The verification step was always using round to even when converting a
float to half even for round to zero cores.
Commonfns degrees:
The verification step was only taking into account infinities and not
values that over/underflow. This resulted in an incorrect error
calculation. E.g:
double cpu_result = 175668.85998711039;
cl_half gpu_result = 31743; // this is 65504 when converting to float,
we overflowed.
float error = (cpu_result - gpu_result) * some_factor;
The fix adds the check if( (cl_half) reference == test ) before
calculating the error.
This makes it literally impossible for drivers to constant fold the
IsTininessDetectedBeforeRounding kernel. Sure, drivers might have should
respect volatile here, but I'm not convinced this is actually required
by the spec in a very strict sense, because here there are no
side-effects possible in the first place.
And as far as I know, constant folding is allowed to give different
results than an actual GPU calculation would.
In any case, passing the constants via kernel arguments makes this
detection more reliable and one doesn't have to wonder why the fma test
is failing.
Side note: this was the last bug (known as of today) I had to fix in
order being able to make a CL CTS submission for Apple Silicon devices.
1. Fix memory leak by making `context2` use the context wrapper.
2. Create two separate events to associate with the two calls to
`clEnqueueSignalSemaphoresKHR()`, as events cannot be reused.
Also delete the unused helper function
`semaphore_external_cross_queue_helper()` (which was a duplicate of
`external_semaphore_cross_queue_helper()` anyway).
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.
Skip the correctly rounded divide (divide_cr) and sqrt (sqrt_cr) tests
for fp16 and fp64.
The corresponding build option to enable correctly rounded divide and
sqrt is named `-cl-fp32-correctly-rounded-divide-sqrt` and the
description refers only to "single precision floating-point", so this
option should not apply to fp16 or fp64.
The specification states that fp16 and fp64 divide and sqrt must be
correctly rounded for the full profile, without needing any additional
build options. This is already tested by the regular divide and sqrt
tests. For the embedded profile the ULP requirement is non-zero, but
there is no build option to request a correctly rounded implementation
anyway.
Fixes https://github.com/KhronosGroup/OpenCL-CTS/issues/1901 .
Relates to https://github.com/KhronosGroup/OpenCL-CTS/issues/1996 .
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
The kernel_read_write tests have a lot of duplicate code. These are the
next steps to reducing the duplication, by using the functions in
test_common.cpp as common for 1D, 1D array and 2D array.
---------
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
Co-authored-by: Ahmed Hesham <117350656+ahesham-arm@users.noreply.github.com>
The math_brute_force test has a link-check-only mode to quickly test if
all math functions are present.
In link-check-only mode, most tests return immediately after kernel
compilation, but some tests also run the kernel and read back the result
data before returning. Running the kernels takes a lot more time,
defeating the purpose of the `-l` mode.
Break out at the start of the main `for` loops in link-check-only mode
instead of returning directly, so that each test can still log its
trailing message (in most cases just a `\n`).
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
The handling of NaN values in the templated function was incorrect due
to improper initialization of the input data source. Specifically, the
function ZeroNanToIntCases used a global pointer gIn, which was not
correctly set or did not point to the same data as the local input
pointer s used in the non-templated implementation.
to solve the issue I updated the templated function ZeroNanToIntCases to
take an additional parameter for the input data source.
and then passed the correct input data (s) to the templated function
during its invocation.
Co-authored-by: Banan Ashkar <banan.ashkar@mobileye.com>