Test that verifies `CL_INVALID_QUEUE_PROPERTIES` is returned from
`clCreateCommandQueue`, `clCreateCommandQueueWithProperties`, and
`clCreateCommandQueueWithPropertiesKHR` to match spec wording
> CL_INVALID_QUEUE_PROPERTIES if values specified in properties are
valid but are not supported by the device.
* 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>
* Add Test for CL_KERNEL_ATTRIBUTES (#832)
This test generates dummy kernels which have any
permutation combining the following attributes:
* vec_type_hint
* work_group_size_hint
* reqd_work_group_size
It then gets the attributes by using clGetKernelInfo
and validates that the attributes returned are correct.
By matching the attributes which were used to generate
the kernel are present in the returned string from
clGetKernelInfo.
This test has been implemented as part of the
test_conformance/api suite.
Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com>
* [SQUASH] Remove Signed Vector Attribute Hints
As per comments, SPIR-V does not distinguish the signedness
of an argument. This change removes the "signed" types
to ensure that the test passes in all scenarios.
Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com>
* [SQUASH] Add TODO for Signed Vector Hints
As the current version only tests for unsigned
vector types (uchar/uint/etc), add a TODO in the code
as a reference to future work to introduce signed vector
tests
Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com>
* 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>
* Implement Negative Tests for clPlatform Functions
This change introduces negative tests for clPlatform
functions as well as changes to the Harness to help with
other negative tests.
Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com>
* [SQUASH] Remove magic macro from Negative Platform Tests
This change removes the negative-testing macro and all
other changes related to its usage.
Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com>
* Making object queries tests exhaustive
Tests which were only testing fixed values have been made exhaustive
and refactored. They only use properties from the core spec.
Associated Macros have been turned into templated functions.
Comparison of devices with cl_device_id rather than vendor ids.
All object queries tests are now in test_queries.cpp.
Fixes#508
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
* Remove unnecessary arguments from test_queries.cpp functions
Fixes#508
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
* Using test_assert_error in test_queries.cpp
This commit also fixes the queue properties array and
corrects for on device queues being optional in CL3.0
test_queries_compatibility.cpp has been removed as
tests are now in test_queries.cpp
Contributes #508
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
* Correct api test boolean for device queue support
Contributes #508
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
* Add kernel private memory size to CMake build
* Fix kernel private memory size build error
* Use uint for kernel private memory size test
Not all devices support 64-bit types.
* Register kernel private memory size test
... as required by the OpenCL specification.
Also introduce a utility function to manage polling for changes
via a user-supplied function. Several tests we introduced lately
could have used this.
Signed-off-by: Kévin Petit <kpet@free.fr>
* OpenCL 3.0 test CL_QUEUE_PROPERTIES_ARRAY
* add verification if requested_size <= CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE
* remove test_case - set NULL properties, get not empty array with 0 terminator
* add printing test_case description
* change logic of checking if requested properties are supported by device
depending on host/device type queue.
* fix a few bugs, rename test for consistency
* add utility function for comparing properties
Co-authored-by: Grzegorz Wawiorko <grzegorz.wawiorko@intel.com>
* add api consistency test for Shared Virtual Memory
* add memory model and device enqueue consistency tests
* added pipes test
clang-format fixes
* simplify diffs
* add negative tests for when features are not supported
Previously, this test emitted warnings in the log if a feature
wasn't supported and a query or API call didn't generated the
expected value. After this change, these tests will fail if
a query or API call does not generate the expected value or
error condition.
* switch handling of expected error codes to test_failure_error
* fix formatting
* use valid pipe creation parameters
* remove calls to clFinish as per review comments
* purposefully pass a bogus pointer to SVM free functions
* fix pointer passed to clEnqueueSVMFree
* change the bogus pointer to a known bit pattern
* Test against clCreateBufferWithProperties and clCreateImageWithProperties OpenCL 3.0 API
* Test against clCreateBufferWithProperties and clCreateImageWithProperties - review fixes
* Do not use enum query_type
* Fix test success/failure conditions
* Fix test_mem_object_properties_queries.cpp build error.
* Review Fix test_mem_object_properties_queries.cpp
* add a test for clSetContextDestructorCallback
* add a 10 second timeout for mem object and context destructor callbacks
* clang-format fixes
* address review comments
The diff between the compatibility and non-compatibility tests
is rather big. These tests should both be replaced by a new
maintainable one (see #522).
Contributes to #494.
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
...and mark tests that exercise new-style entrypoints as requiring 2.0
These tests give us (or rather will give us once made exhaustive, see
#508) coverage for both new-style and old-style creation entrypoints,
making the entrypoint used in other tests irrelevant as long as the
old-style entrypoints are required to be implemented.
Signed-off-by: Kévin Petit <kpet@free.fr>