Setting up Axon

This page outlines the requirements that you need to fulfill before you start working with the Axon NPU using Axon API directly, without the abstraction layer of nRF Edge AI Library API.

Hardware requirements

Axon NPU library is included as part of the nRF Edge AI Library and provided as compiled binaries for Cortex-M33F architectures. Axon NPU is currently available on the nRF54LM20B device.

Software requirements

To start working with the Axon NPU, complete the setup based on your use case:

Setting up Axon TFlite Compiler

Before you can run the Axon NPU TFLITE compiler, you need to set up a Python environment with the required dependencies. The executor of the compiler is compatible with Python 3.11.

You can set up the Python environment using one of the methods below.

Using a virtual environment is strongly recommended to isolate dependencies. You can use any virtual environment tool you prefer. This section shows one example using Miniforge (Conda):

  1. Install Miniforge

  2. Ensure the Conda scripts directory is added to your system PATH, for example, C:/Users/<user>/AppData/Local/miniforge3/Scripts.

  3. Create a new environment with the supported Python version:

    conda create -n <env_name> python=3.11
    
  4. Activate the environment. All installation and execution commands must be run from the activated environment:

    conda activate <env_name>
    
  5. Install the required Python packages using the requirements.txt file:

    cd tools/axon/compiler/scripts
    pip install -r requirements.txt
    

Note

On macOS, you may encounter the ERROR: No matching distribution found for tensorflow==2.15.1 error. To fix it, install TensorFlow using Conda instead:

conda install -c conda-forge tensorflow=2.15.1

Once you complete the setup, you can try running the compiler by following instructions in Axon NPU TFLITE compiler.