1486 Commits

Author SHA1 Message Date
Grzegorz Wawiorko
c6f515c0d3 Test fix - Test computeinfo should know each existing OCL version (#368) 2019-07-08 16:38:49 +01:00
Stuart Brady
0b1520f508 Refactor setting of compilation mode and cache mode
This change refactors the setting of the compilation mode, so that
instead of using a 'gOfflineCompiler' bool together with a
'gOfflineCompilerOutputType' enum, a single 'gCompilationMode' enum
is used.  The default value for gCompilationMode is 'kOnline', which
is equivalent to the previous defaulting of gOfflineCompiler to false.

In addition, it refactors the setting of the compilation cache mode,
so that instead of the 'gForceSpirVCache' and 'gForceSpirVGenerate'
bools, a single 'gCompilationCacheMode' enum is used.  The default
value for gCompilationCacheMode is 'kCacheModeCompileIfAbsent', which
is equivalent to the previous defaulting of both booleans to false.

This change also refactors create_openclcpp_program() to avoid saving
and restoring gOfflineCompiler and gOfflineCompilerOutputType.  Instead,
it now passes the desired compilation mode as a parameter.
2019-07-08 11:34:02 +01:00
Stuart Brady
f2f458b675 Rename gSpirVPath to gCompilationCachePath
gSpirVPath controls the location of the compilation cache for SPIR-V
offline compilation, but its name falsely implies that it is
SPIR-V specific.  This change renames it to gCompilationCachePath.
2019-07-08 11:33:50 +01:00
Stuart Brady
9be570cdf0 Refactor setting of compilation mode and cache mode
This change refactors the setting of the compilation mode, so that
instead of using a 'gOfflineCompiler' bool together with a
'gOfflineCompilerOutputType' enum, a single 'gCompilationMode' enum
is used.  The default value for gCompilationMode is 'kOnline', which
is equivalent to the previous defaulting of gOfflineCompiler to false.

In addition, it refactors the setting of the compilation cache mode,
so that instead of the 'gForceSpirVCache' and 'gForceSpirVGenerate'
bools, a single 'gCompilationCacheMode' enum is used.  The default
value for gCompilationCacheMode is 'kCacheModeCompileIfAbsent', which
is equivalent to the previous defaulting of both booleans to false.
2019-07-08 11:33:50 +01:00
Stuart Brady
5438c664a1 Rename gOfflineCompilerInput/Output locals
These are local variables, and wrongly start with a "g" indicating that
they are globals.
2019-07-05 14:27:25 +01:00
Stuart Brady
7486dd13ad 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:25 +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
e1874ba732 c11_atomics: fix ambiguous call atomic_fetch_add (#354)
Cast operand type to AddSubOperandType.
2019-07-05 11:37:23 +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
Nikhil Joshi
d6e5f29e22 Fix enqueue_flags test to use correct barrier type. (#348)
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:10:37 +01:00
Nikhil Joshi
9686ea098c Fix enqueue_flags test to use correct barrier type. (#349)
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:10:26 +01:00
Grzegorz Wawiorko
6c4bd13baa Bruteforce tests - make compatibility to cl20_trunk branch (#320) 2019-07-03 12:22:33 +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
Grzegorz Wawiorko
f7f6208f62 Fix test_api - query for device extensions in queue hint test (#352) 2019-07-03 12:16:05 +01:00
robquill
5fdacae98b Use slice pitch instead of row pitch for 1D arrays. (#313)
Fixes fill_image 1Darray
2019-06-18 10:28:46 +01:00
robquill
4eee1fe25e Use slice pitch instead of row pitch for 1D arrays. (#314)
Fixes fill_image 1Darray
2019-06-18 10:28:22 +01:00
robquill
6d2528f398 CL12: Use slice pitch instead of row pitch for 1D arrays. (#315)
* Use slice pitch instead of row pitch for 1D arrays.
Fixes fill_image 1Darray

* Use slice pitch instead of row pitch for 1D arrays.
Fixes copy_image 1Darray
2019-06-18 10:28:08 +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
176f9109db Test geometrics - compilation errors using Intel compiler - fix (#317) 2019-06-17 13:54:39 +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
7355eec211 cl20: Enable compilation of spir 1.2 tests (#306)
* Enable compilation of spir 1.2 tests

* Fix compilation issue

* Files to copy as a list of files.
2019-06-17 12:59:55 +01:00
Grzegorz Wawiorko
664b1ccf8d cl21: Enable compilation of spir 1.2 tests (#304)
* Enable compilation of spir 1.2 tests

* Files to copy as a list of files.
2019-06-17 12:59:44 +01:00
Grzegorz Wawiorko
25aaad13cd Fix compilation errors using ICC and MSVC - cmakes files (#319) 2019-06-17 12:57:26 +01:00
Grzegorz Wawiorko
c313d902b5 Intel compiler - changes in Utility.h (#321) 2019-06-17 12:56:40 +01:00
Grzegorz Wawiorko
7c30c49885 Intel compiler changes in cmake (#318) 2019-06-17 12:55:13 +01:00
Grzegorz Wawiorko
21934ae3ca Intel compiler bruteforce - fix signbitl function (#311) 2019-06-11 09:45:05 +01:00
Grzegorz Wawiorko
94beef7cd3 Intel compiler bruteforce - fix signbitl function (#292) 2019-06-11 09:42:44 +01:00
Grzegorz Wawiorko
8c7bd610d9 Intel compiler bruteforce - fix signbitl function (#288) 2019-06-11 09:42:27 +01:00
Grzegorz Wawiorko
53189e3fba Intel compiler - fix assert when checking OCL version (#287) 2019-06-11 09:25:39 +01:00
Grzegorz Wawiorko
0c1f8d3166 Intel compiler - fix assert when checking OCL version (#291) 2019-06-11 09:25:27 +01:00
Grzegorz Wawiorko
58916a4ddd Intel compiler - fix assert when checking OCL version (#308) 2019-06-11 09:25:14 +01:00
Marco Antognini
bc339c7b5a Improve exit codes (#32) (#298)
This patch ensures runTestHarness returns either EXIT_FAILURE or
EXIT_SUCCESS to avoid undefined behaviour.
2019-05-31 11:44:07 +01:00
Marco Antognini
d99f96fe18 Improve exit codes (#32) (#297)
This patch ensures runTestHarness returns either EXIT_FAILURE or
EXIT_SUCCESS to avoid undefined behaviour.
2019-05-31 11:43:02 +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
Nikhil Joshi
03813a9674 Fix test_host_queue_order not to rely on bit accurate float ops (#294)
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:04 +01:00
Nikhil Joshi
3bcc9935c5 Fix test_host_queue_order not to rely on bit accurate float ops (#295)
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:08:45 +01:00
Grzegorz Wawiorko
51db6e87cf cl20: Fix Issue #35 - ask for capability size. Too small size could cause errors (#95)
* Fix Issue #35 - ask for capability size. Too small size could cause errors

* Fix Issue #35 - fix windows compilation failure

* Fix Issue #35 - Review fixes

* Fix Issue #35 - Review fixes - build issues fixed
2019-05-23 18:20:59 +01:00
Grzegorz Wawiorko
fa312ab953 cl21: Fix Issue #35 - ask for capability size. Too small size could cause errors (#96)
* 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:51 +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
Radek Szymanski
0fce6d5d62 cl20: Add minimal required version functionality (#269)
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:31:52 +01:00
Radek Szymanski
bfb3e4aa2c cl21: Add minimal required version functionality (#270)
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:31:01 +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
Grzegorz Wawiorko
32e702efbc cl21: Fix Issue 38 - Test spirv_new - new test for cl_khr_spirv_no_integer_… (#119)
* Fix Issue 38 - Test spirv_new - new test for cl_khr_spirv_no_integer_wrap_decoration SPV_KHR_no_integer_wrap_decoration extension

* Remove not used variable.
2019-05-22 15:56:43 +01:00
Radek Szymanski
a6fdb7ce60 cl21: Use test_status for test results (#274)
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:31:55 +01:00
Radek Szymanski
27e666eb88 cl20: Use test_status for test results (#275)
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:31:11 +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
Sven van Haastregt
caae56d32c cl21: Add image access qualifier for spirv_new binaries (#272)
The OpenCL SPIR-V Environment Specification v2.2-10, Section 2.1
states that:

    For all OpTypeImage type-declaration instructions:
    The optional image Access Qualifier must be present.

Add the ReadOnly or WriteOnly qualifier as appropriate to the .spvasm
files, and regenerate the .spv files using

    spirv-as --target-env spv1.0
2019-05-15 19:02:06 +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