Age | Commit message (Collapse) | Author |
|
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
With this patch (taken from Khronos OpenCL v2.0 test suite) the
test_compiler conformance test should pass at 100%.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
Previously, this was ifdef'd out, but the logic is needed to ensure
the program is actually rebuilt if the client rebuild the same program
with different user options.
This enables the following 3 test_compiler Khronos test cases to pass:
% test_compiler options_build_macro options_build_macro_existence options_include_directory
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
Previously, CL_INVALID_OPERATION was being returned when trying to compile
a binary loaded program.
This is fixed, enabling now all 72 of the v1.2 Khronos API conformance tests
to pass.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
Previously, the sanity test was assuming a certain order in the kernel
list returned from clCreateKernelsInProgram(), which order is not
guarranteed, and which changed due to a previous commit (bug fix).
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
This removes maintentance of the kernelReleasedList, but maintains the
kernelList of the Program object.
The logic around resurrecting previously released kernels was not quite
correct, and causing issues in kernel object reference counting.
This commit also ensures clReleaesKenrel() deletes the kernel, and
erases the kernel from the kernelList.
This fix causes no regressions in the Khronos test cases, but also
fixes a JIT memory leak issue due to undeleted Program objects upon
clReleaseProgram().
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
Previously, an event was not being released in test_compiled_kernel() test case,
causing an imbalance in program object reference count.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
I assert that some Khronos v1.2 tests are violating the v1.2 spec.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
git.ti.com/ti-opencl/host
Including:
- Use of the Loki library v 0.1.7 for C++ Singleton implementation.
- Updated Platform object to be a Singleton class instance.
- Better handling of MemObject management with concurrent threads.
- Events: added CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST error code.
- MapImageEvent() fixes.
- KernelEvent() fixes around retaining/releasing objects.
- CopyBufferRectEvent() fixes.
- ReadWriteBufferRectEvent() fixes.
Revalidating Shamrock with these changes resulted in 12 more Khronos
conformance tests passing in test_basic, test_buffers, and test_events,
and no regressions.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
ICD now supported, so that's no longer a TODO.
Also, need to install opencl-headers package, as the OpenCL headers
are no longer copied from this repo.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
This was validated by running the sanity tests, and the Khronos conformance
tests without an ICD loader; then installing the Khronos ICD loader, and
running that subset of conformance tests that would just invoke OpenCL
Context APIs.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
Use the ICD templates to:
a) Embed the dispatch table pointer into the object; and
b) Convert between OpenCL API objects and their internal Coal namespace
representations.
This involved explicitly up/down casting whereever there was an explicit
or implicit cast between a cl_<object> type and a Coal::<object> type.
This was validated by running the sanity tests, and the Khronos conformance
tests without an ICD loader; then installing the Khronos ICD loader, and
running that subset of conformance tests that would just invoke Platform
and Device APIs.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
Update the dispatch table to match the OCL 1.2 disptach table of the
file ICD loader, which is available from the Khronos website:
www.khronos.org/registry/cl/specs/opencl-icd-1.2.11.0
Also, define templates to enable conversion between Coal namespace internal
C++ objects and OpenCL C API objects, containing the dispatch table pointer
as the first pointer field, as expected by the Khronos ICD loader.
This template design is based on the solution employed by Francisco Jerez
in the clover state tracker of Mesa:
http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/state_trackers/clover/core/object.hpp
with some simplifications. For example, validation is done in shamrock using
isA() methods, and not in the templates. Also conversion of lists is
done simply, using for loops, rather than maps and vectors.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
Per the v1.2 spec, for clGetKernelWorkGroupInfo(), CL_KERNEL_GLOBAL_WORK_SIZE:
"If device is not a custom device or kernel is not a built-in kernel,
clGetKernelArgInfo returns the error CL_INVALID_VALUE."
Since the CPU is not a custom device, and has no built-in
kernels, then the return value of CL_INVALID_VALUE is correct.
This reverts commit 668bdd17cadc838a8bc165a0f222e31c7b6777a7, but as
a result may cause an error in piglit testing, which that commit
was meant to resolve.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
|
|
|
|
Previously, clBuildProgram() was returning CL_COMPILE_PROGRAM_FAILURE
instead of CL_BUILD_PROGRAM_FAILURE when the compile method, called from
the build method, failed.
This was caught by a piglit v1.2 test:
"Failed (error code: CL_COMPILE_PROGRAM_FAILURE): Trigger CL_BUILD_PROGRAM_FAILURE if there is a failure to build the program executable."
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
Also updated detailed analysis of Khronos failing tests for posterity.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
Previously, the values of:
CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE and CL_DEVICE_MAX_CONSTANT_ARGS
were so large as to cause the Khronos tests to run out of memory and
crash LLVM with an assertion.
Now, these values have been reduced to the minimum allowed by the spec.
This enables the Khronos test:
%test_api min_max_constant_args
to PASS reliably.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
One previously failing test now passes, due to an updated LLVM,
and one new test is failing.
Analysis provided.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
Previously, this was returning zero!
This allows the Khronos tests:
% test_api create_context_from_type
% test_api platform_extensions
to PASS.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
It is necessary to retain any buffers in case the client releases
memory buffers for kernel objects during kernel execution.
In fact, the Khronos test:
% test_api release_during_execute test
does just that!
This patch allows that test to pass.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
Per the v1.2 spec, minimum size for maximum memory allocatable must be 1/4
the size of CL_DEVICE_GLOBAL_MEM_SIZE.
This enables the Khronos test
% test_api min_max_mem_alloc_size
to PASS.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
The flags: CL_MEM_HOST_WRITE_ONLY | CL_MEM_HOST_READ_ON | CL_MEM_HOST_NO_ACCESS
were missing in the validation of flags to clCreateBuffer() and
clCreateSubBuffer().
In addition, sub-buffer creation functions needed logic to conditionally
inherit flags from the parent buffer.
This patch enables the Khronos conformance test:
% test_api get_buffer_info
to PASS.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
With an update of LLVM to 3.6+, the reqd_work_group_size attribute is no
longer sitting in the first operand position of the function's meta data
node. It now can be anywhere.
This patch iterates through all the metanode operands searching for the
reqd_work_group_size attribute.
This enables the Khronos test:
% test_api kernel_required_group_size
to PASS.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
Previous value was 64Kb for max allowable size of parameters to pass to
a kernel.
This was causing Khronos tests to crash.
Now, set to a more sane size: 1024 bytes.
This enables the Khronos test:
% test_api min_max_parameter_size
to PASS.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
It is possible that the callee is passing a null buffer, which is
a valid value per the v1.2 spec for a kernel argument.
This patch enables the v1.2 Khronos test:
% test_api null_buffer_arg
to PASS.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
This prevents a crash, and allows the Khronos test:
% test_basic vec_type_hint
to pass.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
Include
% test_api binary_create
in the list of Khronos tests that violate the spec.
See comment in source code.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
This enables the Khronos v1.2
% test_basic kernel_preprocessor_macros
test to pass.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
Updated "make test" sanity results.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
Minor bug fix, caught thanks to compiler warning.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
The extension is optional, partial support exists in atomic.cl, so can
be added back if that becomes a requirement.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
GP: Amended to include cpu.h instead of clc.h, which defines abs() in
terms of __builtin_abs().
|
|
Previously, it was assumed the OpenCL headers version 1.2 were installed, and
if not, the build failed.
Now CMake will check this and error out before the build.
OpenCL header versions greater than 1.2 should also be acceptable.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
|
|
whitespace
|
|
|
|
This implementation passes the Khronos test_buffer_migrate test of the
buffers test.
However, a real test requires devices of different memory affinities,
between which to migrate the buffers, which
in the case of a CPUDevice only implementation on heterogenous cores,
we don't currently have.
Nevertheless, this patch implements the API, and the backend has a
nominal implementation which will pre-allocate device buffers when called.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
|
|
This implements an aspect of the clCreateSubDevices() API, per the v1.2 spec:
"A program binary (compiled binary, library binary or executable binary)
built for a parent device can be used by all its sub-devices.
If a program binary has not been built for a sub-device, the
program binary associated with the parent device will be used."
Previously, each program or kernel object was created for a device. If
a device was paritioned into sub-devices, the sub-devices may not have
had an associated program/kernel object (unless one was explicitly built).
Now, when shamrock queries a device for a kernel or program, it will search
the device hierarchy and look for a parent device for which a program/kernel
object may have been created.
This patch enables the Khronos v1.2 test_device_partition to PASS.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
|
|
|
|
|
|
|