Commit Graph

488 Commits

Author SHA1 Message Date
Jeremy Kemp
9d5dc202cb Updated the test to use get_device_cl_version (instead of check_opencl_version) (#527) (#672)
Also changed the test so that any implementation supporting < 1.2 can skip the test.

Uses format that @gwawiork has recently used to verify device version.
2020-03-11 10:09:35 +00:00
Grzegorz Wawiorko
51cd792e9e Fix test skip handling while test initialization - device_timer (#667) 2020-03-10 18:25:49 +00:00
Jeremy Kemp
4b281af946 Build: Ensure compilers required directory structure is present. (#662)
The compiler test requires that directories named "includeTestDirectory" and "secondIncludeTestDirectory" are present with the binary.
2020-03-07 14:36:53 +00:00
Grzegorz Wawiorko
bbbc27e6df Make it possible run test_gl on device OpenCL 1.2 (#659) 2020-03-06 18:27:46 +00:00
Grzegorz Wawiorko
d872d255f6 Add pragma cl_khr_3d_image_writes (#658) 2020-03-06 18:25:49 +00:00
Kévin Petit
4c5a8fff6d Conditionally test BGRA in Basic readimage3d (#623) (#624)
* imageHelpers: Created generic function that returns a vector of required image formats.

An upcoming commit requires access to the vector of required image formats, separatley from check_minimum_supported.

* imageHelpers: Added a new function is_image_format_required.

This function can be used to determine for any given cl_image_format, whether the implementaion is required to support it.

Conditionally test BGRA in Basic readimage3d (#623)

This change adds checks to see if testing against an embedded implementation and if so, queries whether BGRA is supported or not.

* Refactor based on PR review.

* Update passed message code.

* Changed scope of struct to be within test_readimage3d.
2020-03-05 18:47:51 +00:00
Kévin Petit
e62cd4a2b9 Test images - remove setting gDeviceType. (#653)
This is handled in testHarness.cpp
2020-03-05 14:11:37 +00:00
Kévin Petit
c9c3c73aa9 make execution of workgroups test optional (#643) 2020-03-05 08:22:36 +00:00
Kévin Petit
58eb2373a8 Add Travis CI jobs for Arm and AArch64 (#638)
* Add Travis CI jobs for Arm and AArch64

- Use fixed Linaro toolchains
- Move travis script to a shell file

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

* Fix Arm build and string comparisons added under #637

* Remove verbose flag on tar command
2020-03-04 15:18:16 +00:00
Kévin Petit
5e1dbfc49d Fix align_malloc on Linux (#645)
posix_memalign requires alignment to be a power of two and a multiple
of sizeof(void*). All powers of two greater than sizeof(void*) are
multiples of sizeof(void*) so we only need to make sure sizeof(void*)
is the minimum value passed to posix_memalign.

Fixes #644

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-03-04 15:17:50 +00:00
Kévin Petit
4ccc214abb Build a single library for the test harness (#646)
The common library stopped being useful when we got rid of the
last compatibility suite.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-03-04 12:38:33 +00:00
Jeremy Kemp
4c59bfa32f Update table of required image formats (#427) (#629)
* Update table of required image formats (#427)

This commit updates the table of required image formats. The table is built depending on the profile of the device, the requested image type, and the avaiablitiy of relevent extensions.

* Fixed incorrect argument to memcpy.

* Made image format arrays static.

* Utilised ARRAY_SIZE where appropriate.

* Re-named required image format bools to be more explicit.

* Made sRGBA, CL_UNORM_INT8 a required full format profile.

Misinterpretation of the spec had made this optional.

* check_minimum_supported: switched to using vectors.

* Added CL_sRGB CL_UNORM_INT8 to full profile required formats.

This matches the same channel data type requirement as CL_sRGBA.

* Overload <= and >= for the Version class.

* Correct the condition under which sRGB images are required.

* Correct the required image formats are based on OpenCL version.

The spec says that for different OpenCL versions, different sets of image formats are required.

* Print out the correct OpenCL version when required image format is not found.

* Improved the way in which image formats are added based on profile and version.

* Potential build fix regarding isnan namespace issues.

* Image Helpers: Remove duplicate copies when building required image format vectors.

Also re-ordered a branch to make it clearer.
2020-03-03 21:39:32 +00:00
boazo
b1059a2c56 Subgroups optional (#581)
* allow conditional execution of subgroups test suite

* make subgroups test suite execution optional

* make execution of subgroups suite optioanl

* allow conditional execution of subgroups test suite

* make subgroups test suite execution optional

* make execution of subgroups suite optioanl
2020-03-03 21:38:58 +00:00
Jeremy Kemp
61eb79042f Fplib build fix (#637)
* Fix conversions build with gcc 4.8.5 armhf.

Re-named fplib.c to fplib.cpp.

Updated the conditions under which fplib.cpp will be included in the build by CMake.

* Build: Added a global archtiecture variable, CLConform_TARGET_ARCH.

The reset of the build can query this variable whenever archtiecture specific options are required. The current supported values of this variable are "ARM", "x86", and "x86_64".

This change also replaces all existing locations where CMAKE_SYSTEM_PROCESSOR was queried.

* Build: Added ARM64 as a valid value for CLConform_TARGET_ARCH.

* Conversions: Don't build fplib.cpp for ARM64.
2020-03-02 17:09:08 +00:00
Kévin Petit
b2eba77d42 Get rid of test_finish macro and related ATF cruft (#633)
Closes #431

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-03-02 15:06:44 +00:00
James Price
7c82f6a9b8 Fix sterror_r usage for Android API >=23 (#636)
Fixes KhronosGroup/OpenCL-CTS#493
2020-02-28 12:24:13 +00:00
Kévin Petit
b93c1df933 Remove duplicate definition of align_{malloc,free} (#631)
Also use it instead of duplicating the code.

Fixes #326

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-02-28 12:22:38 +00:00
James Price
b95ef1ad04 Use format string for sprintf (#634)
Fixes KhronosGroup/OpenCL-CTS#492
2020-02-28 12:20:50 +00:00
James Price
5f77d763ea Do not include sys/sysctl.h on Android (#635)
Android has linux/sysctl.h, but the functions that need it are not
used when targeting Android at the moment.
2020-02-28 08:38:52 +00:00
Kévin Petit
9016bb20f3 Remove stray Xcode project file (#632)
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-02-28 08:38:10 +00:00
Jeremy Kemp
ab54782996 Make Device and Host Timer Synchronisation Optional. (#628)
This commit makes the device and host timer test optional.
2020-02-28 08:37:47 +00:00
Radek Szymanski
80c3a27a6a Remove unused parameter (#630)
The imageSupportRequired param is not needed in runTestHarnessWithCheck,
so just remove it.

Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2020-02-27 15:36:28 +00:00
Jeremy Kemp
996c353c0e CMake Build: Tidy up when -msse2 is passed to gcc (#622)
* Define CMAKE_ARM_COMPILER automatically (#469)

Makes use of CMAKE_SYSTEM_PROCESSOR to detect whether compilation is happening for an ARM architecture.

* Use the correct guard for specifying msse2 compiler flags.

Bruteforce and conversions were only checking against ANDROID which was not sufficient for ARM Linux builds.

* Remove redundant uses of the msse2 compiler flag.

* Globally set -msse2 for x86/amd64 gcc, Apple and Clang builds.

This is a change in behaviour. Prior to this commit, msse2 was only set for bruteforce and conversions.

msse and mfpmath=sse were already set globally prior to this change.
2020-02-25 08:56:54 +00:00
Jeremy Kemp
e3bad1f90e Copy all csv files during build. (#626)
This commit introduces a generic method of copying the opencl_conformance_tests_*.csv files during the build.

Fixes any unspecified files from being omitted during the copy process.
2020-02-25 08:54:27 +00:00
Ben Ashbaugh
9381ead6db enable Appveyor Windows builds (#614)
* enable Appveyor Windows builds

* clean up comments in AppVeyor file

* remove github pages branch exclusion
2020-02-25 07:55:25 +00:00
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