Commit Graph

389 Commits

Author SHA1 Message Date
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
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
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
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
Kévin Petit
88004077e3 select: don't forget to count tests when failing to create programs (#483)
A test writer really shouldn't have to think about this...

Signed-off-by: Kévin Petit <kpet@free.fr>
2019-11-15 13:13:30 +00:00
Kévin Petit
35bc51e51a A few error handling and flag test fixes for mem_host_flags (#485)
- Add missing error checks
- Add missing return
- Fix flag check

Signed-off-by: Kévin Petit <kpet@free.fr>
2019-11-15 13:12:48 +00:00
Grzegorz Wawiorko
1bffbbe3e4 Fixes #488 - cmake adjustment d3d and media_sharing (#489) 2019-11-15 13:12:17 +00:00
Kévin Petit
d7e8e5040a Mark SVM and pipes tests as requiring OpenCL 2.0 (#475)
Signed-off-by: Kévin Petit <kpet@free.fr>
2019-11-14 17:26:32 +00:00
Grzegorz Wawiorko
680271c61c Fix issue 486 - add build option for devices OCL2.X (#487) 2019-11-14 17:25:43 +00:00
Kévin Petit
82579827da Remove dead code from test_userevents (#473)
This code probably predates the move to the test framework and is
no longer useful.

Signed-off-by: Kévin Petit <kpet@free.fr>
2019-11-12 15:01:32 +00:00
Kévin Petit
937a2cb67d Use clCreateCommandQueue when possible (in a few tests) (#474)
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>
2019-11-11 17:16:22 +00:00
Kévin Petit
32bbb19885 Fix a couple of typos (#478)
Signed-off-by: Kévin Petit <kpet@free.fr>
2019-11-11 17:07:40 +00:00
Kévin Petit
055aa4fbbe Fix delete calls (#481)
Both allocations are made with new[].

Signed-off-by: Kévin Petit <kpet@free.fr>
2019-11-11 17:07:10 +00:00
Jim Lewis
cce8fd90b1 Fix dll linking warnings for VS 2015/17 (#467)
-- #ifdef out duplicate definitions
-- remove make_nan() dead code
2019-10-04 12:28:55 +01:00
Grzegorz Wawiorko
d6e1e7c870 Fix Issue 462 - test_svm crash (#463) 2019-10-02 11:57:40 +01:00
Kévin Petit
da0f375226 Add host/host test for clEnqueueSVMMemcpy (#460)
This was the only combination that was not exercised.

Fixes #419

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-09-26 11:56:34 +01:00
Pavan K Lanka
b763c6b07e Fix for Khronos https://github.com/KhronosGroup/OpenCL-CTS/issues/249 (#444)
* Fix for Khronos https://github.com/KhronosGroup/OpenCL-CTS/issues/249 where incoming errors are overwritten by exit block

* Fix for build failure that was observed in cl12_trunk with prior #249 change
2019-09-23 21:01:21 +01:00
Pavan K Lanka
79d1a14aa0 Fix for https://github.com/KhronosGroup/OpenCL-CTS/issues/346 - causing special float number generation to be skipped (#443) 2019-09-16 11:37:32 +01:00
Pavan K Lanka
a4acc80c2b Fix for Khronos https://github.com/KhronosGroup/OpenCL-CTS/issues/27 remove the re-declaration of totalErrors (#445) 2019-09-16 11:24:50 +01:00
Grzegorz Wawiorko
f4682a9181 Fix compilation issues (#448) 2019-09-12 13:05:46 +01:00
Ben Ashbaugh
fb3dca1ac7 remove check for extension for writeable sRGB images (#449) 2019-09-12 13:05:11 +01:00
Grzegorz Wawiorko
e880869559 Fix verification if atomics 64bit extensions supported by device (#441) 2019-08-23 10:24:02 +01:00
Kévin Petit
0b9329a9d6 Add missing event release calls in SVM tests (#437)
Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com>
2019-08-16 15:51:25 +01:00