1*c217d954SCole Faust# Extract list of operators from a list of TfLite models 2*c217d954SCole Faust 3*c217d954SCole Faust## Introduction 4*c217d954SCole Faust 5*c217d954SCole FaustPurpose of this script is to inspect a list of user-provided TfLite models and report 6*c217d954SCole Faustthe list of operators that are used as well as the data-types that the models operate on. 7*c217d954SCole FaustThe script can subsequently generate a configuration file that can be provided to the 8*c217d954SCole FaustCompute Library build system and generate a library that contains only the operators required 9*c217d954SCole Faustby the given model(s) to run. 10*c217d954SCole Faust 11*c217d954SCole FaustUtilizing this script, use-case tailored Compute Library dynamic libraries can be created, 12*c217d954SCole Fausthelping reduce the overall binary size requirements. 13*c217d954SCole Faust 14*c217d954SCole Faust## Usage example 15*c217d954SCole Faust 16*c217d954SCole FaustAssuming that the virtual environment is activated and the requirements are present, 17*c217d954SCole Faustwe can run the following command: 18*c217d954SCole Faust 19*c217d954SCole Faust```bash 20*c217d954SCole Faust./report_model_ops.py -m modelA.tfile modelB.tflite -c build_config.json 21*c217d954SCole Faust``` 22*c217d954SCole Faust 23*c217d954SCole Faust## Input arguments 24*c217d954SCole Faust 25*c217d954SCole Faust***models (required)*** : 26*c217d954SCole FaustA list of comma separated model files. 27*c217d954SCole Faust 28*c217d954SCole FaustSupported model formats are: 29*c217d954SCole Faust 30*c217d954SCole Faust* TfLite 31*c217d954SCole Faust 32*c217d954SCole Faust***config (optional)*** : 33*c217d954SCole FaustThe configuration file to be created on JSON format that can be provided to ComputeLibrary's 34*c217d954SCole Faustbuild system and generate a library with the given list of operators and data-types 35*c217d954SCole Faust 36*c217d954SCole Faust***debug (optional)*** : 37*c217d954SCole FaustFlag that enables debug information 38