From cc0a80bb32b354e3ae650f34f1b6b270bac277bb Mon Sep 17 00:00:00 2001 From: Anthony Barbier Date: Fri, 15 Dec 2017 11:37:29 +0000 Subject: COMPMID-557: Use embed_kernels by default, add some command line examples to run the tests Change-Id: Ib3a856420d306bafdb7d18b5de5bc788825b8593 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/113498 Tested-by: Jenkins Reviewed-by: Georgios Pinitas --- docs/00_introduction.dox | 5 +++-- docs/02_tests.dox | 41 +++++++++++++++++++++++++++-------------- 2 files changed, 30 insertions(+), 16 deletions(-) (limited to 'docs') diff --git a/docs/00_introduction.dox b/docs/00_introduction.dox index 4c6b8f38db..9cabb9707b 100644 --- a/docs/00_introduction.dox +++ b/docs/00_introduction.dox @@ -444,8 +444,8 @@ To see the build options available simply run ```scons -h```: actual: False embed_kernels: Embed OpenCL kernels and OpenGL ES compute shader in library binary (yes|no) - default: False - actual: False + default: True + actual: True set_soname: Set the library's soname and shlibversion (requires SCons 2.4 or above) (yes|no) default: False @@ -733,6 +733,7 @@ To cross compile an OpenCL example: aarch64-linux-android-clang++ examples/cl_convolution.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -larm_compute-static -larm_compute_core-static -L. -o cl_convolution_aarch64 -static-libstdc++ -pie -lOpenCL -DARM_COMPUTE_CL To cross compile a GLES example: + #32 bit: arm-linux-androideabi-clang++ examples/gc_absdiff.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -larm_compute-static -larm_compute_core-static -L. -o gc_absdiff_arm -static-libstdc++ -pie -DARM_COMPUTE_GC #64 bit: diff --git a/docs/02_tests.dox b/docs/02_tests.dox index 0eb6cee487..5fcb4ba1b7 100644 --- a/docs/02_tests.dox +++ b/docs/02_tests.dox @@ -18,6 +18,10 @@ different inputs, e.g. different tensor shapes. One limitation is that tests/fixtures cannot be parameterized based on the data type if static type information is needed within the test (e.g. to validate the results). +@note By default tests are not built. To enable them you need to add validation_tests=1 and / or benchmark_tests=1 to your SCons line. + +@note Tests are not included in the pre-built binary archive, you have to build them from sources. + @subsection tests_overview_structure Directory structure . @@ -36,17 +40,6 @@ information is needed within the test (e.g. to validate the results). |-- datasets <- Datasets for benchmark and validation tests. |-- main.cpp <- Main entry point for the tests. Currently shared between validation and benchmarking. |-- networks <- Network classes for system level tests. - |-- validation_old <- Old validation framework. No new tests must be added! - | |-- dataset <- Old datasets for boost. Not to be used for new tests! - | |-- model_objects <- Old helper files for system level validation. Not to be used for new tests! - | |-- CL \ - | |-- DEMO \ - | |-- NEON --> Backend specific test cases - | |-- UNIT / - | |-- VX / - | `-- system_tests -> System level tests - | |-- CL - | `-- NEON `-- validation -> Top level directory for validation files. |-- CPP -> C++ reference code |-- CL \ @@ -356,7 +349,9 @@ where `./data` contains the assets needed by the tests. If only a subset of the tests has to be executed the `--filter` option takes a regular expression to select matching tests. - ./arm_compute_benchmark --filter='NEON/.*AlexNet' ./data + ./arm_compute_benchmark --filter='^NEON/.*AlexNet' ./data + +@note Filtering will be much faster if the regular expression starts from the start ("^") or end ("$") of the line. Additionally each test has a test id which can be used as a filter, too. However, the test id is not guaranteed to be stable when new tests are added. @@ -393,12 +388,30 @@ You can use the `--instruments` option to select one or more instruments to meas `MALI` will try to collect Mali hardware performance counters. (You need to have a recent enough Mali driver) -`WALL_CLOCK` will measure time using `gettimeofday`: this should work on all platforms. +`WALL_CLOCK_TIMER` will measure time using `gettimeofday`: this should work on all platforms. -You can pass a combinations of these instruments: `--instruments=PMU,MALI,WALL_CLOCK` +You can pass a combinations of these instruments: `--instruments=PMU,MALI,WALL_CLOCK_TIMER` @note You need to make sure the instruments have been selected at compile time using the `pmu=1` or `mali=1` scons options. +@subsubsection tests_running_examples Examples + +To run all the precommit validation tests: + + LD_LIBRARY_PATH=. ./arm_compute_validation --mode=precommit + +To run the OpenCL precommit validation tests: + + LD_LIBRARY_PATH=. ./arm_compute_validation --mode=precommit --filter="^CL.*" + +To run the NEON precommit benchmark tests with PMU and Wall Clock timer in miliseconds instruments enabled: + + LD_LIBRARY_PATH=. ./arm_compute_benchmark --mode=precommit --filter="^NEON.*" --instruments="pmu,wall_clock_timer_ms" --iterations=10 + +To run the OpenCL precommit benchmark tests with OpenCL kernel timers in miliseconds enabled: + + LD_LIBRARY_PATH=. ./arm_compute_benchmark --mode=precommit --filter="^CL.*" --instruments="opencl_timer_ms" --iterations=10 + @subsection tests_running_tests_validation Validation -- cgit v1.2.1