Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

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

1. Prerequisites

1.1. Host System Requirements

The following table outlines the essential system prerequisites for running the ACUITY Toolkit:

Resource

Note

CPU

Intel® 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

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 Vivante IDE should be installed correctly if you want to generate NBG cases from the ACUITY Toolkit. Please refer to this document: VivanteIDE Install

2. Version Information

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:

  1. Extract the ACUITY package 'Verisilicon_Tool_Acuity_Toolkit_<version>.tgz' to your desired destination directory.

  2. From this directory, locate and unpack the binary package 'acuity-toolkit-binary-<version>.tgz'. Once unpacking is complete, the installation process is finished.

3.2. Verification

  1. Navigate to the './acuity-toolkit-binary-<version>/bin' directory.

  2. Set the environment variable 'ACUITY_PATH' to point to the bin directory:

    export ACUITY_PATH=<directory of acuity-toolkit-binary-version>/bin
  3. Execute the ACUITY binary tools using the command line. For example:

    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. Extraction and Installation

  1. Extract the ACUITY package, ‘Verisilicon_Tool_Acuity_Toolkit_<version>.tgz’, to a destination directory.

  2. From this directory, locate and unpack the ACUITY Wheel package ‘acuity-toolkit-whl-<version>’.

  3. From the './acuity-toolkit-whl-<version>/bin' directory, select and install a Wheel package with the following commands:

    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
pip3 install tensorflow==2.10.0
pip3 install scipy
pip3 install networkx>=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
pip3 install tensorflow==2.12.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.2.3 ACUITY Toolkit 6.30.0
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

  1. Navigate to the './acuity-toolkit-whl-<version>/bin' directory.

  2. Execute the Python file. For example:

    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
  • No labels