VectorBlox is an SDK for compiling and running TFLite INT8 models on the VectorBlox accelerator.
Models must be quantized and compiled using the included scripts.
The models can then be run via the VectorBlox simulator or on a physical VectorBlox accelerator on a Microchip FPGA.
To use the VectorBlox SDK, you need to run it in an Ubuntu environment (version 20.04, 22.04, or 24.04).
If you are using Windows, we recommend installing WSL (Windows Subsystem for Linux) so you can run Ubuntu on your computer. Setup instructions are available here:Microsoft WSL Install Guide.
Important for WSL users: run the SDK from your Ubuntu home folder, or make sure the folder you are using has the correct access permissions.
If cloning the repo,
gitandgit-lfsmust be installed viaapt install git-lfs && git-lfs install
There are two options for downloading the SDK:
-
Download an archive (zip or tar.gz) from https://github.com/Microchip-Vectorblox/VectorBlox-SDK/releases
-
Clone this repository
Navigate to the root directory of VectorBlox-SDK and run the following command:
bash install_dependencies.shActivate (which installs if needed) Python 3.10 virtual environment, and set necessary environment variables
source setup_vars.shOnce in the VBX Python environment, the shell prompt is prefixed with (vbx_env).
Note: To exit or deactivate the environment, run the following command:
deactivateWhen getting started with VectorBlox, it is recommended to review our tutorials to understand the flow. These example tutorials show how to generate CoreVectorBlox-compatible binary files using a shell script in the tutorials directory.
Tutorials will download the model and convert it to a quantized .tflite if necessary.
It will then be compiled into a VectorBlox binary file (.vnnx and .hex or .ucomp extensions) and simulated.
Follow the steps below to run a tutorial shell script:
cd $VBX_SDK/tutorials/SOURCE_NAME/MODEL_NAME
bash MODEL_NAME.shFor a more detailed walkthrough of three tutorials, refer to the Tutorial Walkthrough Guide in the docs folder.
Also, within the docs folder, a Tutorial Metrics Appendix can be found that contains a complete list of tutorials along with their metrics.
For more information on the commands presented in the shell script of the tutorials, see our SDK Programmer's Guide. Finally, a high-level overview of our tutorials is available in the Tutorial README.
Once a model’s binary file has been obtained from the SDK, it can be run on a PolarFire FPGA. Currently, the 3.1 SDK does not support PolarFire Non SoC Video Kit.
More information on setting up the PolarFire SoC Video Kit for VectorBlox can be found in the VectorBlox-SoC-Video-Kit-Demo repository.
Within the VectorBlox-SoC-Video-Kit-Demo repository, refer to the Quickstart Guide when getting started. This guide provides a walkthrough for properly setting up the PolarFire SoC Video Kit so that a model’s binary file generated by the SDK can run on it.
Also, see the Adding Models Markdown File in the VectorBlox-SoC-Video-Kit-Demo repository for information on how to transfer the model’s binary file generated by the SDK to the board. This file also shows how to add a compiled model binary file to demo_models.h file so it can be run on the VectorBlox demo.
For up-to-date information on known issues for the VectorBlox SDK and Demos, please refer to the known issues page.
Model accuracy and performance can be found here.
Supported TFLite INT8 operators can be found here.
Supported C postprocessing can be found here.
For additional information, refer to the SDK docs folder.