Vela is a compiler for Arm Ethos-U NPU
edge AI devices. It is used to convert neural networks defined in TOSA
or TensorFlow Lite/LiteRT format into
Ethos-U command streams.
The input network must have quantised activations and quantised weights in order
to be accelerated by the Ethos-U.
The simplest way to obtain Vela is to install it directly from PyPi.
The following will install the latest released version:
pip3 install ethos-u-vela
Requirements
If your system does not match one of the pre-built binary wheels on PyPi then
the installation process will attempt to build Vela from its source code. To do
this it requires the following:
Development version of Python 3 containing the Python/C API header files
Development builds are also available as Python wheels in the GitLab Package
Registry. The development builds reflect the current state of the code and
are not of release quality.
However, it is highly recommended that you specify some additional settings that
describe the Ethos-U system and what optimisation strategy the compiler should
use. The three additional settings are:
System configuration; --system-config
Memory mode; --memory-mode
Optimisation strategy; --optimise
The system configuration and memory mode refer to definitions in a configuration
file. These are specific to the target system. However an example
configuration (Arm/vela.ini) containing some generic reference systems is
provided as part of the installation.
The optimisation strategy indicates whether the compiler should minimise
inference time or runtime memory usage.
Command to list all configurations in a configuration file:
vela --list-configs Arm/vela.ini
Output
The result of the compilation is an optimised network in either TFLite or Raw
format depending upon the input network. This can be overridden using the
--output-format option.
TFLite output contains TensorFlow Lite Custom operators for those parts of
the network that can be accelerated by the Ethos-U NPU. Parts of the network
that cannot be accelerated are left unchanged.
Raw output contains the command stream and weight data required to run Ethos-U
parts of the optimised network. This is stored in .npz
format. See the Output format CLI Option for more information.
This does not contain CPU parts of the network and so cannot be used for
converting TFLite to TOSA.
Raw output includes tensor quantization metadata in the .npz output.
Warnings
It is important to thoroughly review and understand all warning messages
generated by the compiler as they could indicate that not all operators were
optimally converted to run on the Ethos-U.
Performance information
A performance estimation summary is reported after compilation. The cycle and
bandwidth numbers should not be taken as accurate representations of real
performance numbers and they should not be compared against those from other
compilations that use different settings or configurations. The numbers
reported allow the compiler to make its optimisation decisions only. For
accurate performance numbers the network should be run and profiled on an FPGA.
For approximate performance numbers the network can be run on a Fixed
Virtual Platform (FVP) Model.
This product conforms to Arm’s inclusive language policy and, to the best of our
knowledge, does not contain any non-inclusive language. If you find something
that concerns you then email terms@arm.com.