[Piglit] [PATCH] Add OpenCL support
Blaž Tomažič
blaz.tomazic at gmail.com
Wed Aug 29 17:02:55 PDT 2012
I have implemented an OpenCL testing framework for Piglit which I would
like to merge upstream. Here is a summary of its functionality:
The framework implements OpenCL utilities which are used for
quicker and easier writing of tests.
Test that are written against the framework can be defined to be
run once, per each platform or per each device. Each test can be
limited to a particular group of platforms or devices.
There are different test types to chose from when writing a
test. Each type exposes configuration variables that are used to
automatically check for different implementation functionality
(OpenCL version, extensions, filter by platform name,...) and
create objects (context creation, program creation and building,
source code loading, buffer creation and buffer data
initialization,...), so there is less coding needed when writing
a test.
A little bigger description about the framework, and how to use it, is
located here [1] and also in one of the commits (doc: Add cl tests
documentation).
This patch would add this framework to Piglit and about 70 tests that
are implemented with it.
The patch is quite large, but the commits that modify already present
files are really small (cmake: and README: commits). The other commits
only add new files.
Blaž Tomažič
[1] https://raw.github.com/blazt/piglit/opencl-request/tests/cl/README
----------------------------------------------------------------
The following changes since commit
4cb147e434c190155012ae80542f933d7a5b3231:
egl-util: Add call to piglit_dispatch_default_init() (2012-08-29
10:03:16 -0700)
are available in the git repository at:
git://github.com/blazt/piglit.git opencl-request
for you to fetch changes up to d2f52e9e0ccdcd2c6ee17ff2fac351bb4380fa0c:
README: Include OpenCL information (2012-08-30 01:31:26 +0200)
----------------------------------------------------------------
Blaž Tomažič (8):
util-cl: Add utilities to support OpenCL tests
util-cl: Add OpenCL testing framework
cmake: Build OpenCL utilities and framework
cl: Add OpenCL tests
cmake: Build OpenCL tests
cl: Add all_cl.tests test set
doc: Add cl tests documentation
README: Include OpenCL information
CMakeLists.txt | 5 +
README | 8 +-
cmake/Modules/FindOpenCL.cmake | 44 +
cmake/piglit_util.cmake | 2 +-
cmake/target_api/CMakeLists.txt | 4 +
cmake/target_api/cl/CMakeLists.txt | 10 +
tests/CMakeLists.txt | 4 +
tests/all_cl.tests | 131 ++
tests/cl/CMakeLists.txt | 47 +
tests/cl/README | 107 ++
tests/cl/api/CMakeLists.cl.txt | 41 +
tests/cl/api/CMakeLists.txt | 1 +
tests/cl/api/build-program.c | 243 +++
tests/cl/api/create-buffer.c | 331 ++++
tests/cl/api/create-command-queue.c | 192 +++
tests/cl/api/create-context-from-type.c | 305 ++++
tests/cl/api/create-context.c | 293 ++++
tests/cl/api/create-kernel.c | 169 ++
tests/cl/api/create-kernels-in-program.c | 148 ++
tests/cl/api/create-program-with-source.c | 193 +++
tests/cl/api/enqueue-read_write-buffer.c | 507 ++++++
tests/cl/api/get-command-queue-info.c | 155 ++
tests/cl/api/get-context-info.c | 177 ++
tests/cl/api/get-device-ids.c | 212 +++
tests/cl/api/get-device-info.c | 153 ++
tests/cl/api/get-event-info.c | 172 ++
tests/cl/api/get-image-info.c | 202 +++
tests/cl/api/get-kernel-info.c | 167 ++
tests/cl/api/get-kernel-work-group-info.c | 190 +++
tests/cl/api/get-mem-object-info.c | 167 ++
tests/cl/api/get-platform-ids.c | 109 ++
tests/cl/api/get-platform-info.c | 172 ++
tests/cl/api/get-program-build-info.c | 176 ++
tests/cl/api/get-program-info.c | 214 +++
tests/cl/api/retain_release-command-queue.c | 158 ++
tests/cl/api/retain_release-context.c | 168 ++
tests/cl/api/retain_release-event.c | 172 ++
tests/cl/api/retain_release-kernel.c | 158 ++
tests/cl/api/retain_release-mem-object.c | 159 ++
tests/cl/api/retain_release-program.c | 161 ++
tests/cl/api/set-kernel-arg.c | 246 +++
tests/cl/api/unload-compiler.c | 78 +
tests/cl/custom/CMakeLists.cl.txt | 1 +
tests/cl/custom/CMakeLists.txt | 1 +
tests/cl/custom/run-simple-kernel.c | 78 +
tests/cl/doc_api.c | 54 +
tests/cl/doc_custom.c | 46 +
tests/cl/doc_program.c | 56 +
tests/cl/doc_program.cl | 89 +
tests/cl/doc_program.program_test | 97 ++
tests/cl/program/CMakeLists.cl.txt | 2 +
tests/cl/program/CMakeLists.txt | 1 +
.../build/fail/add-different-size-vector.cl | 13 +
tests/cl/program/build/fail/increment-float.cl | 11 +
tests/cl/program/build/other-data-types.cl | 22 +
.../program/build/scalar-and-vector-operators.cl | 42 +
tests/cl/program/build/scalar-data-type-half.cl | 10 +
tests/cl/program/build/scalar-data-types.cl | 29 +
tests/cl/program/build/scalar-operators.cl | 53 +
tests/cl/program/build/vector-data-types.cl | 33 +
tests/cl/program/build/vector-operators.cl | 53 +
tests/cl/program/execute/comma.cl | 19 +
tests/cl/program/execute/for-loop.cl | 69 +
tests/cl/program/execute/get-global-id.cl | 84 +
tests/cl/program/execute/reference.cl | 21 +
tests/cl/program/execute/scalar-arithmetic-char.cl | 336 ++++
.../cl/program/execute/scalar-arithmetic-float.cl | 343 ++++
tests/cl/program/execute/scalar-arithmetic-int.cl | 336 ++++
tests/cl/program/execute/scalar-arithmetic-long.cl | 336 ++++
.../cl/program/execute/scalar-arithmetic-short.cl | 336 ++++
.../cl/program/execute/scalar-arithmetic-uchar.cl | 193 +++
tests/cl/program/execute/scalar-arithmetic-uint.cl | 193 +++
.../cl/program/execute/scalar-arithmetic-ulong.cl | 193 +++
.../cl/program/execute/scalar-arithmetic-ushort.cl | 193 +++
tests/cl/program/execute/scalar-bitwise-int.cl | 134 ++
tests/cl/program/execute/scalar-comparison-char.cl | 175 ++
.../cl/program/execute/scalar-comparison-float.cl | 175 ++
tests/cl/program/execute/scalar-comparison-int.cl | 175 ++
tests/cl/program/execute/scalar-comparison-long.cl | 175 ++
.../cl/program/execute/scalar-comparison-short.cl | 175 ++
.../cl/program/execute/scalar-comparison-uchar.cl | 161 ++
tests/cl/program/execute/scalar-comparison-uint.cl | 161 ++
.../cl/program/execute/scalar-comparison-ulong.cl | 161 ++
.../cl/program/execute/scalar-comparison-ushort.cl | 161 ++
tests/cl/program/execute/scalar-logical-float.cl | 91 +
tests/cl/program/execute/scalar-logical-int.cl | 91 +
tests/cl/program/execute/sizeof.cl | 118 ++
.../execute/vector-arithmetic-float4.program_test | 124 ++
.../program/execute/vector-arithmetic-floating.cl | 25 +
.../execute/vector-arithmetic-int4.program_test | 168 ++
.../program/execute/vector-arithmetic-integer.cl | 45 +
tests/cl/program/execute/vector-load-int4.cl | 27 +
tests/cl/program/max-work-item-sizes.c | 133 ++
tests/cl/program/program-tester.c | 1794
++++++++++++++++++++
tests/cl/template_api.c | 41 +
tests/cl/template_custom.c | 41 +
tests/cl/template_program.c | 41 +
tests/cl/template_program.cl | 9 +
tests/cl/template_program.program_test | 8 +
tests/util/CMakeLists.cl.txt | 20 +
tests/util/piglit-framework-cl-api.c | 200 +++
tests/util/piglit-framework-cl-api.h | 142 ++
tests/util/piglit-framework-cl-custom.c | 67 +
tests/util/piglit-framework-cl-custom.h | 118 ++
tests/util/piglit-framework-cl-program.c | 331 ++++
tests/util/piglit-framework-cl-program.h | 149 ++
tests/util/piglit-framework-cl.c | 516 ++++++
tests/util/piglit-framework-cl.h | 337 ++++
tests/util/piglit-util-cl-enum.c | 934 ++++++++++
tests/util/piglit-util-cl-enum.h | 95 ++
tests/util/piglit-util-cl.c | 1001 +++++++++++
tests/util/piglit-util-cl.h | 557 ++++++
112 files changed, 18567 insertions(+), 3 deletions(-)
create mode 100644 cmake/Modules/FindOpenCL.cmake
create mode 100644 cmake/target_api/cl/CMakeLists.txt
create mode 100644 tests/all_cl.tests
create mode 100644 tests/cl/CMakeLists.txt
create mode 100644 tests/cl/README
create mode 100644 tests/cl/api/CMakeLists.cl.txt
create mode 100644 tests/cl/api/CMakeLists.txt
create mode 100644 tests/cl/api/build-program.c
create mode 100644 tests/cl/api/create-buffer.c
create mode 100644 tests/cl/api/create-command-queue.c
create mode 100644 tests/cl/api/create-context-from-type.c
create mode 100644 tests/cl/api/create-context.c
create mode 100644 tests/cl/api/create-kernel.c
create mode 100644 tests/cl/api/create-kernels-in-program.c
create mode 100644 tests/cl/api/create-program-with-source.c
create mode 100644 tests/cl/api/enqueue-read_write-buffer.c
create mode 100644 tests/cl/api/get-command-queue-info.c
create mode 100644 tests/cl/api/get-context-info.c
create mode 100644 tests/cl/api/get-device-ids.c
create mode 100644 tests/cl/api/get-device-info.c
create mode 100644 tests/cl/api/get-event-info.c
create mode 100644 tests/cl/api/get-image-info.c
create mode 100644 tests/cl/api/get-kernel-info.c
create mode 100644 tests/cl/api/get-kernel-work-group-info.c
create mode 100644 tests/cl/api/get-mem-object-info.c
create mode 100644 tests/cl/api/get-platform-ids.c
create mode 100644 tests/cl/api/get-platform-info.c
create mode 100644 tests/cl/api/get-program-build-info.c
create mode 100644 tests/cl/api/get-program-info.c
create mode 100644 tests/cl/api/retain_release-command-queue.c
create mode 100644 tests/cl/api/retain_release-context.c
create mode 100644 tests/cl/api/retain_release-event.c
create mode 100644 tests/cl/api/retain_release-kernel.c
create mode 100644 tests/cl/api/retain_release-mem-object.c
create mode 100644 tests/cl/api/retain_release-program.c
create mode 100644 tests/cl/api/set-kernel-arg.c
create mode 100644 tests/cl/api/unload-compiler.c
create mode 100644 tests/cl/custom/CMakeLists.cl.txt
create mode 100644 tests/cl/custom/CMakeLists.txt
create mode 100644 tests/cl/custom/run-simple-kernel.c
create mode 100644 tests/cl/doc_api.c
create mode 100644 tests/cl/doc_custom.c
create mode 100644 tests/cl/doc_program.c
create mode 100644 tests/cl/doc_program.cl
create mode 100644 tests/cl/doc_program.program_test
create mode 100644 tests/cl/program/CMakeLists.cl.txt
create mode 100644 tests/cl/program/CMakeLists.txt
create mode 100644
tests/cl/program/build/fail/add-different-size-vector.cl
create mode 100644 tests/cl/program/build/fail/increment-float.cl
create mode 100644 tests/cl/program/build/other-data-types.cl
create mode 100644
tests/cl/program/build/scalar-and-vector-operators.cl
create mode 100644 tests/cl/program/build/scalar-data-type-half.cl
create mode 100644 tests/cl/program/build/scalar-data-types.cl
create mode 100644 tests/cl/program/build/scalar-operators.cl
create mode 100644 tests/cl/program/build/vector-data-types.cl
create mode 100644 tests/cl/program/build/vector-operators.cl
create mode 100644 tests/cl/program/execute/comma.cl
create mode 100644 tests/cl/program/execute/for-loop.cl
create mode 100644 tests/cl/program/execute/get-global-id.cl
create mode 100644 tests/cl/program/execute/reference.cl
create mode 100644 tests/cl/program/execute/scalar-arithmetic-char.cl
create mode 100644 tests/cl/program/execute/scalar-arithmetic-float.cl
create mode 100644 tests/cl/program/execute/scalar-arithmetic-int.cl
create mode 100644 tests/cl/program/execute/scalar-arithmetic-long.cl
create mode 100644 tests/cl/program/execute/scalar-arithmetic-short.cl
create mode 100644 tests/cl/program/execute/scalar-arithmetic-uchar.cl
create mode 100644 tests/cl/program/execute/scalar-arithmetic-uint.cl
create mode 100644 tests/cl/program/execute/scalar-arithmetic-ulong.cl
create mode 100644 tests/cl/program/execute/scalar-arithmetic-ushort.cl
create mode 100644 tests/cl/program/execute/scalar-bitwise-int.cl
create mode 100644 tests/cl/program/execute/scalar-comparison-char.cl
create mode 100644 tests/cl/program/execute/scalar-comparison-float.cl
create mode 100644 tests/cl/program/execute/scalar-comparison-int.cl
create mode 100644 tests/cl/program/execute/scalar-comparison-long.cl
create mode 100644 tests/cl/program/execute/scalar-comparison-short.cl
create mode 100644 tests/cl/program/execute/scalar-comparison-uchar.cl
create mode 100644 tests/cl/program/execute/scalar-comparison-uint.cl
create mode 100644 tests/cl/program/execute/scalar-comparison-ulong.cl
create mode 100644 tests/cl/program/execute/scalar-comparison-ushort.cl
create mode 100644 tests/cl/program/execute/scalar-logical-float.cl
create mode 100644 tests/cl/program/execute/scalar-logical-int.cl
create mode 100644 tests/cl/program/execute/sizeof.cl
create mode 100644
tests/cl/program/execute/vector-arithmetic-float4.program_test
create mode 100644
tests/cl/program/execute/vector-arithmetic-floating.cl
create mode 100644
tests/cl/program/execute/vector-arithmetic-int4.program_test
create mode 100644
tests/cl/program/execute/vector-arithmetic-integer.cl
create mode 100644 tests/cl/program/execute/vector-load-int4.cl
create mode 100644 tests/cl/program/max-work-item-sizes.c
create mode 100644 tests/cl/program/program-tester.c
create mode 100644 tests/cl/template_api.c
create mode 100644 tests/cl/template_custom.c
create mode 100644 tests/cl/template_program.c
create mode 100644 tests/cl/template_program.cl
create mode 100644 tests/cl/template_program.program_test
create mode 100644 tests/util/CMakeLists.cl.txt
create mode 100644 tests/util/piglit-framework-cl-api.c
create mode 100644 tests/util/piglit-framework-cl-api.h
create mode 100644 tests/util/piglit-framework-cl-custom.c
create mode 100644 tests/util/piglit-framework-cl-custom.h
create mode 100644 tests/util/piglit-framework-cl-program.c
create mode 100644 tests/util/piglit-framework-cl-program.h
create mode 100644 tests/util/piglit-framework-cl.c
create mode 100644 tests/util/piglit-framework-cl.h
create mode 100644 tests/util/piglit-util-cl-enum.c
create mode 100644 tests/util/piglit-util-cl-enum.h
create mode 100644 tests/util/piglit-util-cl.c
create mode 100644 tests/util/piglit-util-cl.h
More information about the Piglit
mailing list