`CMAKE_CXX_STANDARD` is already set in the top-level CMakeLists.txt
file, so there is no need to have it repeated for individual modules.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
Remove unused variables throughout the code base and enable the
`-Wunused-variable` warning flag globally to prevent new unused
variable issues being introduced in the future.
This is mostly a non-functional change, with one exception:
- In `test_conformance/api/test_kernel_arg_info.cpp`, an error check
of the clGetDeviceInfo return value was added.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
* Using helper functions for clCreateKernel
Uses of clCreateKernel following create program helper
functions, have been incorporated into
create_single_kernel_helper when suitable.
Contributes #31
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
* Skip tests using clCompileProgram in offline mode
Contributes #31
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
* Using type wrappers when using kernel helper functions
Also includes fix for windows build
Fixes#31
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
* Remove clReleaseKernel for wrapped kernel
Fixes#31
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
* Remove binaries for spirv_new (#21)
Avoid storing binaries in version control, as it is generally not well
suited to this. Instead, in a followup commit we will add a script to
regenerate the .spv files from their sources.
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
* Add Python script to assemble spirv_new binaries (#21)
This also changes the ext_cl_khr_spirv_no_integer_wrap_decoration assembly
source so that the SPIR-V version is listed as 1.0, to ensure that the
output of spirv-dis exactly matches the assembly.
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
The Volatile, Coherent, NonWritable and NonReadable decorations can
only be applied to images if they are storage images, which require
the Shader capability.
Note that in SPIR-V 1.4 and later, the NonWritable decoration can
also be applied to objects in the Private and Function storage classes
(although Private also requires the Shader capability), but this was
not covered by the existing test for the NonWritable decoration.
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
* remove SPV_KHR_no_integer_wrap_decoration
* address review comments
* remove the assemble_spirv script
There is another PR in flight that adds a much more complete
script that we should merge instead.
* Adds testing for CL_PROGRAM_IL
Added a test to check SpirV as an IL for programs built with IL
which includes a negative test for programs built without IL.
Added a test_fail macro.
Fixes#164
Change-Id: I908241242b369551806e43b90ab414f895d5c8f7
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
* COMPUTE-11739 Removing unused platform and device_version
Fixes#164
Change-Id: Ib1168f6396132b69996d07166e1b593fa933d245
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
* New spirv_new test case OpSpecConstant OpSpecConstantTrue OpSpecConstantfalse
* Register test case with minimal OpenCL version
* Specialization constant - add files uint/int cases
* Specialization constants - fix second build program
* Fix changes clang format.
* spirv_new - Make functions visible outside of main
* Fix clang format issues
* Fix int/uint 32 bit cases
* Fix minimal required version for test_op_spec_constant
* Remove not needed OpName. Update binaries
* Fix code format
* Remove op_spec_constant_int cases in spirv_new tests
* op_spec_constant - add simplified spirv files
* no redundant OpUConvert OpSConvert
* no redundant OpName
* instead of buffers scalar variable
* op_spec_constant - refactor to address review issues
* avoid using program that has already kernel program attached
* remove not used buffer
* Simplified test case - instead of buffers use scalar variable
* spirv_new - remove spec_const duplicated cases (singed versions)
* spirv_new - set clSetProgramSpecializationConstant before clBuildProgram
* Test spirv_new - fix spec const after rebase
* Test spirv_new - fix spec const set min version for bool type tests
The OpenCL SPIR-V Environment Specification was updated to mandate that
all variables decorated with `BuiltIn` must be in the `Input` storage
class, see https://github.com/KhronosGroup/OpenCL-Docs/pull/278.
Global variables with the Input storage class have to be listed in the
entry points’ interface, which was also taken care of in this commit.
* 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>
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.
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 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>
* 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.
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
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