Commit Graph

241 Commits

Author SHA1 Message Date
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
Stuart Brady
7486dd13ad Remove source transformation support
This change removes support for the "source" mode of offline compilation
which is commented with "to be removed in the future as we will use
offline compiler here".

The "source" mode allowed for the CL source to be transformed by
build_script_source.py and then passed to clCreateProgramWithSource(),
and appears to have been developed only for the purpose of testing the
offline compilation infrastructure.
2019-07-05 14:27:25 +01:00
Stuart Brady
90b0c52584 Remove source transformation support
This change removes support for the "source" mode of offline compilation
which is commented with "to be removed in the future as we will use
offline compiler here".

The "source" mode allowed for the CL source to be transformed by
build_script_source.py and then passed to clCreateProgramWithSource(),
and appears to have been developed only for the purpose of testing the
offline compilation infrastructure.
2019-07-05 14:27:13 +01:00
Wenju He
e1874ba732 c11_atomics: fix ambiguous call atomic_fetch_add (#354)
Cast operand type to AddSubOperandType.
2019-07-05 11:37:23 +01:00
Wenju He
e7586a7a78 c11_atomics: fix ambiguous call atomic_fetch_add (#361)
Cast operand type to AddSubOperandType.
2019-07-05 11:37:00 +01:00
Nikhil Joshi
6e29a04870 Fix enqueue_flags test to use correct barrier type. (#276)
Currently, enqueue_flags test uses CLK_LOCAL_MEM_FENCE.
Use CLK_GLOBAL_MEM_FENCE instead as all threads across work-groups
need to wait here.
2019-07-03 14:11:02 +01:00
Nikhil Joshi
d6e5f29e22 Fix enqueue_flags test to use correct barrier type. (#348)
Currently, enqueue_flags test uses CLK_LOCAL_MEM_FENCE.
Use CLK_GLOBAL_MEM_FENCE instead as all threads across work-groups
need to wait here.
2019-07-03 14:10:37 +01:00
Nikhil Joshi
9686ea098c Fix enqueue_flags test to use correct barrier type. (#349)
Currently, enqueue_flags test uses CLK_LOCAL_MEM_FENCE.
Use CLK_GLOBAL_MEM_FENCE instead as all threads across work-groups
need to wait here.
2019-07-03 14:10:26 +01:00
Grzegorz Wawiorko
7b711091ee Fix test_api - query for device extensions in queue hint test (#351) 2019-07-03 12:16:16 +01:00
Grzegorz Wawiorko
f7f6208f62 Fix test_api - query for device extensions in queue hint test (#352) 2019-07-03 12:16:05 +01:00
robquill
5fdacae98b Use slice pitch instead of row pitch for 1D arrays. (#313)
Fixes fill_image 1Darray
2019-06-18 10:28:46 +01:00
robquill
4eee1fe25e Use slice pitch instead of row pitch for 1D arrays. (#314)
Fixes fill_image 1Darray
2019-06-18 10:28:22 +01:00
robquill
39c1d81b05 Use slice pitch instead of row pitch for 1D arrays. (#331)
Fixes fill_image 1Darray
2019-06-18 10:27:56 +01:00
Grzegorz Wawiorko
cb78c73aa5 Enable compilation of spir 1.2 tests (#305)
* Enable compilation of spir 1.2 tests

* Files to copy as a list of files.
2019-06-17 13:00:10 +01:00
Grzegorz Wawiorko
7355eec211 cl20: Enable compilation of spir 1.2 tests (#306)
* Enable compilation of spir 1.2 tests

* Fix compilation issue

* Files to copy as a list of files.
2019-06-17 12:59:55 +01:00