Commit Graph

255 Commits

Author SHA1 Message Date
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
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
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
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
Kevin Petit
e535e0aa21 Reduce diff with master
Whitespace, typos and simple build system/script changes.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-07-31 16:00:45 +01:00
Kevin Petit
be2ca84c42 cl22: Issue #12: printf: Remove testing printf %s on a NULL string
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-07-31 16:00:45 +01:00
Kevin Petit
2b6b38eaba Report actual image size being tested
# Conflicts:
#	test_conformance/images/clFillImage/test_fill_2D_array.cpp
2019-07-31 14:10:07 +01:00
Brian Sumner
003f476024 Proposed fix for bug 11537 2019-07-31 14:10:07 +01:00
Samuel Pauls
627c180a31 cl20: Khronos Bug 16080 Fix local work size limit.
Problem: Some tests assume that all local work-items can be used in a
single dimension of an NDRange.

Spec References: OpenCL C 2.0 r19, table 4.3,
CL_DEVICE_MAX_WORK_ITEM_SIZES.

Solution: The overall maximum local work size is trimmed to that of an
NDRange's first dimension or all dimensions, as appropriate.

Test Suite Affected: atomics, non_uniform_work_group, and workgroups.

Side Effects: None

Change-Id: I2e8179ca15c2c090f47ea84d1d3c109dd69ec185
2019-07-31 14:10:07 +01:00
Samuel Pauls
e0d7ab2187 cl20: Khronos Bug 15745 Limit work-group sizes per dimension.
Until now, the workgroups test computed the work-group size for
execution by querying the maximum number of work-items based on the
kernel. This returns the overall limit on workgroup size but not the
limits in each specific dimension. This change additionally restricts
the work-group size to the device's dimensional limits.

Problem: The kernel's maximum work-group size is used to execute it in a
single dimension, without regard for dimensional limitations.

Spec References: OpenCL 2.0 rev 19

Solution: The kernel's maximum work-group size is decreased such that it
meets any dimensional limitations before it's enqueued.

Test Suite Affected: Workgroups

Side Effects: None

