diff options
author | Jeremy Johnson <jeremy.johnson@arm.com> | 2022-06-30 14:27:56 +0100 |
---|---|---|
committer | Jeremy Johnson <jeremy.johnson@arm.com> | 2022-07-12 11:28:15 +0100 |
commit | 0ecfa37738d56cbb50af584e9bf077052094f460 (patch) | |
tree | c3b6d68ddd458ec6a1a409245ca860ed07522ce4 /README.md | |
parent | 6c6467f3f07687f0eebd049f1fa3ce21c516f184 (diff) | |
download | reference_model-0ecfa37738d56cbb50af584e9bf077052094f460.tar.gz |
Add conformance generator scripts
Change-Id: I5cb16ea1f47ee454f03a1d5182827e3fd9f49128
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com>
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 51 |
1 files changed, 51 insertions, 0 deletions
@@ -413,6 +413,57 @@ tosa_verif_framework_compiler_runner \ --test tests ``` +### TOSA Conformance Generator + +This script enables creation of part or all of the *TOSA conformance tests +<https://git.mlplatform.org/tosa/conformance_tests.git/>*, to +enable development of these tests. + +Currently only the Base Profile of TOSA is supported by the generator. + +#### Setup + +To enable selection of the framework tests for conformance, the TOSA Framework +Unit Tests (see above) must have been pre-generated and there is access to the +framework schema from TensorFlow Lite. + +#### Usage + +These are the main script options for controlling the types of tests produced: + +* `--profile` - controls the TOSA profile, only `base` is currently supported. +* `--unit-tests` - choose either `operator`, `framework` or `both` tests. +* `--test-type` - selects `postive`, `negative` or `both` types of test. + + +An example to create the TOSA operator unit tests for ADD and SUB: + +```bash +tosa_verif_conformance_generator \ + --profile base \ + --unit-tests operator \ + --ref-model-directory reference_model \ + --operator add sub +``` + +The above command will create some temporary files in a `conformance_build` +directory, but will output the conformance unit tests into a `conformance` +directory. + +This next example will create all the conformance tests, using different +temporary build and output directories: + +```bash +tosa_verif_conformance_generator \ + --profile base \ + --unit-tests both \ + --ref-model-directory reference_model \ + --build-directory tmp_build \ + --output-directory conf_tests \ + --framework-tests-directory tests \ + --framework-schema tensorflow/lite/schema/schema.fbs +``` + ## Other tools Included in this repository are some support utilities used by the test runner: |