The Vivante ACUITY Toolkit offers both command line tools and APIs, enabling seamless deployment of machine learning models onto devices with a neural processing unit (NPU). This toolkit facilitates the translation of model formats, network optimization, model training, quantization, and inference, until
final integrations with devices.
Table of Contents
Table of Contents | ||
---|---|---|
|
1. Prerequisites
1.1. Host System Requirements
The host meets the requirements as described in Section 1.4, System Requirements following table outlines the essential system prerequisites for running the ACUITY Toolkit:
Resource | Note |
CPU | Intel® CoreTM Core™ i5-6500 CPU@3.2GHz x4 with support of the Intel® Advanced Vector Extensions. |
GPU | (Optional) NVIDIA® GPU cards with CUDA® architectures. A compatible version of CUDA and cuDNN is installed for TensorFlow |
RAM | Minimum 8 GB at least |
Disk | Minimum 160 GB |
OS | Ubuntu 22.04 LTS 64-bit with Python 3.10, Ubuntu 20.04 LTS 64-bit with Python 3.8 (recommended), or Ubuntu 18.04 LTS 64-bit with Python 3.6 Note: Other Ubuntu versions are not recommended. |
1.2. Python Requirements
Supported Python setups include:
Ubuntu 22.04 with Python 3.10
...
Ubuntu 20.04 with Python 3.8
...
Ubuntu 18.04 with Python 3.6
...
1.3. Vivante IDE
The VivanteIDE is Vivante IDE should be installed correctly if you want to generate NBG cases from the ACUITY Toolkit. Please refer to this document: NN IDE VivanteIDE Install
2. Version Information
The NPU driver Vivante ACUITY Toolkit and Vivante IDE need to match the version
...
To ensure seamless deployment of neural network models on SP7350 platforms, select compatible versions of the ACUITY Toolkit, Vivante IDE, and Linux NPU driver as listed below:
Linux NPU Driver | Vivante ACUITY Toolkit | Vivante IDE |
v6.4.13.8 | 6.18.1 | 5.7.2 |
v6.4.15.9 | 6.21.1 | 5.8.2 |
v6.4.18.5 | 6.30.0 | 5.10.1 |
3. Installing ACUITY Binary
...
Version
3.1.
...
Extraction
To extract the binary package of the ACUITY toolkit, follow these steps:
Extract the ACUITY package , 'Verisilicon_Tool_Acuity_Toolkit_<version>.tgz, ' to a destination directory. There are two versions of the toolkit, Please confirm the version that needs to be installed:
acuity-toolkit-binary-6.18.1, matches the VIP9000-NPU kernel driver v6.4.13.8
acuity-toolkit-binary-6.21.1, matches the VIP9000-NPU kernel driver v6.4.15.9
your desired destination directory.
From this directory, locate and unpack the binary package 'acuity-toolkit-binary-<version>.tgz'. When the Once unpacking is completedcomplete, the installation finishesprocess is finished.
3.2.
...
Verification
...
Switch Navigate to the './acuity-toolkit-binary-<version>/bin' directory.
Set the environment variable 'ACUITY_PATH as follows, which will used to execute the ACUITY binary tools
Execute binary file
...
' to point to the bin directory:
Code Block export ACUITY_PATH=<directory of acuity-toolkit-binary-
...
version>/bin
Execute the ACUITY binary tools using the command line. For example:
Code Block yang.luo@ti-d630:~/c3v/acuity-toolkit-binary-6.21.1/bin$ ./pegasus usage: pegasus [-h] {import,export,generate,prune,inference,quantize,train,dump,measure,help} ...
...
Pegasus commands.
...
positional arguments: {import,export,generate,prune,inference,quantize,train,dump,measure,help} import Import models. export Export models. generate Generate metas. prune prune models. inference Inference model and get result. quantize Quantize model. train Train model. dump Dump model activations. measure Get amount of calculation, parameter and activation. help Print a synopsis and a list of commands.
...
optional arguments: -h, --help show this help message and exit
4. Installing ACUITY Wheel
...
Version
4.1.
...
Install requirement packages
acuity-toolkit-6.18.1. Matches the VIP9000-NPU kernel driver v6.4.13.8
...
Extraction and Installation
Extract the ACUITY package, ‘Verisilicon_Tool_Acuity_Toolkit_<version>.tgz’, to a destination directory.
From this directory, locate and unpack the ACUITY Wheel package ‘acuity-toolkit-whl-<version>’.
From the './acuity-toolkit-whl-<version>/bin' directory, select and install a Wheel package with the following commands:
Code Block pip3 install ./acuity-*.whl
4.2 Installing Tensorflow
The Wheel version of ACUITY requires a Tensorflow installation. Use the following commands to install the used Tensorflow version.
4.2.1. ACUITY Toolkit 6.18.1
Code Block |
---|
pip3 install tensorflow==2.10.0 pip3 install scipy pip3 install networkxnetworkx>==1.11 pip3 install lmdb==0.93 pip3 install onnxoptimizer==0.3.1 pip3 install onnx==1.12.0 pip3 install dill==0.2.8.2 pip3 install ruamel.yaml==0.15.81 pip3 install ply==3.11 pip3 install torch==1.5.1 |
...
4.2.2. ACUITY Toolkit 6.21.1
...
Code Block |
---|
pip3 install tensorflow==2.12.0 pip3 install scipy networkxpip3 install networkx>==1.11 pip3 install lmdb==0.93 protobufpip3 install protobuf<==3.20.3 pip3 install onnxoptimizer==0.3.13 pip3 install onnx==1.14.0 pip3 install dill==0.2.8.2 pip3 install ruamel.yaml==0.15.81 pip3 install ply==3.11 pip3 install torch==1.5.1 |
Extract the ACUITY package, Verisilicon_Tool_Acuity_Toolkit_<version>.tgz, to a destination directory. There are two versions of the toolkit, Please confirm the toolkit version matches the Python version that needs to be installed:
acuity-toolkit- whl-6.18.1-python-xxx
acuity-toolkit- whl-6.21.1-python-xxx
From this directory, locate and unpack the binary package acuity-toolkit-whl-<version>.tgz. select and install a Wheel package with the following commands:
Code Block |
---|
pip3 install ./acuity-*.whl |
4.2. Toolkit Verification
...
4.2.3 ACUITY Toolkit 6.30.0
Code Block |
---|
pip3 install tensorflow==2.15.0
pip3 install scipy
pip3 install networkx>=1.11
pip3 install lmdb==0.93
pip3 install protobuf<=3.20.3
pip3 install onnxoptimizer==0.3.13
pip3 install onnx==1.14.0
pip3 install dill==0.2.8.2
pip3 install ruamel.yaml==0.15.81
pip3 install ply==3.11
pip3 install torch==1.5.1 |
4.3. Verification
Navigate to the './acuity-toolkit-whl-<version>/bin' directory.
Execute python filethe Python file. For example:
Code Block user@linux:~/c3v/acuity-toolkit-whl-6.21.1-python3.8.10/bin$ python pegasus.py -h usage: pegasus [-h] {import,export,generate,prune,inference,quantize,train,dump,measure,help} ... Pegasus commands. positional arguments: {import,export,generate,prune,inference,quantize,train,dump,measure,help} import Import models. export Export models. generate Generate metas. prune prune models. inference Inference model and get result. quantize Quantize model. train Train model. dump Dump model activations. measure Get amount of calculation, parameter and activation. help Print a synopsis and a list of commands. optional arguments: -h, --help show this help message and exit