profile¶
Profile a model to determine how efficiently is may run on hardware. This will profile a YZLITE model or .tflite model file in a simulator or on a locally connected, embedded device.
NOTE: Any .tflite model file supported by Tensorflow-Lite Micro will work with this command (i.e. The .tflite does NOT need to be generated by the YZLITE).
Additional Documentation¶
Usage¶
Usage: yzlite profile [OPTIONS] <model>
Profile a model to determine how efficiently is may run on hardware
This will profile a YZLITE model or .tflite model file
in a simulator or on a locally connected, embedded device.
NOTE: *Any* .tflite model file supported by Tensorflow-Lite Micro will
work with this command (i.e. The .tflite does NOT need to be generated by the YZLITE).
For more details see:
https://github.com/ReRAM-Labs/yzlite/docs/guides/model_profiler
----------
Examples
----------
# Profile the YZLITE model in the MVP accelerator simulator
yzlite profile image_example1 --accelerator MVP --estimates
# Profile a .tflite without any hardware acceleration
yzlite profile ~/workspace/some_model.tflite --estimates
# Profile the model on the connected development board
# using the MVP accelerator
yzlite profile audio_example1 --accelerator MVP --device
Arguments
* model <model> One of the following: [default: None] [required]
- Name of previously trained YZLITE model
- Path to .tflite model file
- Path to .yzlite.zip model archive file
Options
--accelerator -a <name> Name of accelerator for which to compile then profile model. [default: None]
If omitted, then profile using the reference kernels
--build --no-build Build and quantize before profiling the model rather than loading from a pre-trained .tflite file in the YZLITE model's archive [default: no-build]
--verbose -v Enable verbose console logs
--device -d Profile model on embedded device instead of simulator.
If this option is provided, then the device must be locally connected
--port <port> Serial COM port of the embedded device. [default: None]
This is only used with the --device option.
If omitted, then attempt to automatically determine the serial COM port
--output -o <output> Generate profiling report in given output directory [default: None]
--no-format By default, the number units will be formatted for easier reading. Use this option to return the unformatted values
--estimates --no-estimates If profiling in the simulator, this will estimate additional metrics such as CPU cycles and energy. Disabling this option can reduce profiling time [default: no-estimates]
--post This allows for post-processing the profiling results (e.g. uploading to a cloud) if supported by the given YZLiteModel
--help Show this message and exit.