Commit Graph

121 Commits

Author SHA1 Message Date
Kévin Petit
be80a7feaf Align offline compilation with cl21_trunk (#400)
Add a special case for the Khronos compiler and always use it for
OpenCL C++, otherwise use the same logic as on the cl21_trunk
branch.

The CMake option to pass the path to the khronos compiler has
been renamed to KHRONOS_OFFLINE_COMPILER_OPTIONS and is no longer
mandatory.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-07-30 11:52:31 +01:00
Grzegorz Wawiorko
bcf994c3a3 Fix building media sharing tests (#389)
* Add media_sharing to cmakes

* Adjust cases to ADD_TEST macro

* Review fixes
2019-07-29 16:07:52 +01:00
Wenju He
1d2e0ca248 Fix SVM if 64-bit atomic extensions are supported (#396)
Need to enable 64-bit atomic extensions in kernel source.
Use InterlockedCompareExchange64 for 64-bit type.
2019-07-24 18:54:20 +01:00
Grzegorz Wawiorko
64dba66718 Fix compilation in D3D cases (#392)
* Fix compilation in D3D cases

* Use existing harness include search path.
2019-07-24 14:19:26 +01:00
Stuart Brady
9cfca7e69e Split offline compilation into multiple functions 2019-07-19 10:45:57 +01:00
Stuart Brady
fe3049a491 Refactor handling of device ID for offline compilation
This also cleans up error handling in get_device_address_bits().
2019-07-19 10:45:57 +01:00
Wenju He
702498b367 test_basic/progvar: fix 64bit atomic types error (#374)
Enable 64bit atomics extentions in order to use 64bit atomic types in
test_progvar_prog_scope_init and test_progvar_prog_scope_uninit.
2019-07-15 10:47:20 +01:00
Grzegorz Wawiorko
7ee74ae17f Fix spirv path in bruteforce tests (#357)
* Fix spirv path in bruteforce tests

* Compilation fix - align_malloc already defined in kernelHelpers.c

* Fix spirv path in bruteforce tests - more places
2019-07-10 13:56:38 +01:00
Grzegorz Wawiorko
00d0b0ddd7 Test fix - Test computeinfo should know each existing OCL version (#366) 2019-07-08 16:39:22 +01:00
Stuart Brady
c45d5b6a20 Update command line parameters for offline compilation
This change simplifies the command line interface for controlling offline
compilation.  It replaces special command line syntax for controlling the
compilation cache for SPIR-V compilation, with generic command line
parameters that can now also be used for binary offline compilation.
2019-07-08 11:34:02 +01:00
Stuart Brady
6eec559ffd Rename gSpirVPath to gCompilationCachePath
gSpirVPath controls the location of the compilation cache for SPIR-V
offline compilation, but its use would also make sense for binary
offline compilation.  This change renames it to gCompilationCachePath.
2019-07-08 11:34:02 +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
8b34a55cfc Refactor code for getting CL_DEVICE_ADDRESS_BITS 2019-07-05 14:27:13 +01:00
Stuart Brady
e4cf3190b7 Refactor is_extension_available()
This change splits up is_extension_available() so that the bulk of it
can be reused for fetching other items of variable-length device
information, such as CL_DEVICE_VERSION.
2019-07-05 14:27:13 +01:00
Stuart Brady
5dfedb3d43 Rename gOfflineCompilerInput/Output locals
These are local variables, and wrongly start with a "g" indicating that
they are globals.
2019-07-05 14:27:13 +01:00
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