Commit Graph

106 Commits

Author SHA1 Message Date
Stuart Brady
74f82665d0 Reindent parameter parsing code 2019-07-05 14:27:13 +01:00
Stuart Brady
90b0c52584 Remove source transformation support
This change removes support for the "source" mode of offline compilation
which is commented with "to be removed in the future as we will use
offline compiler here".

The "source" mode allowed for the CL source to be transformed by
build_script_source.py and then passed to clCreateProgramWithSource(),
and appears to have been developed only for the purpose of testing the
offline compilation infrastructure.
2019-07-05 14:27:13 +01:00
Wenju He
e7586a7a78 c11_atomics: fix ambiguous call atomic_fetch_add (#361)
Cast operand type to AddSubOperandType.
2019-07-05 11:37:00 +01:00
Nikhil Joshi
6e29a04870 Fix enqueue_flags test to use correct barrier type. (#276)
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.
2019-07-03 14:11:02 +01:00
Grzegorz Wawiorko
7b711091ee Fix test_api - query for device extensions in queue hint test (#351) 2019-07-03 12:16:16 +01:00
robquill
39c1d81b05 Use slice pitch instead of row pitch for 1D arrays. (#331)
Fixes fill_image 1Darray
2019-06-18 10:27:56 +01:00
Grzegorz Wawiorko
cb78c73aa5 Enable compilation of spir 1.2 tests (#305)
* Enable compilation of spir 1.2 tests

* Files to copy as a list of files.
2019-06-17 13:00:10 +01:00
Grzegorz Wawiorko
8c7bd610d9 Intel compiler bruteforce - fix signbitl function (#288) 2019-06-11 09:42:27 +01:00
Grzegorz Wawiorko
802995053a Intel compiler changes in cmake (#286) 2019-06-11 09:26:36 +01:00
Grzegorz Wawiorko
53189e3fba Intel compiler - fix assert when checking OCL version (#287) 2019-06-11 09:25:39 +01:00
Grzegorz Wawiorko
3c3820dbcb Intel compiler changes compat.h (#285) 2019-06-11 09:24:27 +01:00
Marco Antognini
bc0000ba10 Improve exit codes (#32) (#296)
This patch ensures runTestHarness returns either EXIT_FAILURE or
EXIT_SUCCESS to avoid undefined behaviour.
2019-05-31 11:41:46 +01:00
Nikhil Joshi
2edcc56117 Fix test_host_queue_order not to rely on bit accurate float ops (#277)
Currently, test_host_queue_order relies on bit accurate float ops.
It expects expects that sqrt((float)i * i) == i.
This is not always true due to floating point precision limitations.
The test does not really need the sqrt operation and it can be removed
instead of trying to correct the floating point check.

Replace problematic float operation with constant value of 1.
2019-05-29 11:09:28 +01:00
Grzegorz Wawiorko
171c35429a Fix Issue #35 - ask for capability size. Too small size could cause errors (#280)
* Fix Issue #35 - ask for capability size. Too small size could cause errors

* Fix Issue #35 - Review fixes

* Fix Issue #35 - Review fixes - build issues fixed
2019-05-23 18:19:37 +01:00
Grzegorz Wawiorko
8dc3ae30d0 Test case registration fix test Issue 278 (#279) 2019-05-23 12:58:05 +01:00
Radek Szymanski
f60f3ef9b5 Add minimal required version functionality (#271)
This adds functionality to define minimal required version through the
ADD_TEST* macros. Tests that don't meet the version requirement will
be skipped.

By default the minimal required version is set to 1.0, subsequent
patches will set the appropriate version for each of the tests.

Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2019-05-22 18:29:51 +01:00
Radek Szymanski
dcbf54aa91 Use test_status for test results (#273)
This moves from numeric values to enum values to keep result state of
the test, so we can easily save this information in JSON results.

Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2019-05-17 14:30:21 +01:00
Grzegorz Wawiorko
343d29a199 Fix Issue 264 - travis builds configuration fixed because of changes in icd loader project (#266) 2019-05-14 20:47:56 +01:00
Kévin Petit
509172b780 cl20: Khronos Bug 16235: Allow the barrier test to pass in isolation (#262)
The input buffer to tests in execute_block suite is set to some
value (0xdeadbeef) but supposed to be reset in each test such
so that observing 0 after executing the test guarantees that
the status is that of the test and not a pre-existing value.

This commit adds missing initialisation to block_barrier kernel code
and removes an extra redundant barrier at the end.

This test is the last in the suite. After executing other tests the
input/output buffer is not being reset on a host side and therefore
running the test after successful execution of the previous test
(resulting in writing expected 0 into the buffer) was hiding the
problem.

Change-Id: Ia9310d095993703c32ee1f664aed9ff72b26367a
Signed-off-by: Anastasia Stulova <anastasia.stulova@arm.com>
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-05-03 01:16:46 +08:00
Kévin Petit
d536a019d1 Bugfix for Khronos Bug 16242. (#261)
Use convert_int_rte for the result of the sqrt instead of casting to int.

Fixes possible rounding issues.
2019-05-03 01:16:31 +08:00
Kévin Petit
6890b58c6f cl21: Khronos Bug 16192: Make image helpers work on ARM hosts (#260)
This fix is required due to char defaulting to unsigned on
arm platforms while the test code assumes char will be signed.

Signed-off-by: Sam Laynton <sam.laynton@arm.com>
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-05-03 01:16:17 +08:00
Kévin Petit
59cfeb926a Update Travis badge to master branch (#258)
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-05-02 17:05:11 +08:00
Radek Szymanski
f635b604f7 cl22: Reuse test harness code in kernel_read_write (#243)
Some of the setup functionality is already there in the test harness, so
use that and remove the duplicated code from within the suite.

Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2019-05-01 21:20:30 +08:00
Radek Szymanski
97c11cff1d cl22: Reuse test harness code in contractions (#254)
Some of the setup functionality is already there in the test harness, so
use that and remove the duplicated code from within the suite.

Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2019-05-01 19:10:15 +08:00
Radek Szymanski
621c47105c cl22: Reuse test harness code in headers (#257)
Some of the setup functionality is already there in the test harness, so
use that and remove the duplicated code from within the suite.

Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2019-05-01 19:08:45 +08:00
cdai2
46ac283384 Fix Issue #53: required buffer size exceed the available size in non_uniform_work_group (#248) 2019-04-30 22:22:20 +08:00
Pierre Moreau
2967b1d705 cl22: CMake improvements (#237)
* Do not append non-existing folder to CMAKE_MODULE_PATH

Fixes #221

* Define CL_TARGET_OPENCL_VERSION to 220

Fixes #227

* Define cmake_minimum_required as first operation

The CMake documentation mentions that
> Call the cmake_minimum_required() command at the beginning of the
> top-level CMakeLists.txt file even before calling the project()
> command. It is important to establish version and policy settings
> before invoking other commands whose behavior they may affect.

* CMake: Match both AppleClang and Clang
2019-04-30 22:20:45 +08:00
Radek Szymanski
7ce7609a46 cl22: Reuse test harness code in samplerlessReads (#246)
Some of the setup functionality is already there in the test harness, so
use that and remove the duplicated code from within the suite.

Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2019-04-30 22:18:21 +08:00
Wenju He
f6a4879c7b Fix ilogbl crash and fetestexcept build if _MSC_VER>=1800 (#238)
FP_ILOGB0, FP_ILOGBNAN, ilogbm, ilogbf, ilogbl, fetestexcept and
feclearexcept are supported in Visual Studio 2013.
2019-04-29 20:42:20 +08:00
Pierre Moreau
6e9736cf1e Fix typos in main CMakeLists.txt (#234) 2019-04-27 08:35:04 +08:00
Pierre Moreau
e597cb53b8 Add toggle for enabling OpenGL ES interop tests 2019-04-26 01:38:51 +01:00
Pierre Moreau
e0091e7cf6 Mark the graphics interop toggles as options
This allows enabling/disabling them via CMake without editing the
CMakeLists.txt file.
2019-04-26 01:38:51 +01:00
Pierre Moreau
c294da4de1 Fix compilation of gl/main.cpp
Fixes 07196c35 ("cl22: Use single array for function list (#148)")
2019-04-26 01:38:51 +01:00
Pierre Moreau
c4b22fd2cb gl: Add missing tests to the CMakeLists.txt 2019-04-26 01:38:51 +01:00
Pierre Moreau
58c7b644fa gl: Remove non-existent file and fix compilation 2019-04-26 01:38:51 +01:00
Wenju He
2eea74bc95 Use unique tmp file to allow parallel printf tests (#215)
Parallel printf tests fail because they use the same file /tmp/tmpfile
to capture OpenCL kernel outputs. This patch solves this problem by
using a unique file for each process.
2019-04-25 18:10:46 +01:00
Radek Szymanski
355b2d2460 cl22: Reuse test harness code in clFillImage (#202)
Some of the setup functionality is already there in the test harness, so
use that and remove the duplicated code from within the suite.

Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2019-04-25 02:48:15 +01:00
Radek Szymanski
cd0af9ca25 cl22: Reuse test harness code in clCopyImage (#199)
Some of the setup functionality is already there in the test harness, so
use that and remove the duplicated code from within the suite.

Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2019-04-25 02:44:57 +01:00
Radek Szymanski
f42a688ac2 cl22: Reuse test harness code in clReadWriteImage (#208)
Some of the setup functionality is already there in the test harness, so
use that and remove the duplicated code from within the suite.

Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2019-04-25 02:15:12 +01:00
Radek Szymanski
5f261cb57e cl22: Reuse test harness code in clGetInfo (#205)
Some of the setup functionality is already there in the test harness, so
use that and remove the duplicated code from within the suite.

Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2019-04-25 01:56:02 +01:00
Radek Szymanski
5233855ca8 cl22: Reuse test harness code in kernel_image_methods (#211)
Some of the setup functionality is already there in the test harness, so
use that and remove the duplicated code from within the suite.

Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2019-04-24 04:28:15 +01:00
Radek Szymanski
8a8ebf29b0 cl22: Reuse test harness code in half (#192)
Some of the setup functionality is already there in the test harness, so
use that and remove the duplicated code from within the suite.

Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2019-04-22 12:09:32 +01:00
Wenju He
2c9ba4b352 Remove redundant releaseOutputStream call in printf (#218) 2019-04-22 12:07:26 +01:00
Radek Szymanski
2668020fb7 cl22: Reuse test harness code in math_brute_force (#196)
Some of the setup functionality is already there in the test harness, so
use that and remove the duplicated code from within the suite.

Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2019-04-22 12:06:02 +01:00
Radek Szymanski
0c15c7039e cl22: Reuse test harness code in allocations (#189)
Some of the setup functionality is already there in the test harness, so
use that and remove the duplicated code from within the suite.

Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2019-04-22 12:02:17 +01:00
Wenju He
1de46f2ca1 Reuse math_brute_force ulp threshold in spir test
Spir test compares floating-point kernel results bit-by-bit with
correct results. However, for math_brute_force kernels, specification
does not ask for SPIR and OpenCL C path to match bit-to-bit. This patch
reuses ulps threshold from math_brute_force folder for math_brute_force
kernels in spir test.

Signed-off-by: Wenju He <wenju.he@intel.com>
2019-04-19 14:51:52 +01:00
Radek Szymanski
b5028806d8 cl22: Test Harness minor cleanup (#186)
* Report an error when unimplemented test was specified
* Merge two common functions

Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2019-04-18 15:10:26 +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
Jeremy Kemp
8e03195706 cl22: Compiler - updated extension list for compiler_defines_for_exensions (#176)
* cl12: Compiler - added missing extensions to compiler_defines_for_extensions.

Updated the list of known extensions to include all extensions referenced in the OpenCL Extension Specification 1.2 - Revision 25 and OpenCL Specification 1.2 - Revision 19 documents.

* Re-added the cl_khr_il_program extension.

This was this was erroneously removed in the previous commit.

* Compiler: Added all known extensions to compiler_defines_for_extensions.

After discussion on the pull request, it was decided to have this test test for all known khr extensions accross all API levels. Some vendors support 2.x extensions on 1.x implementations, so wanted to ensure that the test still covered those cases.

Re-ordered each sub-list so that the order in which each extension appears mirrors that of https://www.khronos.org/registry/OpenCL/specs/2.2/html/OpenCL_Ext.html.

For reference: https://github.com/KhronosGroup/OpenCL-CTS/pull/55.

* Compiler: Moved priority and throttle hints to the API-only section of the array in compiler_defines_for_extensions.
2019-04-16 14:46:25 +01:00
Radek Szymanski
2909b0ca86 cl22: Reuse test harness code in conversions (#180)
Some of the setup functionality is already there in the test harness, so
use that and remove the duplicated code from within the suite.

Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2019-04-16 11:52:33 +01:00