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.
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.
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.
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>
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>
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>
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>
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>
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>
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>
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.
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>
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>
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>
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>
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>
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>
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>
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>
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>
* 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.
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>