Commit Graph

356 Commits

Author SHA1 Message Date
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
Mats Petersson
83f2a64d8a Add support for arm printf extension. (#434)
The cl_arm_printf extension uses a call-back to tell the user-code
that some printf output has appeared from the execution of the CL
kernel.

The extsiting Printf tests assume output to stdout.

This change adds code to detect the cl_arm_printf extension, and an
implementation of the callback code to write to stdout.

Also fix a couple of formatting errors and don't "poll" when waiting
for events.

Signed-off-by: Mats Petersson <mats.petersson@arm.com>
2019-08-15 16:38:53 +01:00
Mats Petersson
93a1dc3a3a Fix leaking memory and add enum for address spaces (#435)
Test was not cleanig up all of the kernels and programs that it creates,
which results in our driver finding that the common context still has
references when exiting. The reason for not cleaning all kernels and
programs was that it used a hard-coded constant 3 instead of the actual
number of address spaces.

This fixes the leak, and makes the code a little clearer by adding an enum
describing each address space, rather than using magic numbers.

Signed-off-by: Mats Petersson <mats.petersson@arm.com>
2019-08-15 10:18:57 +01:00
Anastasia Stulova
e6d15a2bfc Release event in host_enqueue_order test.
Signed-off-by: Anastasia Stulova <anastasia.stulova@arm.com>
2019-08-14 16:02:39 +01:00
Stuart Brady
0d96c198ee Reimplement invocation of offline compilation program
This change reimplements offline compiler invocation, using a new command
line interface that allows the passing of relevant CL device information
to the offline compiler.  The information that is passed is as follows:

 * CL_DEVICE_ADDRESS_BITS
 * CL_DEVICE_EXTENSIONS
 * CL_DEVICE_IL_VERSION (with --compilation-mode=spir-v only)
 * CL_DEVICE_VERSION

The interface for the offline compiler script is as follows:

   usage: cl_offline_compiler --source FILE --output FILE
                              --cl-device-info FILE --mode MODE
                              -- [BUILD_OPTIONS [BUILD_OPTIONS ...]]

   positional arguments:
     BUILD_OPTIONS          additional options to pass to the compiler

   optional arguments:
     --source FILE          OpenCL C source file to compile
     --output FILE          SPIR-V or binary file to create
     --cl-device-info FILE  OpenCL device info file
     --mode                 compilation mode (spir-v or binary)

The OpenCL C version for compilation is now specified in BUILD_OPTIONS,
as normal for online compilation, i.e. with -cl-std=VERSION.

Signed-off-by: Stuart Brady <stuart.brady@arm.com>
2019-08-12 10:18:06 +01:00
Stuart Brady
2c43504923 Cleanup offline compilation code
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
2019-08-12 10:18:06 +01:00
Stuart Brady
982e3ed79c Cleanup generate_spirv_offline.py
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
2019-08-12 10:18:06 +01:00
Stuart Brady
147d159fec Fix line endings in generate_spirv_offline.py
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
2019-08-12 10:18:06 +01:00
Stuart Brady
4d891b67bd Separate out device information functions
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
2019-08-12 10:18:06 +01:00
Stuart Brady
f15178ca91 Use static libary for harness in media_sharing
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
2019-08-12 10:18:06 +01:00
Stuart Brady
245e11ec67 Allow device ID to be specified for offline compilation
Signed-off-by: Stuart Brady <stuart.brady@arm.com>
2019-08-12 10:18:06 +01:00
Kévin Petit
76fd344e64 Set required language standards using CMake (#432)
- remove compiler-specific options
- disable GNU extensions
- require C++11 and C99 for the whole code base

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-08-08 12:02:18 +01:00
Kévin Petit
fa4b278432 Build the harness as a static library (#430)
This reduces by a factor of roughly two the number of files to build.

Fixes #193.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-08-07 17:18:10 +01:00
Stuart Brady
67655e6fe5 Fix parsing of offline compilation options in test_select (#429)
The local parsing of arguments in test_select.c throws away any unknown
arguments.  Pass these to parseCustomParam() before the local argument
parsing, so that the offline compilation options work as expected.

Fixes #327.

Signed-off-by: Stuart Brady <stuart.brady@arm.com>
2019-08-07 16:23:16 +01:00
Kevin Petit
4cb8fc49f8 Remove almost duplicate compatibility common code
Use the non-compatibility version.

In each case the diff was minimal, didn't have modifications that
would invalidate compatibility testing and it was clear that the
"latest/best" version was not the one in the compatibility copy.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-08-07 11:59:28 +01:00
Kevin Petit
fba5b654e8 Remove GL compatibility common code
It is completely unused.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-08-07 11:59:28 +01:00
Radek Szymanski
42cc707131 Remove redundant prints from half (#424)
The test harness already prints if the test passed, no need to duplicate
this information.

Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2019-08-05 15:17:09 +01:00
Radek Szymanski
03650057bb Move printing sub-test information into test harness (#421)
This removes all the duplicated code from each test, and moves it to
test harness so that we have single place where this information is
printed.

Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2019-08-05 15:16:12 +01:00
Kévin Petit
19951a2a14 Remove exact duplicate files from the compatibility common code (#422)
Use the copy from the non-compability test_common folder.

Many of these weren't even used at all.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-08-05 15:05:14 +01:00
Radek Szymanski
358ad78344 Handle failed memory allocations (#426)
The test has been ignoring potential failures in memory allocations,
giving misleading error messages.

Add a simple check and return early if the allocation failed.

Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2019-08-05 15:04:46 +01:00
Radek Szymanski
313fb94fcc Remove redundant prints from integer_ops (#425)
The test harness already prints if the test passed, no need to duplicate
this information.

Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2019-08-05 13:55:55 +01:00
Radek Szymanski
a45012be7a Remove -g flag from conformance build (#423)
This reduces the size of binaries, and makes the tests finish tiny
bit faster. The debug symbols can be enabled by passing to cmake one of:
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_BUILD_TYPE=RelWithDebInfo

Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2019-08-05 13:54:42 +01:00
Sam Laynton
12bc0c1f3f Check max work group size in test basic (#414)
The test enqueued_local_size in test_basic used a
local work group size larger than the minimum max
supported work group size supported by some platforms.

This change checks the max and clamps to it if
requested size would be larger than supported.

Signed-off-by: Sam Laynton <sam.laynton@arm.com>
2019-08-05 11:26:17 +01:00
Grzegorz Wawiorko
da313500a5 test clEnqueueSVMMemcpy in case of host memory allocation (#300)
* test clEnqueueSVMMemcpy in case of host memory allocation

* test clEnqueueSVMMemcpy - refactored to call once API function

* test clEnqueueSVMMemcpy - review fixes
2019-08-05 10:54:21 +01:00
Oualid Khelifi
42163c6072 cl21: Add 2.1 device version for compatibility conf
This was causing some tests to fail on 2.1 conformance
with : device version string does not match required format!

Signed-off-by: Oualid Khelifi <oualid.khelifi@arm.com>
2019-08-05 10:42:51 +01:00
Alastair Murray
85d474f06a Reintroduce M_PI compatibility
M_PI is not part of C99 or C++ and thus aren't provided in all configurations.
This used to be handled in reference_math.c directly but was recently removed.
Just tweak the M_PI handling in the compatibility headers to restore builds.
2019-08-02 18:38:23 +01:00
Kevin Petit
ef832c330c Stop using ../../test_common to include common headers
Fixes #395.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-08-01 18:41:12 +01:00
Kevin Petit
4dca437b0e Merge branch 'cl20_trunk' 2019-08-01 10:30:10 +01:00
Kevin Petit
7397aadb8d Rename test list CSV files to facilitate the merge to master 2019-08-01 10:10:12 +01:00
Kevin Petit
9dff128d42 Extend version checks in subgroup test to support all cases
To prepare for merging the cl20_trunk branch.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-08-01 10:02:49 +01:00
Kevin Petit
75a26fdc44 Specify minimum required version for all OpenCL 2.1 tests
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-08-01 10:02:28 +01:00
Brian Sumner
a910c3f8f6 Fix for bug 15294 - allocation test overflows for large memory 2019-07-31 16:22:45 +01:00
Kevin Petit
d3fb3d975f User create_* helper functions in most tests
Ported from master.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-07-31 16:00:45 +01:00
Kevin Petit
59e2da3b4e Port framework changes from master
Now requiring the headers to be configured for OpenCL > 2.1.
2019-07-31 16:00:45 +01:00