- Remove the build_<platform> scripts that were simply calling cmake in favor of
using cmake directly
- Move flag CRT_SECURE_NO_WARNING into a section specifically for visual studio
- Change vendor file selection to just use the file if present
- Add a variable for determining whether to link against pthread
- Delete all lines in CMakeVendor.txt so each implementation can define their own
Change-Id: Ibbd83521ce4d42d09dcbd0b16efa9fbe6cbf785d
When running sub-tests explicitly on the command line and that sub-test
fails, the test harness returns `0` from `main()`. This is problematic
in automated testing environments as failed tests can be hidden.
This patch iterates over all the test results in the `resultTestList`
after all sub-tests have completed, if any of the tests failed a
non-zero value is returned from `parseAndCallCommandLineTests()` which
is then propagated up the call stack to `main()`.
The host compiler will not always calculate reference values
the same, depending on optimization level. It generates
instructions that do not respond to CPU rounding mode in
the same way. Use QCOM rounding mode emulation to correctly
calculate reference values on aarch64.
Fix validate_float/half_write_results so that when nan/inf is
encountered on a channel, the rest of the channel values are still
considered for correctness.
Signed-off-by: John Kesapides <john.kesapides@arm.com>
Signed-off-by: James Morrissey <james.morrissey@arm.com>
Co-authored-by: John Kesapides <john.kesapides@arm.com>
In embedded profile with cles_khr_int64 support,
the test did not consider the size of long. Thus the
number of argument computation was not coherent with
the returned CL_DEVICE_MAX_PARAMETER_SIZE leaded to test failure.
We fix this by taking the size of long when cles_khr_int64
is available in the device extension.
* Fail feature macro compare if compiler has more features than runtime
Because a C++11 `std::equal` only iterates over the first container, and
matches with items in the second, if the second container contains more items
the check can still pass even though they're not identical. Just use `==`
instead.
Fixes#979
* Move an expression to its point of use
A previously created Image was not being released leading to a
memory leak.
Change-Id: I9715b5c4193a8e89c6c182b443959009ce1f1129
Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com>
- Remove the requirement to detail values for device queries and list
extensions in the submission template. They are printed by computeinfo.
- Require that tests skipped in accordance with the conformance
process be listed in the submission template.
- Remove support for OPENCL_1_0_DEVICE. This variable doesn't control
anything anymore and the updated conformance process no longer refers
to it.
- Require that implementations running via a loader document the loader
that was used.
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
* add test_compiler test for OpenCL C versions
* add checks for required OpenCL C versions
* bugfix: only OpenCL C 2.0 is required for OpenCL 2.1 and 2.2
* pass reference to feature struct vs. pointer
* address review comments regarding C++ identifiers and 3d image writes
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>
* initial version, tests vec2 and vec4
* added all types and vector sizes
* fix formatting
* add checks for long and ulong support
* test floats unconditionally, not tied to long support (oops)
* fix for vec3 kernel arguments
* remove generic address space dependency
* This removes API specific csv files, as these are no longer required.
This also updates opencl_conformance_tests_quick.csv to include >= 2.0 tests.
No changes were required for opencl_conformance_tests_full.csv.
Addresses #863
* Pass the correct arguments to test_spirv_new.
* Test feature macro OpenCL 3.0
* Test feature macro OpenCL 3.0 - refactor to template function
* Use test_error and format fix issues
* Fix returned value type for CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE
* Code format fix
* Feature macro test - refactor code to have one test case
* add consistency checking comparing supported features to CL_DEVICE_OPENCL_C_FEATURES
* fix minor issues
* Feature macro test - fix test version
* Feature macro test - add -cl-std=CL3.0 build option
* Feature macro test - compilation errors
* Feature macro test - compilation errors OSX
* Feature macro test - fix adding build options
* Feature macro test - share function OutputBuildLogs
* Feature macro test - back removed cases
* Feature macro test - review fixes
* Feature macro test - split check image formats
* Feature macro test - fixed version
* Use Version type for cl_khr_spir extension version checks
The current method of using `std::find(versions, 1.2f)` is unreliable due to
performing a floating point comparison. I.e. on some compiles it will
spuriously report that the required version is missing and skip the tests.
* Address clang-format failure.
* Correct typo.
* The `atomic_flag` test assumes support for the `atomic_scope_device`
scope in the global scope test case. Since `atomic_scope_device` is
optional on an OpenCL-3.0 driver, this test should check for support and
skip otherwise.
The generator function for atomic_fence uses the current workgroup
size to determine the number of non atomic variables per thread
in the kernel. The kernel should hence be regenerated when the
workgroup size changes.
However regenerating the kernel can itself change the workgroup
size. This change introduces an iterative loop that reduces the
workgroup sizes by 2 each time re-generating the kernel until
we find one that works (or exit at groupsize == 1)
Change-Id: Ic32fe967e32de6643e01c6775f4bddbcad0a299a
* Change setup code in `KernelCode()` to use `_explicit` builtin
variants that are common to both OpenCL-2.X and OpenCL-3.0.
* Only test optional supported builtin variants (`_explicit` signature
memory_order/scope) for OpenCL-3.0.
* Disable program scope global variable and generic address space tests
for a OpenCL-3.0 driver which does not optionally support these
features.
* Fix enqueue_flags test to use correct barrier type.
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.
* Add check for support for Read-Wrie images
Read-Write images have required OpenCL 2.x.
Read-Write image tests are already being skipped
for 1.x devices.
With OpenCL 3.0, read-write images being optional,
the tests should be run or skipped
depending on the implementation support.
Add a check to decide if Read-Write images are
supported or required to be supported depending
on OpenCL version and decide if the tests should
be run on skipped.
Fixes issue #894
* Fix formatting in case of Read-Write image checks.
Fix formatting in case of Read-write image checks.
Also, combine two ifs into one in case of
kerne_read_write tests
* Fix some more formatting for RW-image checks
Remove unnecessary spaces at various places.
Also, fix lengthy lines.
The called function (get_device_info_string) subtracts 1 from
length before returning it. Hence, to check for an empty string
(that the spec requires the implementation to return when
CL_DEVICE_IL_VERSION is not supported) the check should be modified
to check for empty and not length == 1
As per the spec CL_PROFILING_COMMAND_COMPLETE is required to
be equal to CL_PROFILING_COMMAND_END only on devices that
do not support the on-device queue.
For other cases it can be >= CL_PROFILING_COMMAND_END
The test attempts to build a program from source containing invalid code, to
provoke a build failure. In offline compilation mode, this causes the offline
compiler to give an error, failing the test.
Signed-off-by: Einar Hov <einar.hov@arm.com>
* Merge vec_step and vec_align binaries into a new vectors binary
This change just merges the two suites to reuse common functions
and definitions. There is probably room for further code consolidation
but probably best done as a separate change.
Contributes to #683
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
* format fixes
* added pipes test
clang-format fixes
* simplify diffs
* added pipes test
clang-format fixes
* simplify diffs
* add Program Scope Global Variables consistency test
* switched other checks to test_assert_error
* add non-uniform work group consistency test
* added read-write images consistency test
* add Creating 2D Images from Buffers consistency test
* add Device and Host Timer Synchronization consistency test
* add Intermediate Language Programs consistency test
* add Subgroups consistency test
* add Program Initialization and Clean-Up Kernels consistency test
* add 3D Image Writes consistency test
* clang-format fixes
* switch the check for 3D image writes extension for clarity
* add Depth Images consistency test
* update test for CL_QUEUE_SIZE, must return CL_INVALID_COMMAND_QUEUE
* formatting fixes
* fix copy-paste typo
* change expected error codes to CL_INVALID_OPERATION
* address review comments
* fix formatting
* address review feedback
Since pipes are cl_mems, We can spec and test that clGetPipeInfo
returns CL_INVALID_OPERATION when pipes are not supported by
passing a non-pipe memory object to the function.
* use the CTS framework to choose the OpenCL C version
* address review feedback
Cast input array to floats before setting NANs which are also floats to
prevent large nonsensical numbers outside of the valid domains of
several math functions from being tested.
Khronos Bug: https://github.com/KhronosGroup/OpenCL-CTS/issues/491
Test Suite Affected: bruteforce Subtests: sin, cos, sincos, reciprocal
Change-Id: Ie029837f4f9dfc73d6a9c356b73158e2ad41b871
* 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.
In two places, a stray semicolon between an if statement and its body
would cause the body to be executed unconditionally. Fix this.
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
* Pass `-cl-std=CL3.0` as build option for OpenCL-3.0.
* For an OpenCL-3.0 driver that optionally does not support non-uniform
work-groups round up the global size and run the tests with uniform
work-groups. This increases coverage and allows testing of the
`get_enqueued_local_size` builtin for uniform work-groups.