...and mark tests that exercise new-style entrypoints as requiring 2.0
These tests give us (or rather will give us once made exhaustive, see
#508) coverage for both new-style and old-style creation entrypoints,
making the entrypoint used in other tests irrelevant as long as the
old-style entrypoints are required to be implemented.
Signed-off-by: Kévin Petit <kpet@free.fr>
As agreed in the WG calls, the query tests are sufficient to cover
both old-style and new-style sampler and command queue creation
entrypoints.
Use old-style entrypoints in all tests that don't require 2.x
features to get compatibility with 1.x implementations.
This makes it possible to remove duplicate compatibility tests.
Contributes to #494.
Signed-off-by: Kévin Petit <kpet@free.fr>
* Test name adjustment and Windows compilation clarification.
* Add CLConform_GL_LIBRARIES_DIR CmakeLists variable for GL support
* GL sharing tests - library names justification
* Fix compilation errors function are overridden in glext.h.
- whitespace diffs
- trivial differences (mostly bugfixes merged to master)
- use of the kernel helpers to create programs
Signed-off-by: Kévin Petit <kpet@free.fr>
Use clCreateCommandQueue before OpenCL 2.0.
This enables most of the binaries to run to completion on a
1.2 implementation.
Signed-off-by: Kévin Petit <kpet@free.fr>
* Reformat SPIR-V assembly using spirv-dis
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
* Fix duplicate non-aggregate type decls in SPIR-V as reported by spirv-val
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
* Reposition OpExtensions correctly in SPIR-V as reported by spirv-val
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
* Reposition OpVariables correctly in SPIR-V as reported by spirv-val
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
* Add missing OpTypeImage access qualifiers in SPIR-V as reported by spirv-val
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
* Remove same-width OpSConverts in SPIR-V as reported by spirv-val
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
* Replace -ILPath with --spirv-binaries-path in README
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
* Introduces the ability to capture the kernel sources and the build
options used by the conformance tests to a .cl and .options files.
This is achieved via a new compilation cache mode called dump-cl-files.
Files will be generated to the folder pointed by the compilation cache
path.
When a conformance test is executed with dump-cl-files cache mode and online
compilation mode, the files will be saved to the disk and the regular execution
flow of the conformance continues uninterrupted.
When a conformance test is executed with dump-cl-files cache mode and binary or spir-v
compilation mode, the files will be saved to the disk as well, however the compilation
will fail - leading to a failure in all test cases.
* Introduces the ability to capture the kernel sources and the build
options used by the conformance tests to a .cl and .options files.
This is achieved via a new compilation cache mode called dump-cl-files.
Files will be generated to the folder pointed by the compilation cache
path.
When a conformance test is executed with dump-cl-files cache mode and online
compilation mode, the files will be saved to the disk and the regular execution
flow of the conformance continues uninterrupted.
When a conformance test is executed with dump-cl-files cache mode and binary or spir-v
compilation mode, the files will be saved to the disk as well, however the compilation
will fail - leading to a failure in all test cases.
* merged with latest CTS code
* Require exact for match normals, instead of arbitrary .005 relative error
* Add relaxation to allow 0 when float denormal is expected
* Refactor to use common validation function
In all these cases, the new entrypoint is not necessary. These
changes enable the tests to work or are a necessary step to get
the tests to work on an OpenCL 1.2 implementation.
While this may not be the final approach we want to solve this
specific compatibility issue, it also has the nice property of
reducing the diff with cl12_trunk until we merge.
Signed-off-by: Kévin Petit <kpet@free.fr>
The cl_arm_printf extension uses a call-back to tell the user-code
that some printf output has appeared from the execution of the CL
kernel.
The extsiting Printf tests assume output to stdout.
This change adds code to detect the cl_arm_printf extension, and an
implementation of the callback code to write to stdout.
Also fix a couple of formatting errors and don't "poll" when waiting
for events.
Signed-off-by: Mats Petersson <mats.petersson@arm.com>
Test was not cleanig up all of the kernels and programs that it creates,
which results in our driver finding that the common context still has
references when exiting. The reason for not cleaning all kernels and
programs was that it used a hard-coded constant 3 instead of the actual
number of address spaces.
This fixes the leak, and makes the code a little clearer by adding an enum
describing each address space, rather than using magic numbers.
Signed-off-by: Mats Petersson <mats.petersson@arm.com>
This change reimplements offline compiler invocation, using a new command
line interface that allows the passing of relevant CL device information
to the offline compiler. The information that is passed is as follows:
* CL_DEVICE_ADDRESS_BITS
* CL_DEVICE_EXTENSIONS
* CL_DEVICE_IL_VERSION (with --compilation-mode=spir-v only)
* CL_DEVICE_VERSION
The interface for the offline compiler script is as follows:
usage: cl_offline_compiler --source FILE --output FILE
--cl-device-info FILE --mode MODE
-- [BUILD_OPTIONS [BUILD_OPTIONS ...]]
positional arguments:
BUILD_OPTIONS additional options to pass to the compiler
optional arguments:
--source FILE OpenCL C source file to compile
--output FILE SPIR-V or binary file to create
--cl-device-info FILE OpenCL device info file
--mode compilation mode (spir-v or binary)
The OpenCL C version for compilation is now specified in BUILD_OPTIONS,
as normal for online compilation, i.e. with -cl-std=VERSION.
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
- remove compiler-specific options
- disable GNU extensions
- require C++11 and C99 for the whole code base
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
The local parsing of arguments in test_select.c throws away any unknown
arguments. Pass these to parseCustomParam() before the local argument
parsing, so that the offline compilation options work as expected.
Fixes#327.
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
Use the non-compatibility version.
In each case the diff was minimal, didn't have modifications that
would invalidate compatibility testing and it was clear that the
"latest/best" version was not the one in the compatibility copy.
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
This removes all the duplicated code from each test, and moves it to
test harness so that we have single place where this information is
printed.
Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
The test has been ignoring potential failures in memory allocations,
giving misleading error messages.
Add a simple check and return early if the allocation failed.
Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>