NPX Tutorial:
Training Framework Xarvis

Hyunguk Jang and Kyuseung Han
ETRI, Daejeon, South Korea

v2025-12-06 or later

Overview

Xarvis is a neuromorphic training environment for RVX, based on snnTorch.
This tutorial walks you through the setup and execution process.

Prerequisite

Things to Know

Git, Make, and Python3

If you install Xarvis before RVX,
please follow the manual below to install Git, make, and python3.
Install - Git, make, and python3

Git Repository Cloning

cmd) git clone --recursive https://github.com/rvx-etri/npx-xarvis.git

Python3 Configuration for RVX

- Objective

Set the python3 command used in RVX.

- Check

cmd) cd #(cloned directory)
cmd) make check_python
cmd) make check_pip

- Instruction @ Linux

cmd) cd #(cloned directory)
cmd) make config_python
inst) Verify that ‘rvx_python_config.mh’ is generated.
inst) Open ‘rvx_python_config.mh’ in a text editor
> If no path is listed, manually enter the path to the executable.
> If more than one path is listed, keep only the one you intend to use and delete the others.

- Instruction @ Windows

cmd) cd #(cloned directory)
cmd) make config_python
inst) Verify that ‘rvx_python_config.mh’ and ‘python3.bat’ are generated.
inst) Do NOT modify ‘rvx_python_config.mh’
inst) Open ‘python3.bat’ in a text editor
> If no path is listed, manually enter the path to the executable.
> If more than one path is listed, keep only the one you intend to use and delete the others.
> Do NOT remove ‘%*’ at the end of the line.
> If the directory name contains spaces, enclose it in double quotation marks as shown below.
ex) C:\Users\‘‘Kyuseung Han’’\... %*

Installing snnTorch and Python Packages

cmd) cd #(cloned directory)
cmd) make preinstall
cmd) make install

Setting Up Bash Environment

- Instruction @ Linux

cmd) cd #(cloned directory)
cmd) make config
> Check that the file ./rvx_setup.sh has been created.
inst) Add the line source #(cloned directory)/rvx_setup.sh to your .bashrc.
> Be sure to replace #(cloned directory) with the absolute path before adding it.
inst) To apply the changes to .bashrc, close and reopen the terminal.
> Now, #(cloned directory) is registered as ${XARVIS_HOME}.

- Instruction @ Windows

cmd) cd #(cloned directory)
cmd) make config
inst) This command add the environment variable
inst) To apply the changes, close and reopen the terminal.
> Now, #(cloned directory) is registered as ${XARVIS_HOME}.

Run

- Checking Application Files

Xarvis uses text-based configuration files to define preprocessing steps, training parameters, and network structures.
These files are located in #(cloned directory)/npx_trainer/app.
An example configuration file is mnist_app.cfg.

Training an Example Application

cmd) cd #(cloned directory)/npx_trainer
cmd) make mnist_app

- Checking the Trained Results

The training results will be generated in #(cloned directory)/npx_trainer/result.

Navigate