Commit Graph

1058 Commits

Author SHA1 Message Date
Nikhil Joshi
dbd33bc9cf External sharing new updates (#1482)
* Fix enqueue_flags test to use correct barrier type.

Currently, enqueue_flags test uses CLK_LOCAL_MEM_FENCE.
Use CLK_GLOBAL_MEM_FENCE instead as all threads across work-groups
need to wait here.

* Add check for support for Read-Wrie images

Read-Write images have required OpenCL 2.x.
Read-Write image tests are already being skipped
for 1.x devices.
With OpenCL 3.0, read-write images being optional,
the tests should be run or skipped
depending on the implementation support.

Add a check to decide if Read-Write images are
supported or required to be supported depending
on OpenCL version and decide if the tests should
be run on skipped.

Fixes issue #894

* Fix formatting in case of Read-Write image checks.

Fix formatting in case of Read-write image checks.
Also, combine two ifs into one in case of
kerne_read_write tests

* Fix some more formatting for RW-image checks

Remove unnecessary spaces at various places.
Also, fix lengthy lines.

* Fix malloc-size calculation in test imagedim

unsigned char size is silently assumed to be 1
in imagedim test of test_basic.
Pass sizeof(type) in malloc size calculation.
Also, change loop variable from signed to unsigned.
Add checks for null pointer for malloced memory.

* Initial CTS for external sharing extensions

Initial set of tests for below extensions
with Vulkan as producer
1. cl_khr_external_memory
2. cl_khr_external_memory_win32
3. cl_khr_external_memory_opaque_fd
4. cl_khr_external_semaphore
5. cl_khr_external_semaphore_win32
6. cl_khr_external_semaphore_opaque_fd

* Updates to external sharing CTS

Updates to external sharing CTS
1. Fix some build issues to remove unnecessary, non-existent files
2. Add new tests for platform and device queries.
3. Some added checks for VK Support.

* Update CTS build script for Vulkan Headers

Update CTS build to clone Vulkan Headers
repo and pass it to CTS build
in preparation for external memory
and semaphore tests

* Fix Vulkan header path

Fix Vulkan header include path.

* Add Vulkan loader dependency

Vulkan loader is required to build
test_vulkan of OpenCL-CTS.
Clone and build Vulkan loader as prerequisite
to OpenCL-CTS.

* Fix Vulkan loader path in test_vulkan

Remove arch/os suffix in Vulkan loader path
to match vulkan loader repo build.

* Fix warnings around getHandle API.

Return type of getHandle is defined
differently based on win or linux builds.
Use appropriate guards when using API
at other places.
While at it remove duplicate definition
of ARRAY_SIZE.

* Use ARRAY_SIZE in harness.

Use already defined ARRAY_SIZE macro
from test_harness.

* Fix build issues for test_vulkan

Fix build issues for test_vulkan
1. Add cl_ext.h in common files
2. Replace cl_mem_properties_khr with cl_mem_properties
3. Replace cl_external_mem_handle_type_khr with
cl_external_memory_handle_type_khr
4. Type-cast malloc as required.

* Fix code formatting.

Fix code formatting to
get CTS CI builds clean.

* Fix formatting fixes part-2

Another set of formatting fixes.

* Fix code formatting part-3

Some more code formatting fixes.

* Fix code formatting issues part-4

More code formatting fixes.

* Formatting fixes part-5

Some more formatting fixes

* Fix formatting part-6

More formatting fixes continued.

* Code formatting fixes part-7

Code formatting fixes for image

* Code formatting fixes part-8

Fixes for platform and device query tests.

* Code formatting fixes part-9

More formatting fixes for vulkan_wrapper

* Code formatting fixes part-10

More fixes to wrapper header

* Code formatting fixes part-11

Formatting fixes for api_list

* Code formatting fixes part-12

Formatting fixes for api_list_map.

* Code formatting changes part-13

Code formatting changes for utility.

* Code formatting fixes part-15
Formatting fixes for wrapper.

* Misc Code formatting fixes

Some more misc code formatting fixes.

* Fix build breaks due to code formatting

Fix build issues arised with recent
code formatting issues.

* Fix presubmit script after merge

Fix presubmit script after merge conflicts.

* Fix Vulkan loader build in presubmit script.

Use cmake ninja and appropriate toolchain
for Vulkan loader dependency to fix
linking issue on arm/aarch64.

* Use static array sizes

Use static array sizes to fix
windows builds.

* Some left-out formatting fixes.

Fix remaining formatting issues.

* Fix harness header path

Fix harness header path
While at it, remove Misc and test pragma.

* Add/Fix license information

Add Khronos License info for test_vulkan.
Replace Apple license with Khronos
as applicable.

* Fix headers for Mac OSX builds.

Use appropriate headers for
Mac OSX builds

* Fix Mac OSX builds.

Use appropriate headers for
Mac OSX builds.
Also, fix some build issues
due to type-casting.

* Fix new code formatting issues

Fix new code formatting issues
with recent MacOS fixes.

* Add back missing case statement

Add back missing case statement
that was accidentally removed.

* Disable USE_GAS for Vulkan Loader build.

Disable USE_GAS for Vulkan Loader build
to fix aarch64 build.

* Fixes to OpenCL external sharing tests

Fix clReleaseSemaphore() API.
Fix copyright year.
Some other minor fixes.

* Improvements to OpenCL external sharing CTS

Use SPIR-V shaders instead of NV extension path
from GLSL to Vulkan shaders.
Fixes for lower end GPUs to use limited memory.
Update copy-right year at some more places.

* Fix new code formatting issues.

Fix code formatting issues with
recent changes for external sharing
tests.

* More formatting fixes.

More formatting fixes for recent
updates to external sharing tests.

* Final code formatting fixes.

Minor formatting fixes to get
format checks clean.
2022-10-04 09:00:03 -07:00
Sven van Haastregt
30cc3db4ec atomics: Fix -Wformat warnings (#1519)
The main sources of warnings were:

 * Printing of `i` which is a `size_t` requiring the `%zu` specifier.

 * Printing of `cl_long` which is now done using the `PRId64` macro
   to ensure portability across 32 and 64-bit builds.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2022-10-03 22:09:28 +01:00
Sven van Haastregt
18825769e5 pipes: Fix typos in skip messages (#1523)
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2022-10-03 22:09:05 +01:00
Jack Frankland
28e76e532a Add missing type declaration (#1520)
Add a missing type declaration to OpenCL C code strings in 2D async copy
tests.
2022-10-03 14:32:11 +01:00
victzhan
a3294d4c95 Add Python 3 support to run_conformance.py (#1470) 2022-10-03 14:26:43 +01:00
Sven van Haastregt
73f51ccff7 math_brute_force: Fix -Wformat warnings (#1518)
* math_brute_force: Fix -Wformat warnings

The main sources of warnings were:

 * Printing of 64-bit types, which is now done using the `PRI*64`
   macros from <cinttypes> to ensure portability across 32 and 64-bit
   builds.

 * Printing of `size_t` types that lacked a `z` length modifier.

 * Printing of values with a `z` length modifier that weren't a
   `size_t` type.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>

* [NFC] math_brute_force: clang-format after -Wformat changes

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2022-10-01 10:14:32 +01:00
Sven van Haastregt
c69f6eec47 [NFC] atomics: Remove set-but-unused "succeed" variables (#1517)
The "succeed" variables are never read and they don't seem to serve
any purpose that's not already provided by the "fail" variables.

In `add_index_bin_test` the "fail" variable is also set but unused,
but that may require an actual fix, so leaving that out of this
commit.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2022-09-30 11:41:19 +01:00
Sven van Haastregt
9bf6486352 [NFC] clang-format test_atomics (#1516)
Add some clang-format off/on comments to keep lists and kernel code
readable.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2022-09-27 09:32:23 -07:00
Sven van Haastregt
9b21e9f06b [NFC] Avoid mixing signed and unsigned in subhelpers run (#1505)
Fix a `-Wsign-compare` warning in the `run()` function, which resulted
in many repeated warnings when compiling with `-Wall` due to the many
template instantiations.

Both `clGetKernelSubGroupInfo` queries return a `size_t`, so it is
unclear why the results of these queries were being cast to `int`.
The `dynsc` uses don't seem to work with negative values, so make the
field unsigned.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2022-09-27 09:29:58 -07:00
Sreelakshmi Haridas Maruthur
30500fba06 SVM: Fix memory allocation size. (#1514)
* SVM: Fix memory allocation size.

9ad48998 generally made memory allocation and mapping consistent with a
size of size_t. Apply that fix to the final two allocations.

* check-format fixes

Co-authored-by: spauls <spauls@qti.qualcomm.com>
2022-09-27 09:28:57 -07:00
ellnor01
c014122742 Creating common functions for image/kernel_read_write read tests (#1141)
* Make InitFloatCoords suitable for all image types

Contributes #616

* Create common functions neutral for image types

Remove 3D specific code from common test_read_image so using
it for other image types is simpler in following patches

Contributes #616

* Removing unused code

Tidying commented out or unnecessary code

Contributes #616

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

* Restoring 'lod' variable name

Contributes #616

* Default cases to handle unsupported image types

Contributes #616

* Resolving build issues

Contributes #616

* Fix formatting

Contributes #616

* Using TEST_FAIL as an error code.

Contributes #616

* Add static keyword, improve error handling

Contributes #616

* Fix build errors with least disruption

Contributes #616

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
2022-09-26 12:57:42 +01:00
Sven van Haastregt
2012c6cadd [NFC] Fix typo in clang-format directive (#1512)
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2022-09-23 10:08:10 -07:00
Krzysztof Kosiński
180adef84c Remove __DATE__ and __TIME__ usage (#1506)
These macros make the build non-deterministic.
2022-09-23 17:29:18 +01:00
Sven van Haastregt
92285f7c9d cmake: Add set_gnulike_module_compile_flags (#1510)
Factor out a macro to set module-specific compilation flags for
GNU-like compilers.  This simplifies setting compilation flags per
test.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2022-09-22 13:17:55 -07:00
Nikhil Joshi
86d5ee5414 Update extension list of test_compiler (#1507)
* Update extension list of test_compiler

Upate extension list of test_compiler
with missing external memory and semaphore
extensions
2022-09-20 09:07:14 -07:00
Sven van Haastregt
75edf2a881 [NFC] Enable -Wall for math_brute_force (#1477)
math_brute_force compiles cleanly with `-Wall` currently, so avoid
regressing from that state.  Ideally we would enable `-Wall` in the
top-level CMakeLists.txt, but other tests do not compile cleanly with
`-Wall` yet.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2022-09-20 08:55:51 -07:00
niranjanjoshi121
76bd9d3674 Fix memory oob problem in test half (#1489)
Allocate memory for argc arguments
instead of argc - 1.
2022-09-20 08:53:34 -07:00
Sven van Haastregt
8f9c1960ff Improve MTdataHolder design and use it in math_brute_force (#1490)
Improve the design of the MTdataHolder wrapper:

 * Make it a class instead of a struct with a private member, to make
   it clearer that there is no direct access to the MTdata member.

 * Make the 1-arg constructor `explicit` to avoid unintended
   conversions.

 * Forbid copy construction/assignment as MTdataHolder is never
   initialised from an MTdataHolder object in the codebase.

 * Define move construction/assignment as per the "rule of five".

Use the MTdataHolder class throughout math_brute_force, to simplify
code by avoiding manual resource management.

Original patch by Marco Antognini.

Signed-off-by: Marco Antognini <marco.antognini@arm.com>
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>

Signed-off-by: Marco Antognini <marco.antognini@arm.com>
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2022-09-20 08:52:22 -07:00
Sven van Haastregt
a87e686757 Fix more warnings in math_brute_force (#1502)
* Fix "‘nadj’ may be used uninitialized in this function
   [-Werror=maybe-uninitialized]".

 * Fix "specified bound 4096 equals destination size
   [-Werror=stringop-truncation]".

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2022-09-16 13:34:36 +01:00
Stuart Brady
7859a33182 Include release builds in GitHub Actions (#1486)
The "Ninja" CMake generator does not support multiple configurations,
i.e. it does not support use of the '--config' option when running
'cmake --build'.  As such, the default configuration (i.e. Debug)
was getting used for all builds.

Use the CMAKE_BUILD_TYPE variable instead, so that we do release
builds, but change one build (ubuntu-20.04 aarch64) to use Debug
as its build type, to keep some build coverage for asserts, etc.

For Vulkan-Loader and OpenCL-ICD-Loader, we do release builds
unconditionally, as we assume there is no need in the CI workflow
to actually run the binaries that are built, and therefore no need
for any additional debug info.

Signed-off-by: Stuart Brady <stuart.brady@arm.com>
2022-09-13 18:22:52 +01:00
Kévin Petit
c0a10f4e12 Tests for cl-ext-image-from-buffer and cl-ext-image-requirements-info (#1438)
* Add CTS tests for cl_ext_image_requirements_info

Change-Id: I20c1c77ff5ba88eb475801bafba30ef9caf82601

* Add CTS tests for cl_ext_image_from_buffer

Change-Id: Ic30429d77a1317d0fea7d9ecc6d603267fa6602f

* Fixes for image_from_buffer and image_requirements extension

* Use CL_MEM_READ_WRITE flag when creating images that support CL_MEM_KERNEL_READ_AND_WRITE (#1447)

* format fixes

Change-Id: I04d69720730440cb61e64fed2cb5065b2ff8bf90

Co-authored-by: Oualid Khelifi <oualid.khelifi@arm.com>
Co-authored-by: oramirez <oramirez@qti.qualcomm.com>
Co-authored-by: Sreelakshmi Haridas Maruthur <sharidas@quicinc.com>
2022-09-13 09:58:24 -07:00
Sreelakshmi Haridas Maruthur
426097cf7c gles: Limit variable definition to the same scope as usage (#1495)
Fix unused-variable errors by limiting variable definition to the
case that would use it
2022-09-13 09:50:25 -07:00
Stuart Brady
d42b3dcfb6 [NFC] Fix typo (enevt_type -> event_type) (#1498)
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
2022-09-13 17:49:09 +01:00
Sven van Haastregt
5d5bffba13 [NFC] Declare format tables as const (#1493)
Without const, these variables would be flagged up by
`-Wunused-variable`.

Drop `struct` from the declarations as that is not needed in C++.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2022-09-13 14:48:54 +01:00
Stuart Brady
1d74c85ff3 [NFC] Reformat code in events test (#1497)
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
2022-09-13 13:42:32 +01:00
niranjanjoshi121
d928ac059c Use correct size for memory allocation in SVM test (#1496)
Memory is allocated for cl_int, but mapped as size_t.

Use size_t instead of cl_int during allocation and mapping for consistency.
2022-09-12 12:42:06 +01:00
Stuart Brady
00f21739e5 Minor cleanups for run_conformance.py (#1492)
Use the print function from futures for Python 3 compatibility,
remove an unreachable statement, remove unused imports, and add
a missing sys.exit call when opening the log file fails.

Signed-off-by: Stuart Brady <stuart.brady@arm.com>
2022-09-12 11:49:13 +01:00
Sven van Haastregt
89c8d87963 [NFC] Fix unused variable warning in Release builds (#1494)
The condition inside the assert is dropped in Release builds, so
`num_printed` becomes unused.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2022-09-09 17:58:31 +01:00
Sven van Haastregt
6554c49018 [NFCI] Remove unused variables and enable -Wunused-variable (#1483)
Remove unused variables throughout the code base and enable the
`-Wunused-variable` warning flag globally to prevent new unused
variable issues being introduced in the future.

This is mostly a non-functional change, with one exception:

 - In `test_conformance/api/test_kernel_arg_info.cpp`, an error check
   of the clGetDeviceInfo return value was added.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2022-09-08 12:54:36 +01:00
Stuart Brady
fec9d9a238 [NFC] Fix whitespace issues in run_conformance.py (#1491)
Fix whitespace issues and remove superfluous parens in the
run_conformance.py script.  This addresses 288 out of the 415
issues reported by pylint.

Signed-off-by: Stuart Brady <stuart.brady@arm.com>
2022-09-07 17:28:29 +01:00
Ahmed
388944c01c Minimum 2 non atomic variables per thread for the c11 atomic fence test for embedded profile devices. (#1452)
* Minimum 2 Non atomic variables per thread for an embedded profile device - https://github.com/KhronosGroup/OpenCL-CTS/issues/1274

* Formatting
2022-09-06 09:53:12 -07:00
Ewan Crawford
7caa4c4421 Update known extensions in compiler define test (#1480)
Add
[cl_khr_command_buffer_mutable_dispatch](https://github.com/KhronosGroup/OpenCL-Docs/pull/819),
[cl_khr_subgroup_rotate](https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_Ext.html#cl_khr_subgroup_rotate),
and [cl_khr_extended_async_copies](https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_Ext.html#cl_khr_extended_async_copies)
to the list of known extensions used in
`test_compiler_defines_for_extensions`
2022-09-01 15:13:01 -07:00
niranjanjoshi121
9ad4899862 Use size_t instead of cl_int (#1414)
* Use size_t instead of cl_int

Memory is allocated for cl_int,
but mapped as size_t.
Use size_t instead of cl_int during
allocation and mapping for consistency.

* Use size_t instead of cl_int

Memory is allocated for cl_int,
but mapped as size_t.
Use size_t instead of cl_int during
allocation and mapping for consistency.

* Use size_t instead of cl_int

Memory is allocated for cl_int,
but mapped as size_t.
Use size_t instead of cl_int during
allocation and mapping for consistency.

* Remove test_half changes.

Remove test_half changes from other fix
that got included in this commit.

* Final formatting fix.
2022-08-31 22:58:13 -07:00
Romaric Jodin
2dc2533130 fix test kernel attributes when api fcts are failing (#1449)
test_error returns the err given as the first argument. As the
run_test function returns a bool, we end up returning true (meaning
pass) when an api function fails.
Instead return explicitly false (meaning fail).
2022-08-31 22:56:10 -07:00
Sven van Haastregt
f94c135755 Use clMemWrapper in math_brute_force (#1476)
Simplify code by avoiding manual resource management.

Original patch by Marco Antognini.

Signed-off-by: Marco Antognini <marco.antognini@arm.com>
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>

Signed-off-by: Marco Antognini <marco.antognini@arm.com>
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2022-08-31 22:43:43 -07: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
stoneforestwhu
f4eb852b6d support format CL_ABGR (#1474)
* support format CL_ABGR

add code to handle format CL_ABGR

* Update imageHelpers.h

* fix format
2022-08-30 09:47:15 -07:00
Sven van Haastregt
afe4ef8b8f Fix test skipping in math_brute_force (#1475)
Commit 9666ca3c ("[NFC] Fix sign-compare warnings in math_brute_force
(#1467)", 2022-08-23) inadvertently changed the semantics of the if
condition.  The `i > gEndTestNumber` comparison was relying on
`gEndTestNumber` being promoted to unsigned.  When casting `i` to
`int32_t`, this promotion no longer happens and as a result any tests
given on the command line were being skipped.

Use an unsigned type for `gStartTestNumber` and `gEndTestNumber` to
eliminate the casts and any implicit conversions between signed and
unsigned types.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2022-08-24 12:05:01 +01:00
Sven van Haastregt
c82dabd4bb Use clCommandQueueWrapper in math_brute_force (#1463)
Simplify code by avoiding manual resource management.

This commit only modifies tests that use one queue per thread.  The
other unmodified tests are single-threaded and use the global
`gQueue`.

Original patch by Marco Antognini.

Signed-off-by: Marco Antognini <marco.antognini@arm.com>
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2022-08-24 10:31:32 +01:00
Sven van Haastregt
9666ca3c70 [NFC] Fix sign-compare warnings in math_brute_force (#1467)
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2022-08-23 18:02:33 +01:00
Sven van Haastregt
e52a97e4e9 [NFC] Use Unix-style line endings (#1468)
Use the same line ending style across all source files.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2022-08-23 17:57:05 +01:00
Sven van Haastregt
d647529fec [NFC] Fix missing double_double.lo initializer (#1466)
Fixes a missing-field-initializers warning.  The original intent was
most likely to initialize both fields (similar to other functions in
this file), but a `,` was missed.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2022-08-16 14:42:33 +01:00
Sven van Haastregt
38639f229d Fix test_select verification failure reporting (#1462)
When verification of the computed result fails, the test would still
report as "passed".  This is because `s_test_fail` is only written to
and never read.

Fix the immediate issue by returning a failure value and incrementing
`gFailCount` if any error was detected.  The error handling can be
improved further, but I'm leaving that out of the scope of this fix.

Fixes https://github.com/KhronosGroup/OpenCL-CTS/issues/1445

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2022-08-04 15:05:10 +01:00
Stuart Brady
4ee8022230 Remove unused variables in subgroup tests (#1460)
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
2022-08-04 15:04:14 +01:00
Sven van Haastregt
c12bff46c6 Tidy up BuildKernelInfo (#1461)
Remove the `offset` field from both structures, because it was always
set to the global `gMinVectorSizeIndex`.

Improve documentation and rename some variables:
 - `i` becomes `vectorSize`;
 - `kernel_count` becomes `threadCount`.

Original patch by Marco Antognini.

Signed-off-by: Marco Antognini <marco.antognini@arm.com>
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2022-08-04 15:03:52 +01:00
Matthias Diener
c44b5b6ae3 Fix indentation of test_waitlists.cpp (#1459)
* fix indentation of test_waitlists.cpp

Followup of #1458

* run formatter
2022-08-02 20:31:24 +01:00
Stuart Brady
cdf5a105fc Fix misleading indentation and enable -Wmisleading-indentation (#1458)
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
2022-08-02 18:16:03 +01:00
Kévin Petit
bd03e17a56 Add missing external memory/sync extensions to list of known khr extensions (#1455)
Signed-off-by: Kévin Petit <kpet@free.fr>
2022-08-01 10:18:53 +01:00
Stuart Brady
017f514c21 Tidy up subgroup log messages (#1454)
Add missing newlines and improve wording of messages.

Signed-off-by: Stuart Brady <stuart.brady@arm.com>
2022-08-01 10:18:36 +01:00
Sven van Haastregt
b06ccc6cd9 Share BuildKernelInfo struct definition (#1453)
Move the main `BuildKernelInfo` definition into `common.h` to reduce
code duplication.

Some tests (e.g. `i_unary_double.cpp`) use a different struct; rename
those structs to `BuildKernelInfo2` for now to avoid ambiguity.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2022-07-29 18:22:18 +01:00