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>
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>
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>
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>
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>
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>
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>
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>
* test clEnqueueSVMMemcpy in case of host memory allocation
* test clEnqueueSVMMemcpy - refactored to call once API function
* test clEnqueueSVMMemcpy - review fixes
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>
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
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
* 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