Commit Graph

455 Commits

Author SHA1 Message Date
Grzegorz Wawiorko
3a628cfae2 Fix - Windows build errors (#608) 2020-02-21 10:07:34 -05:00
Kévin Petit
3f11868e11 Fix warnings reported by -Wconversion-null (#603)
Fix error reporting in clFillImage as a result.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-02-21 12:21:53 +00:00
Ben Ashbaugh
170784c193 use strtok_s in place of strtok_r on Windows (#606)
Signed-off-by: Ben Ashbaugh <ben.ashbaugh@intel.com>
2020-02-21 08:05:27 +00:00
James Price
bce4e48c89 Rename harness .c sources to .cpp where necessary (#513)
Remove hacks from harness CMakeLists.txt to force language.

Contributes to KhronosGroup/OpenCL-CTS#25
2020-02-20 21:09:36 +00:00
boazo
fa6b9e671e Svm optional (#580)
* svm test optional

* make svm test suite execution optional
2020-02-20 19:39:40 +00:00
boazo
7d8dcbe678 Device enqueue optional (#579)
* optional execution of device side enqueue

* make device enqueue test suite optional
2020-02-20 19:38:23 +00:00
boazo
5cc6bf8237 Pipes optional (#578)
* conditional execution of the pipe test suite

* conditional execution of the pipe test suite

* make pipes suite optional
2020-02-20 17:19:48 +00:00
Kevin Petit
adca6dc9b9 Merge branch 'cl12_trunk' 2020-02-20 14:56:50 +00:00
Kevin Petit
e306ecd691 Remove most remaining clCreate*WithProperties calls in tests that run on 1.2
Don't touch interop suites or code only run with options not required
for conformance.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-02-20 14:38:08 +00:00
Kevin Petit
b40fb16571 Add OpenCL 1.2 CSV files (with headers tests removed)
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-02-20 11:48:06 +00:00
jiabaxie
943ba04c0c set gDeviceType in testharness.c (#597)
* set gDeviceType in testharness.c, also moved gTestRounding to imageHelpers.cpp & .h and removed duplicate code from host_atomics.cpp

* Cleaned up some redundant code

* Reversed the change in testharness.c
2020-02-20 10:39:55 +00:00
Einar Hov
89ec023110 Add conformance tests for cl_khr_extended_versioning (#548)
Tests that the new queries work, and that what they return is consistent with
the information returned by the string-based queries.

Signed-off-by: Einar Hov <einar.hov@arm.com>
2020-02-20 10:14:17 +00:00
Dariusz Mroz
fa2872457e Remove unused variables from thread_dimensions test (#589)
* function get_maximums sets variables with maximum
 image width and height but those values are not used
  in the entire test
2020-02-12 14:18:24 +00:00
Kévin Petit
681150254f Remove some dead code (#586)
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-02-11 09:04:46 +00:00
Grzegorz Wawiorko
ddc7276766 Remove gDeviceType definition (#584) 2020-02-10 11:28:25 +00:00
Kévin Petit
eea081ae20 Remove headers tests from the conformance tests (#558)
These tests have been moved to the headers repository. None of these
tests exercise the OpenCL implementation. They are just testing the
headers and host toolchain.

Whether they are required to build and run as part of the conformance
process will be discussed under
https://github.com/KhronosGroup/OpenCL-Headers/issues/58.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-02-06 12:27:39 +01:00
jiabaxie
68d08e07bf Moved all instances of gDeviceType to imageHelper.cpp (#575)
* Moved all instances of gDeviceType to imageHelper.cpp

* Missed one instance of gDeviceType

* Removed all instances of extern cl_device_type gDeviceType, except in imageHelpers.h
2020-02-06 08:27:13 +01:00
Kévin Petit
2ad175fb57 Remove redundant variable in CMakeLists.txt (#573)
Fixes #546

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-02-04 15:54:40 +00:00
Grzegorz Wawiorko
1ca9d9dca7 test_svm - enqueue_api - lack of synchronization points (#571)
* Fixes #570 - test_svm - enqueue_api - lack of synchronization points

* Review fixes - use variable, use CL_MAP_READ

* Review fix - use nullptr instead of 0
2020-02-03 13:47:50 +00:00
Kévin Petit
cac0ab0918 Remove last compatibility tests (#572)
They were a duplicate of the non-compatibility version.

The non-compatibility version assumed that BGRA formats aren't
required for implementations that support the embedded profile,
while the compatibility version didn't.

The unified specification doesn't currently document any format
requirements for the embedded profile but the OpenCL 1.2 specification
did and no BGRA format was part of the list. The consensus from the
Working Group is that BGRA formats are not a requirement of the embedded
profile and the specification will be changed to reflect this
(see https://github.com/KhronosGroup/OpenCL-Docs/issues/201).

Closes #494.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-01-31 11:46:36 +00:00
Kévin Petit
695960df2e Remove duplicate sizeof test from the compatibility suite (#545)
... and fix bug 16041 in the main suite.

The only diffs were:
- changes made to support both 1.2 and 2.0 on master
- changes to fix bug 16041 in the compatibility version that
  hadn't made it to the main version.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-01-15 10:09:25 +00:00
Lukasz Towarek
1497a4a60d computeinfo: Fix printing of size_t values (#555)
Currently capabilities with size_t type like CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE
are printed as signed values for example:
CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE == -881700864
2020-01-15 10:08:58 +00:00
Lukasz Towarek
6a64c5a0c7 computeinfo: Fix printing of size_t values (#556)
Currently capabilities with size_t type like CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE
are printed as signed values for example:
CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE == -881700864
2020-01-15 10:08:47 +00:00
Kévin Petit
e98b86cbe3 Remove duplicate bufferreadwriterect compatibility test (#541)
The only diff between the main and compatibility versions of the test
is that the region overlap check was fixed in the main one (see
487c4696ff070e1a3cb23dbb08096d3f4ef11fe3 in Gitlab).

Contributes to #494

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-01-10 15:16:12 +00:00
Grzegorz Wawiorko
45cfe12450 Use stdlib implementation. Do not redefine (#543) 2020-01-10 15:15:55 +00:00
Bhargav Das
2c0abd3f75 Fixed test runner files and output binary files (#464)
Put "run_conformance.py" and all test runner files ".csv" in build directory

Put "run_conformance.py" and all test runner files ".csv" in build directory
Added steps in CMakeLists.txt to copy the ".csv" files and "run_conformance.py" from 'test_conformance' directory

Signed-off-by: bhargavthriler <bhargavthriler@gmail.com>

cl12: change binary names to aligned with the test runner files

Changed output binary names to match with the test runner files .csv files

Signed-off-by: bhargavthriler <bhargavthriler@gmail.com>

Removed relative paths, changed comment style

Removed relative paths and replaced with CMake variables
Changed comment style to match with remaining comment style to maintain consistency

changed destination relative path with cmake variable

Signed-off-by: bhargavthriler <bhargavthriler@gmail.com>

fixed binary name in test runner files

Signed-off-by: bhargavthriler <bhargavthriler@gmail.com>
2020-01-10 15:12:11 +00:00
Nikhil Joshi
db585e1fd0 Fix max limit query for test_3D_2D_array. (#535)
test_3D_2D_array uses max limits of 3D images
for both 3D images and 2D_array.
This leads to testing of sizes larger than
2D array limits.
Use correct CL_MEM_OBJECT_IMAGE_TYPE to avoid
test-cases with invalid sizes.
2020-01-07 12:08:06 +00:00
Nikhil Joshi
2343324ee6 Fix max limit query for test_3D_2D_array. (#536)
test_3D_2D_array uses max limits of 3D images
for both 3D images and 2D_array.
This leads to testing of sizes larger than
2D array limits.
Use correct CL_MEM_OBJECT_IMAGE_TYPE to avoid
test-cases with invalid sizes.
2020-01-07 12:07:50 +00:00
Kévin Petit
0061d7c0f2 Remove compatibility api suite (#530)
The last test was also an almost-perfect duplicate of its sibling
in the non-compatibility suite. The only difference was the name
of the member of cl_image_desc used to point to the buffer/memory
object (which changed in 2.x).

We currently always build the conformance tests with the
headers configured for 2.2 (using the default value really) but I've
added code for the pre-2.x name as well for when CL_VERSION_2_0 isn't
defined in case we need it and to keep track of the distinction in that
test.

Contributes to #494.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-01-06 15:12:15 +00:00
Kévin Petit
bb388b0d36 Remove duplicate async copy tests from the compatibility basic suite (#531)
Changes between the compatibility and non-compatibility versions:
- support for 3-element vectors added
- error printing improved
- bugfix for big allocations

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-01-06 10:17:54 +00:00
Kévin Petit
81cffe9132 Move kernel_arg_info compatibility test to the main api suite (#523)
The diff between the compatibility and non-compatibility tests
is rather big. These tests should both be replaced by a new
maintainable one (see #522).

Contributes to #494.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-12-20 15:55:16 +00:00
Grzegorz Wawiorko
daafdac555 Fixes issue #497 - Image tests from master branch on OCL 1.2 device (#501)
* Fixes issue #497 - Image tests from master branch on OCL 1.2 device

* Fixes issue #497 - use get_device_cl_version
2019-12-20 11:30:03 +00:00
James Price
841123040e Add includes to make .h files self-contained (#526) 2019-12-19 22:42:58 +00:00
Grzegorz Wawiorko
71b0a80bd7 Fixes issue #502 - Integer ops ctz case add test version 2.X (#524) 2019-12-19 11:14:19 +00:00
Grzegorz Wawiorko
3b7056decd Fixes issue #502 - bruteforce do not need build option (#525) 2019-12-19 11:13:56 +00:00
Kévin Petit
334650bcca Move cl_khr_create_command_queue test to the main api suite (#521)
In theory, it could exist on a 2.x implementation.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-12-18 11:49:56 +00:00
Kévin Petit
6610facd98 Remove duplicate imagearraycopy3d test from the compatibility basic suite (#520)
The only diffs are:
- The non-compatibility version relies on the queue being in-order
  to remove one explicit dependency. This isn't directly related
  to the functionality under test.
- A memory leak was fixed in the non-compatibility suite

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-12-13 13:25:03 +00:00
Kévin Petit
cf6b6e0acf Remove duplicate min/max tests from the compatibility api suite (#519)
The only diffs are:

- obvious bug fixes in the non-compatibility suite
- use of 2.x vs 1.x device properties (now covered by compatibility
  query tests in the non-compatibility suites)
- additional requirements for 2.x features in the non-compatibility
  suite (gated by a version check so looks like it would work as is
  on a 1.x implemenmtation)

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-12-13 12:46:36 +00:00
Kévin Petit
13a32946eb Move sampler and command queue compatibility query tests to the main api suite (#509)
...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>
2019-12-11 10:38:29 +00:00
Kévin Petit
1c04050b5b Use old-style sampler creation in basic suite and remove duplicate compatibility tests (#510)
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>
2019-12-11 10:36:45 +00:00
Grzegorz Wawiorko
7127b2a05f Fixes Issue #514 - Offline compilation does not work. Null device reported (#515) 2019-12-11 10:31:42 +00:00
Grzegorz Wawiorko
1d7bd0d10d GL sharing: Test name adjustment and Windows compilation clarification. (#336)
* 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.
2019-12-03 09:32:43 +00:00
Grzegorz Wawiorko
0e8f01a2f5 cl12: GL sharing: Fix WIN compilation and add some clarification. (#333)
* Fix WIN compilation and add some 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.

* fix cl12 - Add CLConform_GL_LIBRARIES_DIR CmakeLists variable for GL support
2019-12-03 09:27:22 +00:00
Grzegorz Wawiorko
18046e65d1 Fixes issue #499 - Test basic from master branch on OCL 1.2 device (#500)
* Fixes issue #499 - Test basic from master branch on OCL 1.2 device

* Restore pitch tests for CL1.X
2019-11-25 09:24:26 +00:00
Kévin Petit
a018d6a3be Remove all obvious near-duplicate tests from the compatibility suite (#496)
- 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>
2019-11-24 12:47:26 +00:00
Kévin Petit
2dca46bc00 Remove exact duplicates from the compatibility suites (#495)
Contributes to #494.

Signed-off-by: Kévin Petit <kpet@free.fr>
2019-11-20 17:38:49 +00:00
Kévin Petit
4a8cae4ae2 harness: select queue creation function based on OpenCL version (#490)
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>
2019-11-19 18:59:04 +00:00
Stuart Brady
2398587980 Reformat SPIR-V assembly and fix validation errors (#472)
* 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>
2019-11-19 09:05:28 +00:00
boazo
60101c24cf Save Kernel Sources to Disk - Infrastructure Change (#412)
* 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
2019-11-18 09:45:44 +00:00
Jim Lewis
040321d8b9 Allow CL_FLOAT denorm flushing for write tests (#28) (#456)
* 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
2019-11-15 13:38:15 +00:00