Commit Graph

184 Commits

Author SHA1 Message Date
Stuart Brady
1116a71ba2 Improve error handling in subgroup tests (#1352)
* MPGCOMP-14761 Improve error handling in subgroup tests

Signed-off-by: Stuart Brady <stuart.brady@arm.com>

* Add missing newline
2021-11-16 11:27:04 +00:00
Grzegorz Wawiorko
7147d072c7 Remove space character from extension name (#1336) 2021-10-04 14:42:44 +01:00
Kévin Petit
2b770c4f34 Update cl_khr_integer_dot_product tests for v2 (#1317)
* Update cl_khr_integer_dot_product tests for v2

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
Signed-off-by: Marco Cattani <marco.cattani@arm.com>
Change-Id: I97dbd820f1f32f6b377e47d0bf638f36bb91930a

* only query acceleration properties with v2+

Change-Id: I3f13a0cba7f1f686365b10adf81690e089cd3d74
2021-09-29 12:38:42 +01: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
James Price
0601c6f765 Add missing include for gRandomSeed (#1307) 2021-08-31 11:45:24 -07:00
Ben Ashbaugh
995c7dbfbb suppress MSVC strdup warning (#1314) 2021-08-31 11:44:17 -07:00
Ben Ashbaugh
39fdb462be define NOMINMAX in the CMakefile to fix std::min and std::max on MSVC (#1308) 2021-08-28 10:21:34 +01:00
Ben Ashbaugh
070f8c0c0e add tests for cl_khr_integer_dot_product (#1276)
* cl_khr_integer_dot_product_tests

* remove emulated codepaths

* fix formatting

* address code review comments

* remove emulated codepaths again

* address one more review comment
2021-08-25 10:14:58 +01:00
Marco Antognini
69f0054001 Fix copy and move semantics of wrapper classes (#1268)
* Remove unnecessary code

These custom equality operators are not necessary because of the
conversion operators which already allow using the standard equality
operators between two pointers.

Signed-off-by: Marco Antognini <marco.antognini@arm.com>

* Fix copy and move semantics of wrapper classes

Related to #465.

The Wrapper classes are rewritten to properly handle copy and move
semantics, while preserving the existing API and removing code
duplication.

Add error handling around clRelase* and clRetain*.

Signed-off-by: Marco Antognini <marco.antognini@arm.com>

* Address build issue on 32-bit Windows

Include linkage in RetainReleaseType function type.

Signed-off-by: Marco Antognini <marco.antognini@arm.com>
2021-06-17 14:05:05 +01:00
Stuart Brady
277d029608 Run spirv-val for SPIR-V offline compilation (#1108)
The common --disable-spirv-validation option has been added to disable
this functionality.

Signed-off-by: Stuart Brady <stuart.brady@arm.com>
2021-06-11 09:42:20 +01:00
Marco Antognini
76ace61314 Fix leaks in callSingleTestFunction (#1224)
The context and queue were not released when the test is not supported
in offline mode or the queue couldn't be created.

Inline test_missing_support_offline_cmpiler_ret macro, remove dead
parameter of check_functions_for_offline_compiler and slightly refactor
callSingleTestFunction to address leaks.

Signed-off-by: Marco Antognini <marco.antognini@arm.com>
2021-06-09 11:08:08 +01:00
Marco Antognini
315998511a Address data race in ThreadPool (#1265)
ThreadSanitizer detects some data race in ThreadPool. They stem from
inappropriate usage of volatile which are replaced with std::atomic
variables in this patch.

This patch focuses on data races identified while running the
math_brute_force component. For example, it doesn't fully remove usage
of ThreadPool_AtomicAdd from other components of the CTS. Furthermore,
thread leaks, most likely because threads are not joined, are not
addressed.

Signed-off-by: Marco Antognini <marco.antognini@arm.com>
2021-05-27 09:06:13 +01:00
Stuart Brady
0876ea10be Ignore padding bits in clCopyImage/clFillImage testing (#1184)
The CL_UNORM_SHORT_555 and CL_UNORM_INT_101010 formats contain padding
bits which need to be ignored in clCopyImage and clFillImage testing.

For clFillImage tests, padding was not ignored for the CL_UNORM_SHORT_555
format, and was ignored for CL_UNORM_INT_101010 by modifying actual and
reference data.  For clCopyImage tests, padding was not ignored, both for
CL_UNORM_SHORT_555 and for CL_UNORM_INT_101010.

Fix this by adding a new compare_scanlines() function, which is used for
both of these formats, and does not modify the actual or reference data.

Signed-off-by: Stuart Brady <stuart.brady@arm.com>
2021-05-24 16:59:03 +01:00
James Price
ce1687a408 Add missing cstdint include (#1259) 2021-05-21 10:07:12 +01:00
Sreelakshmi Haridas Maruthur
6c8045911a gles: Fix compile warnings. (#1070)
* gles: Fix compile warnings.

For 32 and 64-bit Visual Studio and the Android Q NDK.

* Fix formatting violations

Co-authored-by: spauls <spauls@qti.qualcomm.com>
2021-05-18 18:10:24 +01:00
Marco Antognini
17a0d09567 Cleanup usage of static, extern and typedef (#1256)
* Cleanup usage of static, extern and typedef

Remove static on functions defined headers, as it can result in
duplication in binaries.

Remove unnecessary extern keyword on a function declaration, as it is
the default behavior and can be puzzling when reading the code.

Remove the unused declaration of my_ilogb, which is never defined.

Remove unnecessary usage of typedef, as they are only increasing the
cognitive load of the code for no purpose.

Signed-off-by: Marco Antognini <marco.antognini@arm.com>

* Improve usage of inline and static in harness

Functions declared in header as static can trigger unused warnings when
(indirectly) included in translation units that do not use such
functions. Use inline instead, which also avoids duplicating symbols in
binaries.

Signed-off-by: Marco Antognini <marco.antognini@arm.com>
2021-05-18 18:09:46 +01:00
Kévin Petit
e7c5694cf5 Fix image pixel reference calculation for CL_{INTENSITY,LUMINANCE} formats (#1247)
As per 6.15.15.7, the first three components have to be set to the luminance
value and all components to the intensity value.

Signed-off-by: Kévin Petit <kpet@free.fr>
2021-05-14 09:44:38 +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
Kévin Petit
ad8ab3fe90 Remove OpenCL C++ tests (#1241)
* Remove OpenCL C++ tests

Agreed in the 2021/05/11 teleconference.

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

* fix CI
2021-05-13 09:13:03 +01:00
Pierre Moreau
d7f87492bd testHarness: Print error string when clFinish fails (#1243) 2021-05-12 11:39:45 +01:00
Sven van Haastregt
dbd3e787fe Do not dereference null pointer for no matching tests (#1191)
When invoking for example

    test_c11_atomics test-that-does-not-exist

parseAndCallCommandLineTests() would attempt to dereference
`resultTestList` which is still a null pointer.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2021-03-18 21:46:05 +00:00
Stuart Brady
6f2cd12a0b Deduplicate logging of pixel differences (#1175)
clCopyImage and clFillImage contain near-duplicate code for logging of
pixel difference errors.  Move this into imageHelpers.

Signed-off-by: Stuart Brady <stuart.brady@arm.com>
2021-03-09 09:09:52 +00: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
Nikhil Joshi
bfca863cb8 Handle NULL hostptr in conformance image tests (#1087)
* 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.

* Handle NULL hostptr in conformance image tests

As per the spec, clCreateBuffer and clCreateImage return
CL_INVALID_HOST_PTR if host_ptr is NULL
and CL_MEM_USE_HOST_PTR or CL_MEM_COPY_HOST_PTR are set in flags
or if host_ptr is not NULL
but CL_MEM_USE_HOST_PTR or CL_MEM_COPY_HOST_PTR are not set in flags."

Host pointer should be NULL when USE/COPY_HOST_PTR is not set in flags.

* Revert "Handle NULL hostptr in conformance image tests"

This reverts commit 49fa049f9b.

* Move cl_mem_flag and host_ptr check to ImageHelper

Add a check to see if cl_mem_flag has
USE_HOST_PTR or COPY_HOST_PTR.
Override host_ptr with NULL if none of them
are specified.
2021-01-29 14:18:13 +00:00
John Kesapides
c587b45a2b Minor fixes for CL_ARGB channel order. (#1128)
Signed-off-by: John Kesapides <john.kesapides@arm.com>
Change-Id: I4f6bbce14535f6156365a5a46c4739d6a7257ab2
2021-01-29 14:15:16 +00:00
James Price
03a0989998 Use std::vector for format lists in images suite (#1105)
* Use std::vector for format lists in images suite

Avoids memory deallocation issues and generally simplifies the code.

* Fixup formatting with git-clang-format
2021-01-14 13:27:59 +00:00
ellnor01
25d9ff5d6e Using helper functions for clCreateKernel (#1064)
* Using helper functions for clCreateKernel

Uses of clCreateKernel following create program helper
functions, have been incorporated into
create_single_kernel_helper when suitable.

Contributes #31

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

* Skip tests using clCompileProgram in offline mode

Contributes #31

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

* Using type wrappers when using kernel helper functions

Also includes fix for windows build

Fixes #31

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

* Remove clReleaseKernel for wrapped kernel

Fixes #31

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
2021-01-07 11:34:42 +00:00
Chetan Mistry
5f869e1c98 Move TEST_SKIPPED_ITSELF to test_status in testHarness (#1089)
TEST_SKIPPED_ITSELF was originally located in
threadTesting.h but this no longer makes sense.
This change moves the definition to the test_status
struct in testHarness so that it can be used in the same
way that test_status' can be used.

Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com>
2021-01-04 15:20:19 +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
Sreelakshmi Haridas Maruthur
16ddfbb1ae gles: Fix compile errors. (#976)
* fix gles build error

* fix format check fail

* fix Werror and link error

* gles: Makefile changes

Change-Id: Ie493a730e6004f9251bbf9b534f758e0dc920191

Co-authored-by: Guang <891528583@qq.com>
2020-11-09 11:04:57 +00:00
ellnor01
63f01be181 Reimplement buffer tests (#1007)
* Reimplement buffer tests

Reintegrated and fixed test code for buffer tests buffer_read_half and
buffer_write_half tests.

Added mem_alloc_ref_flags test code, as was previously non-existent,
to test CL_MEM_ALLOC_HOST_PTR. This flag was otherwise untested and
as similar tests within the suite are used to test other cl_mem_flags
it has been assumed that this was the purpose of the test.

Fixes #439

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

* move mem_read_write_flags to a common function

Code under mem_*_flags tests have a lot of duplication, this is
the first step of moving test code to a common function.

Contributes #439

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

* move mem_write_only_flags test code to a common function

Code under mem_*_flags tests have a lot of duplication

Contributes #439

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

* move mem_read_only_flags test code to a common function

Code under mem_*_flags tests have a lot of duplication

Contributes #439

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

* move mem_copy_host_flags test code to a common function

Code under mem_*_flags tests have a lot of duplication, moved
mem_copy_host_flags code and rearranged function where appropriate

mem_ref_alloc_flags test also uses common function.

Contributes #439

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

* Remove unused NOT_IMPLEMENTED_TEST macro

This define is not in use anymore, since tests have been
reimplemented in #439. Tests should be working and implemented
or not registered.

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
2020-11-06 11:33:36 +00:00
Jack Frankland
e8c55e59bc Skip features_macro Test in Offline Mode (#1034)
- [x] Skip the `features_macro` test in offline mode since it makes
calls to `create_single_kernel_helper_create_program` and fails when the
call doesn't return `CL_SUCCESS` which will happen when the offline
compiler fails to compile the kernel which is deliberately supposed to
fail compilation in this test.
2020-11-06 11:32:13 +00:00
Kévin Petit
c8163e931f Fix a few typos and remove unused code (#1041)
Fixes #845
Fixes #844

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-11-06 11:24:15 +00:00
Kévin Petit
0e67969989 Fix build warning/error introduced by 8d443029 (#1042)
"control reaches end of non-void function"

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-11-06 10:09:33 +00:00
Jack Frankland
e7a23536e5 Skip Compiler Unload Tests in Binary Mode (#1025)
The following tests make calls to `clCompileProgram` or
`clBuildProgram` and therefore require a compiler in the runtime:
  * `unload_repeated`
  * `unload_compile_unload_link`
  * `unload_build_unload_create_kernel`
  * `unload_link_different↩`
  * `unload_build_threaded`
  * `unload_build_info`
  * `unload_program_binaries`

Skip these tests if no compiler is present in the runtime.
2020-10-30 14:29:19 +00:00
Stuart Brady
af7d914514 Reformat test harness code (#940)
* Reformat common help text

Signed-off-by: Stuart Brady <stuart.brady@arm.com>

* Reformat test harness code

This goes part of the way to fixing issue #625.

Signed-off-by: Stuart Brady <stuart.brady@arm.com>
2020-10-30 14:13:52 +00:00
Ewan Crawford
55976fad35 Permit half overflow within allowable ULP (#600)
* Permit half overflow within allowable ULP

Modify the algorithm for calculating half precision ULP error so
that it duplicates the behaviour of the single precision ULP algorithm,
in regards to allowing overflow within the defined ULP error.

In the case where the test value is infinity, but the reference is
finite, pretend the test value is 63336.0 and calculate the ULP error
against that.

Encountered this while testing half precision `hypot()` in PR !529,
for inputs `hypot(-48864.0, 43648.0)` which has reference
`65519.755799`. With RTE rounding this only just rounds to `65504` as half,
and returning INF is currently infinite ULP error. Using the leniency
introduced by this change however the error is `~0.5` within the `2` ULP
bounds defined by the spec.

* Run clang-format over changes

Code now conforms to style guidelines and allows `check-format.sh` to pass.
2020-10-28 10:13:40 +00:00
Kenneth Benzie
8d44302935 Return a non-zero exit-code when a sub-test fails (#951)
When running sub-tests explicitly on the command line and that sub-test
fails, the test harness returns `0` from `main()`. This is problematic
in automated testing environments as failed tests can be hidden.

This patch iterates over all the test results in the `resultTestList`
after all sub-tests have completed, if any of the tests failed a
non-zero value is returned from `parseAndCallCommandLineTests()` which
is then propagated up the call stack to `main()`.
2020-10-19 23:08:40 -07:00
Stuart Brady
90c9ea5d7c Fix compilation failure with -Werror=narrowing (#901)
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
2020-10-19 13:58:35 +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
Chetan Mistry
7a735b74e3 Replace cl_ushort with cl_half (#885) (#1000)
* test_common: Replace cl_ushort with cl_half (#885)

Change-Id: I507eca2084629c3b6f3e7331f062f006edbce434
Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com>

* buffers, pipes, profiling: Replace cl_ushort with cl_half (#885)

Change-Id: Id9799322b636af6aa0eec3d4e846d7af8c7f9602
Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com>

* images/kernel_read_write: Replace cl_ushort with cl_half (#885)

Change-Id: I922ddb593b6e5631d0f4ea1522c7f75f8770be40
Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com>

* half: Replace cl_ushort with cl_half (#885)

Change-Id: I484a5bb2b33a7e87805fc6079953c66e5f8d9239
Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com>
2020-10-02 16:29:05 +01:00
Kévin Petit
3320035581 Align with updated conformance process (#989)
- Remove the requirement to detail values for device queries and list
  extensions in the submission template. They are printed by computeinfo.
- Require that tests skipped in accordance with the conformance
  process be listed in the submission template.
- Remove support for OPENCL_1_0_DEVICE. This variable doesn't control
  anything anymore and the updated conformance process no longer refers
  to it.
- Require that implementations running via a loader document the loader
  that was used.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-09-29 13:51:49 -07:00
Ben Ashbaugh
beaecb71a3 add checks for OpenCL C versions (#968)
* add test_compiler test for OpenCL C versions

* add checks for required OpenCL C versions

* bugfix: only OpenCL C 2.0 is required for OpenCL 2.1 and 2.2

* pass reference to feature struct vs. pointer

* address review comments regarding C++ identifiers and 3d image writes
2020-09-28 00:26:57 +01:00
Ben Ashbaugh
951d010eaf add a new test to verify reported image formats (#963) 2020-09-28 00:22:49 +01:00
Grzegorz Wawiorko
e1cf741f1c Test feature macro OpenCL 3.0 (#762)
* Test feature macro OpenCL 3.0

* Test feature macro OpenCL 3.0 - refactor to template function

* Use test_error and format fix issues

* Fix returned value type for CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE

* Code format fix

* Feature macro test - refactor code to have one test case

* add consistency checking comparing supported features to CL_DEVICE_OPENCL_C_FEATURES
* fix minor issues

* Feature macro test  - fix test version

* Feature macro test  - add -cl-std=CL3.0 build option

* Feature macro test  - compilation errors

* Feature macro test  - compilation errors OSX

* Feature macro test  - fix adding build options

* Feature macro test  - share function OutputBuildLogs

* Feature macro test  - back removed cases

* Feature macro test  - review fixes

* Feature macro test  - split check image formats

* Feature macro test  - fixed version
2020-09-24 20:34:56 +01:00
Jack Frankland
9178524d02 Change Behaviour of C11 Atomic Tests for OpenCL-3.0 (#944)
* Change setup code in `KernelCode()` to use `_explicit` builtin
variants that are common to both OpenCL-2.X and OpenCL-3.0.

* Only test optional supported builtin variants (`_explicit` signature
 memory_order/scope) for OpenCL-3.0.

* Disable program scope global variable and generic address space tests
for a OpenCL-3.0 driver which does not optionally support these
features.
2020-09-22 09:08:32 -07:00
Nikhil Joshi
f7a0936879 Add check for Read-Write images support (#965)
* 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.
2020-09-22 09:05:58 -07:00
Kévin Petit
aee9131f87 Print the latest conformance version passed reported by the device (#959)
Fixes #798

Signed-off-by: Kévin Petit <kpet@free.fr>
2020-09-22 09:04:02 -07:00
David Avedissian
3db1a9b3aa Ensure that test_preprocessors checks __OPENCL_C_VERSION__ correctly for CL 3.0 contexts. (#938) 2020-09-17 09:42:58 +01:00
Jesse Natalie
7fd87c704a Use power-of-two alignment values for allocating pixel data (#827) 2020-09-11 00:25:58 +01:00