Commit Graph

15 Commits

Author SHA1 Message Date
Sven van Haastregt
605228ae7f [NFC] api: Fix sign-compare warnings (#1692)
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2023-04-03 16:29:51 +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
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
Jason Tang
93f4f6a548 test_api_min_max.cpp: use size_t for get_global_id() value (#1410)
In some rare cases where get_global_id() is larger than 2G, the 32bit int type would convert the value into a negative integer.
2022-03-29 16:08:08 -07:00
Grzegorz Wawiorko
e106be14f9 Test api min max - fix printing cl_ulong data type (#1212)
* test api - fix code formatting only

* Fix printing cl_ulong type to avoid overloading.

* Fix printing size_t data type

* Fix printing size_t data type - set unsinged

* Fix formatting for maxArgs (uint) and numberOfInts (size_t)
2021-12-04 09:55:17 -08:00
BKoscielak
6dff4fdffa Fix conversion data loss in test_api min_max_constant_args (#1355) 2021-11-25 13:40:19 +00:00
Pierre Moreau
3719a0183c api: Fix testing of local memory size requirement (#1112)
The current test would always end up assuming a minimum of 16 KB
regardless of the exposed OpenCL version, and the logic for testing the
OpenCL version was hard to follow.

Besides fixing the test for OpenCL 1.1 through 2.1, it also
* adds support for OpenCL 2.2, 3.0, and future OpenCL versions (as long
  as `get_device_cl_version()` supports those);
* adapts the error message to mention the currently exposed OpenCL
  version rather than a hardcoded OpenCL 1.1;
* reports the advertised local memory size as KB and not Kb, since local
  memory size is given in bytes.
2021-02-05 11:34:10 +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
julienhascoet
8ca1537157 Fix api/test_api_min_max for Embedded profile with cles_khr_int64 support (#994)
In embedded profile with cles_khr_int64 support,
the test did not consider the size of long. Thus the
number of argument computation was not coherent with
the returned CL_DEVICE_MAX_PARAMETER_SIZE leaded to test failure.
We fix this by taking the size of long when cles_khr_int64
is available in the device extension.
2020-10-13 09:27:27 +01:00
Kévin Petit
020eea9e52 Don't require support for 3D image writes in tests that don't need it (#1003)
Also fix PASSIVE_REQUIRE_* macros to report tests as skipped instead of passed.

Signed-off-by: Kévin Petit <kpet@free.fr>
2020-10-05 13:20:51 -04:00
Jack Frankland
f6b156d523 Correct khr Extension Checks for Device Versions (#778)
* Correct khronos extension device version checks so that 2.0, 2.1 and
2.2 extensions are only require for devices versions < 3.0
(`cl_khr_3d_image_writes`, `cl_khr_image2d_from_buffer` and
`cl_khr_depth_images` are all optional for devices supporting
OpenCL-3.0).

* Remove `cl_khr_fp64` from list or required extensions for 2.0,
`cl_khr_fp64` is a required extension for OpenCL-1.2 devices if they
suport doubles. Check for support of `cl_khr_fp64` on 1.2 devices.

* Remove duplicated `cl_khr_byte_addressable_store` from list of 2.0
extensions. Since this is a 1.1 extension and all versions greater than
1.1 are backwards compatible with 1.1 this will be checked anyway.
2020-05-20 14:16:37 +01:00
Ankit Goyal
4fbcd96e7f Remove "C" linkages (#781)
* Remove extern C linkages

* Update crc32 to cpp and remove extern C linkage
2020-05-20 14:16:19 +01:00
Grzegorz Wawiorko
223c43b7d9 test_api - fix minRequiredDimension in case of new OpenCL version (#779)
* Fix minRequiredDimension in case of new OpenCL version

* Fix code formatting
2020-05-19 10:16:21 +01:00
ellnor01
ef3528e78a Ensure is_extension_available is used where possible (#721)
(Patch1)
A number of tests have got their own code for checking the presence of
extensions. This change replaces that code with is_extension_available
function.

Contributes to #627

Change-Id: I8dd2233719aa8c84841ac61776437d7f6e3fafe6
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
2020-04-02 21:22:02 +01: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