cl_bench: Add benchmark tool

Benchmarks memory throughput from shaders at the moment.
Has specific code optimized for GC2000 and GC3000.

Optionally test speed of ocram, though this is disabled by default as it
requires ugly user space as well as kernel hack.

Signed-off-by: Wladimir J. van der Laan <laanwj@gmail.com>
8 files changed
tree: f876a04d8a6b448fa38c9a9b9a1d3b3322e7c811
  1. src/
  2. .gitignore
  3. autogen.sh
  4. configure.ac
  5. COPYING
  6. Makefile.am
  7. README.md
README.md

Etnaviv GPU tests

This contains various tests for Vivante GPUs based on the Etnaviv DRM driver.

Building

./autogen.sh
./configure
make

For cross-builds simply pass --host=<toolchain-tuple> to configure. You may have to override PKG_CONFIG_PATH PKG_CONFIG_SYSROOT_DIR PKG_CONFIG_LIBDIR as well to make it able to find the DRM libraries.

Dependencies

This package needs libdrm installed with libdrm_etnaviv enabled. MESA is not necessary.

Tests

etnaviv_cl_test

This is an extremely basic test that writes “Hello World” to memory from a CL shader.

etnaviv_verifyops

The intent of this test is to test the output of various opcodes against putative CPU implementation of the same operation, and thus figure out exactly what the GPU instructions do.

This is achieved by using the CL (OpenCL) functionality of GC2000 and higher.

Example output:

$ etnaviv_verifyops /dev/dri/renderD128
Version: 1.0.0
  Name: etnaviv
  Date: 20151214
  Description: etnaviv DRM
add.u32: PASS
imullo0.u32: PASS
lshift.u32: PASS
rshift.u32: PASS
rotate.u32: PASS
or.u32: PASS
and.u32: PASS
xor.u32: PASS
not.u32: PASS

etnaviv_cl_bench

Executes various CL shader benchmarks.

The goal is to figure out how the use of various instructions impacts performance.

However currently they all measure memory throughput.

Example output:

[read]    [ram]    Speed: 113.606 MB/s
[readacc] [ram]    Speed:  82.522 MB/s
[write]   [ram]    Speed: 234.779 MB/s