Change-Id: I1c642af087f1934723ac7218ca9a35413ff83224
2019-07-31 10:41:18 +01:00
Bartosz Sochacki
b99c6004ce cl20: Khronos Bug 15619 Race condition in device execution enqueue_flags test 2019-07-31 10:41:18 +01:00
Kevin Petit
4c31b69980 Merge branch 'cl21_trunk'
# Conflicts:
#	.travis.yml
#	CMakeLists.txt
#	CMakeVendor.txt
#	README.md
#	build_android.py
#	build_lnx.sh
#	build_win.bat
#	readme-spir-v-binaries.txt
#	test_common/harness/kernelHelpers.c
#	test_common/harness/kernelHelpers.h
#	test_conformance/CMakeLists.txt
#	test_conformance/opencl_conformance_tests_21_full_spirv.csv
#	test_conformance/opencl_conformance_tests_21_legacy_wimpy.csv
#	test_conformance/opencl_conformance_tests_full.csv
#	test_conformance/opencl_conformance_tests_full_no_math_or_conversions.csv
#	test_conformance/opencl_conformance_tests_quick.csv
#	test_conformance/run_conformance.py
2019-07-30 12:10:52 +01:00
Kévin Petit
996dd659fc Reduce diff with master branch (#399)
A first round of whitespace, formatting and uncontroversial changes.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-07-30 09:51:03 +01:00
Grzegorz Wawiorko
284680936d cl21: Fix test spirv_new - define test cache path (#378)
* Fix test spirv_new - define test cache path

* Fix test spirv_new - review fixes

* Fix end of array detection
2019-07-29 16:24:53 +01:00
Wenju He
ef84736c73 Fix SVM if 64-bit atomic extensions are supported (#382)
Need to enable 64-bit atomic extensions in kernel source.
Use InterlockedCompareExchange64 for 64-bit type.
2019-07-24 18:54:50 +01:00
Wenju He
1d2e0ca248 Fix SVM if 64-bit atomic extensions are supported (#396)
Need to enable 64-bit atomic extensions in kernel source.
Use InterlockedCompareExchange64 for 64-bit type.
2019-07-24 18:54:20 +01:00
Wenju He
d7ff4aa502 SVM: use InterlockedCompareExchange64 for 64-bit type (#397) 2019-07-24 18:54:00 +01:00
Grzegorz Wawiorko
28cf6de10f cl20: Fix compilation in D3D cases (#394)
* Fix compilation in D3D cases

* Use existing harness include search path.
2019-07-24 14:21:00 +01:00
Grzegorz Wawiorko
9daeca00ea cl21: Fix compilation in D3D cases (#393)
* Fix compilation in D3D cases

* Use existing harness include search path.
2019-07-24 14:20:39 +01:00
Grzegorz Wawiorko
64dba66718 Fix compilation in D3D cases (#392)
* Fix compilation in D3D cases

* Use existing harness include search path.
2019-07-24 14:19:26 +01:00
Wenju He
702498b367 test_basic/progvar: fix 64bit atomic types error (#374)
Enable 64bit atomics extentions in order to use 64bit atomic types in
test_progvar_prog_scope_init and test_progvar_prog_scope_uninit.
2019-07-15 10:47:20 +01:00
Wenju He
ccadaf3c1d test_basic/progvar: fix 64bit atomic types error (#370)
Enable 64bit atomics extentions in order to use 64bit atomic types in
test_progvar_prog_scope_init and test_progvar_prog_scope_uninit.
2019-07-15 10:46:58 +01:00
Grzegorz Wawiorko
5e22db59ae cl20: Fix spirv path in bruteforce tests (#371)
* Fix spirv path in bruteforce tests

* Compilation fix - align_malloc already defined in kernelHelpers.c

* Fix spirv path in bruteforce tests - more places

* Specific fix for cl20_trunk branch
2019-07-10 13:57:16 +01:00
Grzegorz Wawiorko
4bd713856e cl21: Fix spirv path in bruteforce tests (#356)
* Fix spirv path in bruteforce tests

* Compilation fix - align_malloc already defined in kernelHelpers.c

* Fix spirv path in bruteforce tests - more places
2019-07-10 13:56:57 +01:00
Grzegorz Wawiorko
7ee74ae17f Fix spirv path in bruteforce tests (#357)
* Fix spirv path in bruteforce tests

* Compilation fix - align_malloc already defined in kernelHelpers.c

* Fix spirv path in bruteforce tests - more places
2019-07-10 13:56:38 +01:00
Grzegorz Wawiorko
00d0b0ddd7 Test fix - Test computeinfo should know each existing OCL version (#366) 2019-07-08 16:39:22 +01:00
Grzegorz Wawiorko
26777a0126 Test fix - Test computeinfo should know each existing OCL version (#367) 2019-07-08 16:39:01 +01:00
Grzegorz Wawiorko
c6f515c0d3 Test fix - Test computeinfo should know each existing OCL version (#368) 2019-07-08 16:38:49 +01:00
Stuart Brady
0b1520f508 Refactor setting of compilation mode and cache mode
This change refactors the setting of the compilation mode, so that
instead of using a 'gOfflineCompiler' bool together with a
'gOfflineCompilerOutputType' enum, a single 'gCompilationMode' enum
is used.  The default value for gCompilationMode is 'kOnline', which
is equivalent to the previous defaulting of gOfflineCompiler to false.

In addition, it refactors the setting of the compilation cache mode,
so that instead of the 'gForceSpirVCache' and 'gForceSpirVGenerate'
bools, a single 'gCompilationCacheMode' enum is used.  The default
value for gCompilationCacheMode is 'kCacheModeCompileIfAbsent', which
is equivalent to the previous defaulting of both booleans to false.

This change also refactors create_openclcpp_program() to avoid saving
and restoring gOfflineCompiler and gOfflineCompilerOutputType.  Instead,
it now passes the desired compilation mode as a parameter.
2019-07-08 11:34:02 +01:00
Stuart Brady
f2f458b675 Rename gSpirVPath to gCompilationCachePath
gSpirVPath controls the location of the compilation cache for SPIR-V
offline compilation, but its name falsely implies that it is
SPIR-V specific.  This change renames it to gCompilationCachePath.
2019-07-08 11:33:50 +01:00
Stuart Brady
9be570cdf0 Refactor setting of compilation mode and cache mode
This change refactors the setting of the compilation mode, so that
instead of using a 'gOfflineCompiler' bool together with a
'gOfflineCompilerOutputType' enum, a single 'gCompilationMode' enum
is used.  The default value for gCompilationMode is 'kOnline', which
is equivalent to the previous defaulting of gOfflineCompiler to false.

In addition, it refactors the setting of the compilation cache mode,
so that instead of the 'gForceSpirVCache' and 'gForceSpirVGenerate'
bools, a single 'gCompilationCacheMode' enum is used.  The default
value for gCompilationCacheMode is 'kCacheModeCompileIfAbsent', which
is equivalent to the previous defaulting of both booleans to false.
2019-07-08 11:33:50 +01:00
Stuart Brady
5438c664a1 Rename gOfflineCompilerInput/Output locals
These are local variables, and wrongly start with a "g" indicating that
they are globals.
2019-07-05 14:27:25 +01:00