Commit Graph

248 Commits

Author SHA1 Message Date
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
543cbe769c 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:33:50 +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
814dd8adc0 Refactor code for getting CL_DEVICE_ADDRESS_BITS 2019-07-05 14:27:25 +01:00
Stuart Brady
36dfbd4162 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:25 +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
ab36d94dd0 Reindent parameter parsing code 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
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
Grzegorz Wawiorko
3c3820dbcb Intel compiler changes compat.h (#285) 2019-06-11 09:24:27 +01:00
Grzegorz Wawiorko
616af4e2d8 Intel compiler changes compat.h (#290) 2019-06-11 09:24:10 +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
Grzegorz Wawiorko
8dc3ae30d0 Test case registration fix test Issue 278 (#279) 2019-05-23 12:58:05 +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
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
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
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
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
f747995668 cl21: Reuse test harness code in kernel_read_write (#242)
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:19:47 +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
Wenju He
17b102e2e4 Fix ilogbl crash and fetestexcept build if _MSC_VER>=1800 (#230)
FP_ILOGB0, FP_ILOGBNAN, ilogbm, ilogbf, ilogbl, fetestexcept and
feclearexcept are supported in Visual Studio 2013.
2019-04-29 20:41:01 +08: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
Radek Szymanski
a82e620b98 cl21: Test Harness minor cleanup (#185)
* 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:14 +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
Grzegorz Wawiorko
700e68c732 cl21: Improved CRC calculation (#132)
* Improved CRC calculation

* Improved CRC calculation - review fix

* Improved CRC calculation - build brake fix

* Improved CRC calculation - remove external initializaiton
2019-04-18 14:59:04 +01:00
Radek Szymanski
76cedbb21c cl22: Save results to JSON file
Add option to save results to JSON file by passing environment variable.

Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2019-04-12 12:29:57 +01:00
Radek Szymanski
675d188040 cl21: Save results to JSON file
Add option to save results to JSON file by passing environment variable.

Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2019-04-12 12:29:45 +01:00
Grzegorz Wawiorko
c1cd117265 Make wimpy factor argument parsing logic common (#155) 2019-04-11 12:10:45 +01:00
Kévin Petit
8d209840be cl20: Khronos Bug 16236: Support CL_DEPTH images in the image helpers when using the border colour (#149)
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-04-10 13:25:13 +01:00
Grzegorz Wawiorko
eea888bfe2 Khronos Bug 15691 kernel_preprocessor_macros test encodes file name and path in the SPIR-V binaries (#129) 2019-04-10 13:22:13 +01:00
Grzegorz Wawiorko
636a1cc4f5 Khronos Bug 15691 kernel_preprocessor_macros test encodes file name and path in the SPIR-V binaries (#130) 2019-04-10 13:21:48 +01:00
Radek Szymanski
07196c351a cl22: Use single array for function list (#148)
Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2019-04-10 12:30:38 +01:00
Radek Szymanski
50ba83e754 cl21: Use single array for function list (#147)
Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2019-04-10 12:30:00 +01:00
Kevin Petit
b4a002befe Remove build systems other than CMake
Make it clear that CMake is the only supported build system.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-03-15 09:48:12 +00:00
Kevin Petit
b6446a2f1d Remove build systems other than CMake
Make it clear that CMake is the only supported build system.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-03-15 09:47:56 +00:00
Kevin Petit
95b040bec2 Synchronise with Khronos-private Gitlab branch
The maintenance of the conformance tests is moving to Github.

This commit contains all the changes that have been done in
Gitlab since the first public release of the conformance tests.

Signed-off-by: Kevin Petit kevin.petit@arm.com
2019-03-05 16:24:50 +00:00
Kevin Petit
05a11d8e49 Synchronise with Khronos-private Gitlab branch
The maintenance of the conformance tests is moving to Github.

This commit contains all the changes that have been done in
Gitlab since the first public release of the conformance tests.

Signed-off-by: Kevin Petit kevin.petit@arm.com
2019-03-05 16:24:34 +00:00
Kevin Petit
de6c3db41b Add OSX to the list of Travis CI OSes
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2018-11-09 11:46:07 +00:00
Kedar Patil
c3a61c6bdc Initial open source release of OpenCL 2.1 CTS. 2017-05-16 18:48:39 +05:30
Kedar Patil
2821bf1323 Initial open source release of OpenCL 2.2 CTS. 2017-05-16 18:44:33 +05:30