Commit Graph

24 Commits

Author SHA1 Message Date
Sven van Haastregt
9b0f78549a workgroups: fix program/kernel object leak (#1775)
`create_single_kernel_helper` is called in a loop, overwriting the
objects contained in the wrapper classes.  The wrapper class is not
aware of this, as the overwriting happens through its `operator&`.

Move the wrapper objects into the loop, so that the contained objects
get released as soon as the program and kernel objects are no longer
needed.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2023-06-30 11:22:43 +01:00
Sven van Haastregt
845ec694bb workgroups: fix -Wsign-compare warnings (#1774)
In preparation of re-enabling -Wsign-compare globally, fix some
instances of this warning.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2023-06-29 12:20:15 +01:00
Sven van Haastregt
a70fa56003 Fix some Wunused-but-set warnings (#1666)
To the best of my understanding, these occurrences of the
`-Wunused-but-set` warnings do not reveal any underlying issues, so we
can safely remove these variables.  There are more occurrences of this
warning in other places (not touched by this commit) that require
further analysis.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2023-03-30 09:34:00 +01:00
Sven van Haastregt
640f6e66c7 [NFC] workgroups: Remove unused array (#1572)
`value_range` was only used in an `NELEMS` expression; its values were
never read.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2022-11-23 14:04:31 +00:00
Ben Ashbaugh
2fcdde96d2 refactor work group scan and reduction tests (#1401)
* updated reduce test

* switched all reduce tests to new framework

* switch over scans to new framework

* remove old files

* minor fixes

* add type type name to the kernel name

* fix Windows build and warnings

* address review comments
2022-04-04 13:19:30 -07:00
Ben Ashbaugh
02bf24d2b1 remove min max macros (#1310)
* remove the MIN and MAX macros and use the std versions instead

* fix formatting

* fix Arm build

* remove additional MIN and MAX macros from compat.h
2021-09-13 13:25:32 +01:00
Kévin Petit
43e1397468 Fix kernel source for cl_khr_suggested_local_work_size (#1300)
Use ASCII '-' instead of unicode '–' as subtration operator.

Signed-off-by: Kévin Petit <kpet@free.fr>
2021-08-18 11:11:30 +01:00
kalchr01
cc0b46e457 Add tests for entrypoint cl_khr_suggested_local_work_size (#1264)
* Add tests for entrypoint cl_khr_suggested_local_work_size

Tests added within test_conformance/workgroups. The tests cover several
shapes (num dimensions) and sizes of global work size, kernels using
local memory (dynamic and static) and present/non-present global work
offset.

Signed-off-by: Kallia Chronaki <kallia.chronaki@arm.com>

* Fix in comparison for error checking

Signed-off-by: Kallia Chronaki <kallia.chronaki@arm.com>

* 'test_wg_suggested_local_work_size' fixes

* Refactoring of 'test_wg_suggested_local_work_size'

Modifications to reduce code duplication and minimize build time
2021-08-09 11:20:40 +01:00
Grzegorz Wawiorko
2597027737 Use highest OpenCL C version (#1081)
* Set the highest supported OpenCL C version.

* Remove gDeviceLt20 variable - not used anymore.

* Fix formatting issues
2021-01-11 13:54:19 +00:00
ellnor01
a6809710ea Remove unnecessary cl_mem_flags casts (#1018)
* api, atomics: remove unnecessary cl_mem_flags casts

Instances in api, atomics, buffers and c11_atomics suites

Contributes #759

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

* basic: remove unnecessary cl_mem_flags casts

Contributes #759

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

* spir, thread_dimensions: remove unnecessary cl_mem_flags casts

Instances in spir, thread_dimensions and workgroups tests

Contributes #759

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

* profiling, relationals: remove unnecessary cl_mem_flags casts

Includes relationals, profiling, muliple_device_context, integer_ops
tests

Contributes #759

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

* clcpp: remove unnecessary cl_mem_flags casts

Contibutes #759

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

* events, geometrics: remove unnecessary cl_mem_flags casts

Includes events, geometrics, gl and images tests

Contributes #759

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

* commonfs, compiler: remove unnecessary cl_mem_flags casts

Includes cast removal in commonfs, compiler and device_partition tests

Fixes #759

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

* Fix up formatting

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
2020-10-19 13:56:02 +01:00
Grzegorz Wawiorko
44a240367e Fix code format errors 2020-07-23 17:21:07 +01:00
Grzegorz Wawiorko
d643dc5399 Add API name to version_expected_info function 2020-07-23 17:21:07 +01:00
Kévin Petit
5e2f5b857e Accept OpenCL 3.0 in version parsing code and use where appropriate (#752)
* Accept OpenCL 3.0 in version parsing code and use where appropriate

There were a number of tests against 2.2 that are clearer against 3.0.

Fixes #751

Signed-off-by: Kévin Petit <kpet@free.fr>

* Remove CL_EXPERIMENTAL guards

Signed-off-by: Kévin Petit <kpet@free.fr>

* formatting

* Configure the headers for OpenCL 3.0

* more format fixes
2020-04-30 11:51:06 +01:00
Grzegorz Wawiorko
db570f70e5 Set minimum expected OpenCL version for the test. (#674) 2020-03-11 18:14:16 +00:00
Kévin Petit
c9c3c73aa9 make execution of workgroups test optional (#643) 2020-03-05 08:22:36 +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
Kévin Petit
fa4b278432 Build the harness as a static library (#430)
This reduces by a factor of roughly two the number of files to build.

Fixes #193.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-08-07 17:18:10 +01:00
Kevin Petit
ef832c330c Stop using ../../test_common to include common headers
Fixes #395.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-08-01 18:41:12 +01:00
Samuel Pauls
627c180a31 cl20: Khronos Bug 16080 Fix local work size limit.
Problem: Some tests assume that all local work-items can be used in a
single dimension of an NDRange.

Spec References: OpenCL C 2.0 r19, table 4.3,
CL_DEVICE_MAX_WORK_ITEM_SIZES.

Solution: The overall maximum local work size is trimmed to that of an
NDRange's first dimension or all dimensions, as appropriate.

Test Suite Affected: atomics, non_uniform_work_group, and workgroups.

Side Effects: None

Change-Id: I2e8179ca15c2c090f47ea84d1d3c109dd69ec185
2019-07-31 14:10:07 +01:00
Samuel Pauls
e0d7ab2187 cl20: Khronos Bug 15745 Limit work-group sizes per dimension.
Until now, the workgroups test computed the work-group size for
execution by querying the maximum number of work-items based on the
kernel. This returns the overall limit on workgroup size but not the
limits in each specific dimension. This change additionally restricts
the work-group size to the device's dimensional limits.

Problem: The kernel's maximum work-group size is used to execute it in a
single dimension, without regard for dimensional limitations.

Spec References: OpenCL 2.0 rev 19

Solution: The kernel's maximum work-group size is decreased such that it
meets any dimensional limitations before it's enqueued.

Test Suite Affected: Workgroups

Side Effects: None

Change-Id: I1c642af087f1934723ac7218ca9a35413ff83224
2019-07-31 10:41:18 +01:00
Grzegorz Wawiorko
6c999818ee cl22: Improved CRC calculation (#133)
* Improved CRC calculation

* Improved CRC calculation - review fix

* Improved CRC calculation - build brake fix

* Improved CRC calculation - remove external initializaiton
2019-04-18 15:00:45 +01:00
Radek Szymanski
07196c351a cl22: Use single array for function list (#148)
Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2019-04-10 12:30:38 +01:00
Kevin Petit
b6446a2f1d Remove build systems other than CMake
Make it clear that CMake is the only supported build system.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-03-15 09:47:56 +00:00
Kedar Patil
2821bf1323 Initial open source release of OpenCL 2.2 CTS. 2017-05-16 18:44:33 +05:30