Commit Graph

463 Commits

Author SHA1 Message Date
Kévin Petit
d5334dc61d Get rid of checkDeviceTypeOverride (#602)
This is now done in the test harness.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-02-24 10:34:04 +00:00
Kévin Petit
ec3959bfd1 Make it possible to run kernel_read_write on a 1.x implementation (#615)
Signed-off-by: Kévin Petit <kpet@free.fr>
2020-02-24 10:29:30 +00:00
Grzegorz Wawiorko
2cb73ba685 Fix - Windows build errors (#620) 2020-02-24 10:28:40 +00:00
Grzegorz Wawiorko
452adcd7be Fix - Windows build errors - utsname sysctl files (#621) 2020-02-24 10:28:05 +00:00
John Kesapides
61632c08b5 Fix overflow in OpenCL 2.x CTS allocations tests (#610)
Add size_t overflow contingency code for 32-bit platforms where
max_width,max_height are 64k each. The code is modified to avoid
the overflowing multiplication.

Signed-off-by: John Kesapides <john.kesapides@arm.com>
2020-02-23 12:16:12 +00:00
John Kesapides
c93dd48456 Add cl_khr_subgroups pragma enable in the kernel source (#609)
code for test_api sub_group_dispatch. Although subgroups
is a core feature there is no separate 2.1 language spec
so we use the 2.0 with the pragma.

Signed-off-by: John Kesapides <john.kesapides@arm.com>
2020-02-23 12:15:00 +00:00
James Price
40f50d77a3 Rename test .c sources to .cpp where necessary (#604)
Remove hacks to force language from CMake files.

Closes KhronosGroup/OpenCL-CTS#25
2020-02-21 17:34:31 +00:00
Bhargav Das
b2cb18073c Improved PrintArch functions (#595) (#601)
Moved all duplicate 'PrintArch' functions to testHarness.c
Replaced sysctl system call used in 'PrintArch' function with uname
system call

Signed-off-by: bhargavdas <bhargav_das@mentor.com>

Update testHarness.c
2020-02-21 16:47:54 +00:00
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