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.
* 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
* Improve Functionality of Harness
In the harness we previously were able to determine whether or
not a device supports the half or double data types, but doing so
required unintuitive function calls and would need to be repeated
per test.
A new pair of functions have been added which clearly state
what they do, and makes it easier to determine whether or not
a device supports the types.
Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com>
* Remove Old GetKernelArgInfo Tests (#522)
In the API test suite we have 2 versions which test the
clGetKernelArgInfo API. As part of this ticket we are redesigning
the implementation of this test. This change removes all of
the old code and makes it so that the tests simply pass. A later
commit will add the redesigned test
Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com>
* Redesign GetKernelArgInfo (#522)
The previous test for this API consisted of 5K+ lines
of code which would define the test kernels and the
expected outputs from this API. This redesign
instead generates the kernels and expected outputs
leading to incresased maintanability and a significantly
reduce line-of-code count.
Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com>
* [SQUASH] Address Review Comments
This commit does the following:
1) Update the Copyright to 2021
2) Fixes a typo in a comment
3) Explicitly declares a vector variable
(previously auto)
4) Output subtest result after completion rather than
all of them at the end
Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com>
* [SQUASH] Ensure Kernel Arguments do not exceed CL_DEVICE_MAX_PARAMETER_SIZE
As per upstream comments, this change ensures that the total
size of parameters passed into a kernel does not exceed the
limit specified by CL_DEVICE_MAX_PARAMETER_SIZE for the device
used.
Additionally this change replaces ASSERT_SUCCESS() with test_error()
as per upstream requests.
Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com>
* [SQUASH] Address Image and Vector Failures
This change aligns vector 3 types to be sized 4.
Additionally it ensures that image arguments do not
have the address space qualifier specified because
they are by default in the __global space.
Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com>
* [SQUASH] Ensure that the size of pipe arguments are correct
As mentioned in PR comments, the test previously assumed that
sizeof(char) == sizeof(pipe char). The Clang implementation
treats a pipe to take the same size as a pointer, which
is now reflected in the code.
Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com>
* [SQUASH] Ensure that CL_DEVICE_MAX_PIPE_ARGS is not Exceeded
This commit refactors the code so that Pipes are handled
separately.
Additionally, it removes signed char and char signed as
scalar types to test and removes some redundent code
for modifiying the expected type when processing unsigned
scalar types.
Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com>
* [SQUASH] Remove compatibility test from skip-list
There is a list of tests which should be skipped when
using an offline compiler. As get_kernel_arg_compatibility
has been removed, it should also be removed here.
Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com>
* [SQUASH] Disable Pipe Tests
This change disables the Pipe tests for clGetKernelArgInfo
as pipe metadata is not accurately reported on clang
which leads to the pipe tests failing.
Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com>
* Reformat common help text
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
* Reformat test harness code
This goes part of the way to fixing issue #625.
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
- [x] Add `CL_DEVICE_NAME` to list of device properties printed into the
clDeviceInfo file for offline compilation testing.
- [x] Add `get_device_name` helper function.
- [x] Update offline compiler interface explanation file with
`CL_DEVICE_NAME` and `CL_DEVICE_IMAGE_SUPPORT` which was missed from
this file when added.
* Use std::string for get_device_*_string helpers
Removes need to use BufferOwningPtr to avoid memory leaks.
* Rename get_device_info to get_device_info_string
Makes it more obvious that it should only be called for device queries
that return strings.
* Tokenize extensions in is_extension_available
Avoids the potential issue where one extension name is a prefix of
another.
* Throw exception when device info size is 0
This change reimplements offline compiler invocation, using a new command
line interface that allows the passing of relevant CL device information
to the offline compiler. The information that is passed is as follows:
* CL_DEVICE_ADDRESS_BITS
* CL_DEVICE_EXTENSIONS
* CL_DEVICE_IL_VERSION (with --compilation-mode=spir-v only)
* CL_DEVICE_VERSION
The interface for the offline compiler script is as follows:
usage: cl_offline_compiler --source FILE --output FILE
--cl-device-info FILE --mode MODE
-- [BUILD_OPTIONS [BUILD_OPTIONS ...]]
positional arguments:
BUILD_OPTIONS additional options to pass to the compiler
optional arguments:
--source FILE OpenCL C source file to compile
--output FILE SPIR-V or binary file to create
--cl-device-info FILE OpenCL device info file
--mode compilation mode (spir-v or binary)
The OpenCL C version for compilation is now specified in BUILD_OPTIONS,
as normal for online compilation, i.e. with -cl-std=VERSION.
Signed-off-by: Stuart Brady <stuart.brady@arm.com>