diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2021-08-17 12:54:59 +0100 |
---|---|---|
committer | Freddie Liardet <frederick.liardet@arm.com> | 2021-09-27 16:29:06 +0000 |
commit | a71711008dad9a786a66dcd734b19cb102d65ec5 (patch) | |
tree | d452f581cedde72a61867680be4d290adb03beba /python/scripts/report-model-ops/README.md | |
parent | 93d6cf0028aea111f624b320027576a26354e998 (diff) | |
download | ComputeLibrary-a71711008dad9a786a66dcd734b19cb102d65ec5.tar.gz |
Generate an operator configuration file from a list of tflite models
Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com>
Change-Id: I1b13da6558bd11d49747162d66c81255ccec1498
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6166
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: SiCong Li <sicong.li@arm.com>
Reviewed-by: Sheri Zhang <sheri.zhang@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'python/scripts/report-model-ops/README.md')
-rw-r--r-- | python/scripts/report-model-ops/README.md | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/python/scripts/report-model-ops/README.md b/python/scripts/report-model-ops/README.md new file mode 100644 index 0000000000..aa8efa88d3 --- /dev/null +++ b/python/scripts/report-model-ops/README.md @@ -0,0 +1,37 @@ +# Extract list of operators from a list of TfLite models + +## Introduction + +Purpose of this script is to inspect a list of user-provided TfLite models and report +the list of operators that are used as well as the data-types that the models operate on. +The script can subsequently generate a configuration file that can be provided to the +Compute Library build system and generate a library that contains only the operators required +by the given model(s) to run. + +Utilizing this script, use-case tailored Compute Library dynamic libraries can be created, +helping reduce the overall binary size requirements. + +## Usage example + +Assuming that the virtual environment is activated and the requirements are present, +we can run the following command: + +```bash +./report_model_ops.py -m modelA.tfile modelB.tflite -c build_config.json +``` + +## Input arguments + +***models (required)*** : +A list of comma separated model files. + +Supported model formats are: + +* TfLite + +***config (optional)*** : +The configuration file to be created on JSON format that can be provided to ComputeLibrary's +build system and generate a library with the given list of operators and data-types + +***debug (optional)*** : +Flag that enables debug information |