Commit Graph

849 Commits

Author SHA1 Message Date
Grzegorz Wawiorko
8fa24b8a72 Change arg type to unsigned int from signed int (#1031) 2020-11-06 11:31:56 +00:00
Radek Szymanski
83cc521e17 Remove unused code in clFillImage (#1036)
These declarations either aren't used or aren't needed, as testBase.h
already declares them.

Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2020-11-06 11:25:12 +00:00
Radek Szymanski
51d2e5003e Remove unused code in clGetInfo (#1038)
These declarations either aren't used or aren't needed, as testBase.h
already declares them.

Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2020-11-06 11:24:59 +00:00
Radek Szymanski
e31e3a6694 Remove unused code in clReadWriteImage (#1043)
These declarations either aren't used or aren't needed, as testBase.h
already declares them.

Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2020-11-06 11:24:46 +00:00
Kévin Petit
c8163e931f Fix a few typos and remove unused code (#1041)
Fixes #845
Fixes #844

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-11-06 11:24:15 +00:00
Kévin Petit
46fead41f4 Replace Travis CI with Github Actions (#1047)
* Replace Travis CI with Github Actions

Signed-off-by: Kevin Petit <kevin.petit@arm.com>

* Fix OpenGL coverage

* Tidy up

- Fix shell warning
- Remove ENABLE_OPENCL30_PROVISIONAL ICD CMake option
2020-11-06 11:23:50 +00:00
Kévin Petit
0e67969989 Fix build warning/error introduced by 8d443029 (#1042)
"control reaches end of non-void function"

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-11-06 10:09:33 +00:00
Stuart Brady
12fce84a66 Minor refactoring of CL_PROGRAM_SOURCE tests (#1032)
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
2020-11-04 12:44:54 +00:00
Yilong Guo
ac05575abc [api][test_zero_sized_enqueue] Add CL_SUBMITTED check for waiting status (#1012) 2020-11-04 09:02:11 +00:00
Radek Szymanski
c55ab4f503 Remove unused code in clCopyImage (#1027)
* Remove unused code in clCopyImage

Some of the declarations that are still used now moved to testBase.h
as these are reused throughout the image tests.

Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>

* Add missing file

Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2020-11-03 15:08:32 +00:00
David Avedissian
4e2d4c3a66 Remove uninitialised input buffer from test_zero_sized_enqueue (#952) 2020-10-30 15:02:08 +00:00
Alastair Murray
8894e7f046 Add memory_scope_all_devices testing (#999)
* Add memory_scope_all_devices testing

This duplicats memory_scope_all_svm_devices testing, but it seems pretty quick
so I don't think it hurts.

Fixes #990

* Address clang-format failures

* Address a further clang-format failure
2020-10-30 15:01:48 +00:00
Qinyu
67ab7a7010 Fix memory leak of test_basic (#943) (#948)
Fix issue https://github.com/KhronosGroup/OpenCL-CTS/issues/943.

Free buffer while verify fail.
2020-10-30 14:49:48 +00:00
Stuart Brady
337db8882a Remove spirv_new binaries and add Python script to generate them (#902)
* 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>
2020-10-30 14:38:39 +00:00
Jack Frankland
e7a23536e5 Skip Compiler Unload Tests in Binary Mode (#1025)
The following tests make calls to `clCompileProgram` or
`clBuildProgram` and therefore require a compiler in the runtime:
  * `unload_repeated`
  * `unload_compile_unload_link`
  * `unload_build_unload_create_kernel`
  * `unload_link_different↩`
  * `unload_build_threaded`
  * `unload_build_info`
  * `unload_program_binaries`

Skip these tests if no compiler is present in the runtime.
2020-10-30 14:29:19 +00:00
John Kesapides
e815bf3565 Fix min version for SPIRV test registration. (#1028)
Signed-off-by: John Kesapides <john.kesapides@arm.com>
2020-10-30 14:16:22 +00:00
Stuart Brady
af7d914514 Reformat test harness code (#940)
* Reformat common help text

Signed-off-by: Stuart Brady <stuart.brady@arm.com>

* Reformat test harness code

This goes part of the way to fixing issue #625.

Signed-off-by: Stuart Brady <stuart.brady@arm.com>
2020-10-30 14:13:52 +00:00
Ewan Crawford
55976fad35 Permit half overflow within allowable ULP (#600)
* Permit half overflow within allowable ULP

Modify the algorithm for calculating half precision ULP error so
that it duplicates the behaviour of the single precision ULP algorithm,
in regards to allowing overflow within the defined ULP error.

In the case where the test value is infinity, but the reference is
finite, pretend the test value is 63336.0 and calculate the ULP error
against that.

Encountered this while testing half precision `hypot()` in PR !529,
for inputs `hypot(-48864.0, 43648.0)` which has reference
`65519.755799`. With RTE rounding this only just rounds to `65504` as half,
and returning INF is currently infinite ULP error. Using the leniency
introduced by this change however the error is `~0.5` within the `2` ULP
bounds defined by the spec.

* Run clang-format over changes

Code now conforms to style guidelines and allows `check-format.sh` to pass.
2020-10-28 10:13:40 +00:00
Alastair Murray
f162c8b5ef Skip compiler unload/reload tests if compiler is not available (#986)
* Skip compiler unload/reload tests if compiler is not available

Note that tests that use the compiler helper functions but won't work without a
compiler are in the `subtests_to_skip_with_offline_compiler` list.  I didn't do
that here because they tests directly use `clBuildProgram` etc directly,
because they're specifically testing it's behaviour in edge-cases.

* Change type of status variable
2020-10-28 08:06:11 +00:00
Grzegorz Wawiorko
c2bca05a32 Add new subgroup extensions to the compiler test (#1009) 2020-10-28 08:04:05 +00:00
Sreelakshmi Haridas Maruthur
6adf4ead5c build: Various improvements. (#743) (#1006)
- 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
2020-10-21 10:02:22 +01:00
Kenneth Benzie
8d44302935 Return a non-zero exit-code when a sub-test fails (#951)
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()`.
2020-10-19 23:08:40 -07:00
Sreelakshmi Haridas Maruthur
b165de7649 conversions: Use ARM emulation for aarch64 (#967)
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.
2020-10-19 15:08:06 -07:00
Stuart Brady
90c9ea5d7c Fix compilation failure with -Werror=narrowing (#901)
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
2020-10-19 13:58:35 +01:00
james-morrissey-arm
0a8c5feed7 Fix floating point validation in write_image tests (#1017)
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>
2020-10-19 13:57:01 +01:00
ellnor01
a6809710ea Remove unnecessary cl_mem_flags casts (#1018)
* api, atomics: remove unnecessary cl_mem_flags casts

Instances in api, atomics, buffers and c11_atomics suites

Contributes #759

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>

* basic: remove unnecessary cl_mem_flags casts

Contributes #759

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>

* spir, thread_dimensions: remove unnecessary cl_mem_flags casts

Instances in spir, thread_dimensions and workgroups tests

Contributes #759

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>

* profiling, relationals: remove unnecessary cl_mem_flags casts

Includes relationals, profiling, muliple_device_context, integer_ops
tests

Contributes #759

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>

* clcpp: remove unnecessary cl_mem_flags casts

Contibutes #759

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>

* events, geometrics: remove unnecessary cl_mem_flags casts

Includes events, geometrics, gl and images tests

Contributes #759

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>

* commonfs, compiler: remove unnecessary cl_mem_flags casts

Includes cast removal in commonfs, compiler and device_partition tests

Fixes #759

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>

* Fix up formatting

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
2020-10-19 13:56:02 +01:00
julienhascoet
8ca1537157 Fix api/test_api_min_max for Embedded profile with cles_khr_int64 support (#994)
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.
2020-10-13 09:27:27 +01:00
Alastair Murray
d0e97361ae Add a binary compile mode CSV (#987)
This is identical to the SPIR-V spreadsheet, except spir-v mode is replaced by
binary mode.
2020-10-13 09:24:22 +01:00
Kévin Petit
020eea9e52 Don't require support for 3D image writes in tests that don't need it (#1003)
Also fix PASSIVE_REQUIRE_* macros to report tests as skipped instead of passed.

Signed-off-by: Kévin Petit <kpet@free.fr>
2020-10-05 13:20:51 -04:00
Chetan Mistry
7a735b74e3 Replace cl_ushort with cl_half (#885) (#1000)
* test_common: Replace cl_ushort with cl_half (#885)

Change-Id: I507eca2084629c3b6f3e7331f062f006edbce434
Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com>

* buffers, pipes, profiling: Replace cl_ushort with cl_half (#885)

Change-Id: Id9799322b636af6aa0eec3d4e846d7af8c7f9602
Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com>

* images/kernel_read_write: Replace cl_ushort with cl_half (#885)

Change-Id: I922ddb593b6e5631d0f4ea1522c7f75f8770be40
Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com>

* half: Replace cl_ushort with cl_half (#885)

Change-Id: I484a5bb2b33a7e87805fc6079953c66e5f8d9239
Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com>
2020-10-02 16:29:05 +01:00
julienhascoet
615ab64db5 Fix error handling for test_half (#997)
For vLoadHalf test, the error was
not properly returned leading to
test success whereas it failed.
2020-10-02 11:22:35 +01:00
Ben Ashbaugh
81cea4775e added extended versioning tests for OpenCL 3.0 (#996)
* added extended versioning tests for OpenCL 3.0

* address review feedback
v2020-10-01-00
2020-09-30 21:47:42 +01:00
Ben Ashbaugh
a9d06dcd81 add a basic test for CL_PIPE_PROPERTIES (#995) 2020-09-30 15:18:55 +01:00
Alastair Murray
26cacf056e Fail feature macro compare if compiler has more features than runtime (#982)
* 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
2020-09-30 11:06:45 +01:00
Chetan Mistry
a41e5a9ee0 samplerlessReads: Release Image to stop Memory Leak (#984)
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>
2020-09-30 09:50:21 +01:00
Kévin Petit
3320035581 Align with updated conformance process (#989)
- 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>
2020-09-29 13:51:49 -07:00
Ben Ashbaugh
beaecb71a3 add checks for OpenCL C versions (#968)
* 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
2020-09-28 00:26:57 +01:00
Ben Ashbaugh
951d010eaf add a new test to verify reported image formats (#963) 2020-09-28 00:22:49 +01:00
Stuart Brady
f732cd5b7e Remove invalid SPIR-V image decoration tests (#22) (#958)
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>
2020-09-25 14:57:41 +01:00
Ben Ashbaugh
bd86e2aa9b temporarily disable the unload_invalid test case (#978)
Different implementations of the OpenCL ICD loader treat a null
platform differently, so this case does not reliably return
CL_INVALID_PLATFORM.
2020-09-25 14:25:49 +01:00
Alastair Murray
59a57de9bf Replace use of -ILPath with --spirv-binaries-path in CSV (#981) 2020-09-25 14:25:26 +01:00
Alastair Murray
0bff9b6674 Skip feature macro consistency tests if no compiler is available (#983)
The test compiles programs to determine compiler support, which isn't possible
if the compiler is not available, so skip the test.
2020-09-25 14:24:57 +01:00
Ben Ashbaugh
02fc5809e3 simple vector swizzle test (#960)
* 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
2020-09-24 20:41:04 +01:00
Jeremy Kemp
4d3a3e8b16 Update CTS csv files. (#971)
* 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.
2020-09-24 20:36:52 +01:00
Grzegorz Wawiorko
e1cf741f1c Test feature macro OpenCL 3.0 (#762)
* 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
2020-09-24 20:34:56 +01:00
Ben Ashbaugh
eb1bb88a19 add a test case for subbuffer property queries (#961) 2020-09-24 16:40:18 +01:00
Kévin Petit
20b507a386 A first set of updates to the submission template (#969)
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-09-24 13:18:46 +01:00
Jeremy Kemp
10a30afeb2 Fix kernel compilation issue in c11 atomics. (#973) 2020-09-23 17:16:26 +01:00
Alastair Murray
1a3e19c37e Use Version type for cl_khr_spir extension version checks (#953)
* 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.
2020-09-22 21:49:13 +01:00
Jack Frankland
61cfb505ae Skip atomic_flag Test on for OpenCL-3.0 not Supporting Device Scope (#954)
* 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.
2020-09-22 09:26:05 -07:00