Commit Graph

23 Commits

Author SHA1 Message Date
Kamil-Goras-Mobica
b1dfe8a640 Add testing for CL_KERNEL_LOCAL_MEM_SIZE #1235 (#2089)
#1235
2024-10-29 08:55:46 -07:00
Kamil-Goras-Mobica
bcd54787e7 Added fp16 and fp64 api consistency tests (#2058)
#1578
2024-10-01 08:51:37 -07:00
Kamil-Goras-Mobica
746544af80 Strengthen testing of CL_DEVICE_TYPE query and use of CL_DEVICE_TYPE* (#1977)
Issue: #1930
2024-08-20 08:54:06 -07:00
ellnor01
995e46590e Add clSetCommandQueueProperty test (#1182)
Add test to check that clSetCommandQueueProperty
successfully changes command queue properties.

Fixes #904

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
2024-08-06 09:31:01 -07:00
Ewan Crawford
8e6c519354 Negative test for CL_INVALID_QUEUE_PROPERTIES (#1935)
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.
2024-06-25 09:40:32 -07:00
David Tobolik
61a220ff33 fix: move suggested_local_size to test_api (#1916) 2024-04-16 08:49:24 -07:00
Paweł Jastrzębski
e882a3dc5e Move semaphore tests from api to extensions (#1646)
* Move semaphore tests from api to extensions

Moved cl_khr_semaphore tests from core api tests to a separate
extension test as suggested in
https://github.com/KhronosGroup/OpenCL-CTS/issues/1588 .

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>

* Fix clang-format

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>

* Remove unneeded comment.

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>

---------

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>
2023-03-07 09:00:16 -08:00
Marco Cattani
18dbf2f1c1 Added initial set of tests for the cl_khr_semaphore extension (#1428)
* Added initial set of tests for the cl_khr_semaphore extension

* Fixes to address first round of reviews for cl_khr_semaphore tests
2022-11-15 09:18:43 -08:00
Chetan Mistry
71e2681414 Add Test for CL_KERNEL_ATTRIBUTES (#832) (#1055)
* 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>
2021-05-13 09:20:45 +01:00
Chetan Mistry
a43d96de69 Redesign clGetKernelArgInfo (#522) (#1056)
* 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>
2021-05-13 09:18:12 +01:00
Chetan Mistry
f6b501352d Implement Negative Test for Platform Layer Functions (#1076)
* 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>
2021-02-05 16:36:16 +00:00
ellnor01
5ae5e7a1fa Remove imageSupportRequired parameter to runTestHarness (#1077)
* Tests requiring image support use runTestHarnessWithCheck

Removing special case for images in runTestHarness.

Fixes #710

* Remove imageSupportRequired argument

Tests which require image support now specify this while
calling runTestHarnessWithCheck.

Fixes #710

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
2020-12-09 16:12:40 +00:00
James Price
f22e3a31d0 Fixes for kernel private memory size test (#1053)
* 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
2020-11-10 10:01:04 +00:00
Ben Ashbaugh
a9d06dcd81 add a basic test for CL_PIPE_PROPERTIES (#995) 2020-09-30 15:18:55 +01:00
Ben Ashbaugh
951d010eaf add a new test to verify reported image formats (#963) 2020-09-28 00:22:49 +01:00
Ben Ashbaugh
75ce4c5b0e API Feature Consistency Test, Part 2 (#912)
* added pipes test
clang-format fixes

* simplify diffs

* added pipes test
clang-format fixes

* simplify diffs

* add Program Scope Global Variables consistency test

* switched other checks to test_assert_error

* add non-uniform work group consistency test

* added read-write images consistency test

* add Creating 2D Images from Buffers consistency test

* add Device and Host Timer Synchronization consistency test

* add Intermediate Language Programs consistency test

* add Subgroups consistency test

* add Program Initialization and Clean-Up Kernels consistency test

* add 3D Image Writes consistency test

* clang-format fixes

* switch the check for 3D image writes extension for clarity

* add Depth Images consistency test

* update test for CL_QUEUE_SIZE, must return CL_INVALID_COMMAND_QUEUE

* formatting fixes

* fix copy-paste typo

* change expected error codes to CL_INVALID_OPERATION

* address review comments

* fix formatting

* address review feedback

Since pipes are cl_mems, We can spec and test that clGetPipeInfo
returns CL_INVALID_OPERATION when pipes are not supported by
passing a non-pipe memory object to the function.

* use the CTS framework to choose the OpenCL C version

* address review feedback
2020-09-08 17:24:09 +01:00
Kévin Petit
f06e1896a8 Test that queues are flushed by clReleaseCommandQueue (#923)
... 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>
2020-09-01 10:27:27 +01:00
Ben Ashbaugh
e075026819 test CL_QUEUE_ARRAY_PROPERTIES query (#925)
* 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>
2020-09-01 10:16:18 +01:00
Ben Ashbaugh
f966212f2b API Feature Consistency Test, Part 1 (#875)
* 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
2020-08-19 14:48:15 +01:00
Grzegorz Wawiorko
185c02a700 Test against clCreateBufferWithProperties and clCreateImageWithProperties OpenCL 3.0 API (#857)
* 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
2020-08-18 17:06:09 +01:00
Ben Ashbaugh
fb2119eb87 add a test for clSetContextDestructorCallback (#861)
* add a test for clSetContextDestructorCallback

* add a 10 second timeout for mem object and context destructor callbacks

* clang-format fixes

* address review comments
2020-08-10 22:21:37 +01:00
alan-baker
5ec04da102 Add a test that clSetKernelArg does not retain the arg (#665)
* Add `retain_mem_object_set_kernel_arg` to test that calling
clSetKernelArg with a cl_mem object does not retain that mem object
2020-03-11 10:09:51 +00:00
James Price
40f50d77a3 Rename test .c sources to .cpp where necessary (#604)
Remove hacks to force language from CMake files.

Closes KhronosGroup/OpenCL-CTS#25
2020-02-21 17:34:31 +00:00