Commit Graph

7 Commits

Author SHA1 Message Date
Ewan Crawford
b64f429b4a Add new extensions to conformance csv files (#2096)
The extension tests in `test_conformance/extensions` have not matching
entries in the `opencl_conformance_tests_*.csv` files. This means that
they are missed from conformance runs by vendors who use these files.

I've included the new extensions in the full and quick CSV files as they
don't have vast combinations of tests to run like bruteforce or
conversions.

I've put `cl_khr_dx9_media_sharing` in the
`test_conformance/opencl_conformance_tests_d3d.csv` CSV as like the
other tests there the test binary is conditional built only on a Windows
platform.

I've created a new `opencl_conformance_tests_vulkan.csv ` file for
testing the `cl_khr_external_semaphore` extension, as creation of the
binary is conditional on the Vulkan SDK being enabled environment. Any
other tests that require the Vulkan SDK in future can also be added
there.
2024-10-08 09:58:31 -07:00
Ahmed
cdf8d5e35e Add cl_khr_kernel_clock tests (#1960)
Adds cl_khr_kernel_clock test.

Also fixes failure in the compiler defines for extension compiler
subtest when cl_khr_kernel_clock is supported.
2024-05-21 08:49:49 -07:00
Paweł Jastrzębski
63b0f441f1 Add external semaphore tests. (#1645)
* Add external semaphore tests.

Added basic test to check the functionality of cl_ext_external_semaphore_test extension.
Tests rely on Vulkan API as the producer of the external semaphore functionality. The
Vulkan wrapper has been copied from the Vulkan CTS tests and minor changes have been
introduced. A separate copy of the Vulkan wrapper is for breaking any dependencies
between different CTS modules and thus make the build system simpler.

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>

* Move vulkan wrapper to a separate library.

Vulkan wrapper is extracted as a separate module and can be used in different
CTS tests as a shared library.

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

* Add cl_ext_external_samaphore tests based on cl_khr_semaphore tests.

Added cl_khr_semaphore adjusted to creating semaphores in Vulkan context
and importing them through export semaphore functionality in OpenCL
(cl_ext_external_samaphore).

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

* Cleanup.

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

* Fix build issues.

* Add missing directories for build cl_ext_external_semaphore.

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

* Set Vulkan lib directory.

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

* Change extension directory name.

Changed extensions directory name from cl_ext_external_semaphore to cl_khr_external_semaphore.

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

* Remove unneeded compile options.

Removed VK_USE_PLATFORM_WIN32_KHR option from cl_khr_external_semaphore
compilation arguments.

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

---------

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>
2023-03-21 09:06:15 -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
Ewan Crawford
8f5a2f0ae8 Initial command-buffer extension tests (#1368)
* Initial command-buffer tests

Introduce some basic testing of the
[cl_khr_command_buffer](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_Ext.html#cl_khr_command_buffer)
extension. This is intended as a starting point from which we can iteratively build up tests
for the extension collaboratively.

* Move tests into derived classes

* Move tests from methods into derived classes implementing
  a `Run()` interface.
* Fix memory leak when command_buffer isn't freed when a test
  is skipped.
* Print correct error code for
  `CL_DEVICE_COMMAND_BUFFER_CAPABILITIES_KHR`
* Pass `nullptr` for queue parameter to command recording entry-points

* Define command-buffer type wrapper

Other OpenCL object have a wrapper to reference count their use
and free the wrapped object. The command-buffer object can't use
the generic type wrappers which are templated on the appropriate
release/retain function, as the release/retain functions are
queried at runtime.

Instead, define our own command-buffer wrapper class where a base
object is passed on construction which contains function pointers
to the release/retain functions that can be used in the wrapper.

* Use create_single_kernel_helper_create_program

Use `create_single_kernel_helper_create_program` rather than
hardcoding `clCreateProgramWithSource` to allow for other types
of program input.

Also fix bug using wrong enum for passing properties on command-buffer
creation, should be `CL_COMMAND_BUFFER_FLAGS_KHR`

* Add out-of-order command-buffer test

Introduce a basic test for checking sync-point use
with out-of-order command-buffers.

This also includes better checking of required queue properties.
2022-08-30 09:54:50 -07:00
Kévin Petit
fc67d7b28f Move media_sharing tests to test_conformance/extensions/ (#1164)
* Move media_sharing tests to test_conformance/extensions/

And rename to cl_khr_dx9_media_sharing.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>

* format code

* more format changes
2021-02-18 10:06:56 +00:00
Anastasia Stulova
ffa75c37ce Test cl_ext_cxx_for_opencl (#1095)
Add tests for API extension for compilation
of kernels in C++ for OpenCL language.
* Test that -cl-std=CLC++ is accepted and a
  basic kernel with C++ features is compiled.
* Test that API extension reports the same
  language version as __OPENCL_CPP_VERSION__.

This commit also adds a separate folder for extension
tests.

Signed-off-by: Victoria Holodovsky <victoria.holodovsky@arm.com>

Co-authored-by: Victoria Holodovsky <victoria.holodovsky@arm.com>
2021-01-12 10:17:13 +00:00