Manual Installation#

The main Installation Instructions page shows a one-step installation process that checks the prerequisite and installs Vitis AI ONNX quantizer, ONNX Runtime, and Vitis AI execution provider.

This page explains how to install each component manually.

Note

Make sure to follow the installation steps in the order explained below.

Perform a Default Installation#

Download the ryzenai-1.2.0.msi installer.

Install the RyzenAI Software using the default settings.

This will copy in the C:Program Files\RyzenAI\1.2.0 folder all the files required for a manual installation.

Create a Conda Environment#

The Ryzen AI Software requires using a conda environment (Anaconda or Miniconda) for the installation process.

Start a conda prompt. In the conda prompt, create and activate an environment for the rest of the installation process.

conda create --name <name> python=3.10
conda activate <name>

Set Environment Variables#

Configure the environment variables to be automatically set upon activation of the conda environment.

First, create a directory for the activation scripts:

mkdir %CONDA_PREFIX%\etc\conda\activate.d

Create script to load RYZEN_AI_INSTALLER_PATH environment. This script will be executed every time the conda environment is activated.

notepad %CONDA_PREFIX\etc\conda\activate.d\load_ryzenai_installer_path.bat

Add the following line to the script:

set "RYZEN_AI_INSTALLER_PATH=%RYZEN_AI_INSTALLER_PATH%"

Set the XLNX_VART_FIRMWARE environment variable based on your APU type:

For STX APUs:

set XLNX_VART_FIRMWARE=%RYZEN_AI_INSTALLATION_PATH%/voe-4.0-win_amd64/xclbins/strix/AMD_AIE2P_Nx4_Overlay.xclbin

For PHX/HPT APUls:

set XLNX_VART_FIRMWARE=%RYZEN_AI_INSTALLATION_PATH%/voe-4.0-win_amd64/xclbins/phoenix/1x4.xclbin

Install the Vitis AI Quantizer#

The Vitis AI Quantizer for ONNX supports a post-training quantization method that works on models saved in the ONNX format.

Install the Vitis AI Quantizer for ONNX as follows:

cd %RYZEN_AI_INSTALLATION_PATH%
pip install vai_q_onnx-1.16.0+69bc4f2-py2.py3-none-any.whl

To install other quantization tools (Vitis AI PyTorch/TensorFlow 2/TensorFlow Quantization or Olive Quantization), refer to the Other Quantizers page.

Install the ONNX Runtime#

pip install onnxruntime

Install the Vitis AI Execution Provider#

cd %RYZEN_AI_INSTALLATION_PATH%/voe-4.0-win_amd64
pip install voe-0.1.0-cp39-cp39-win_amd64.whl
pip install onnxruntime_vitisai-1.15.1-cp39-cp39-win_amd64.whl
python installer.py

Optional: Install the AI Analyzer#

cd %RYZEN_AI_INSTALLATION_PATH%/voe-4.0-win_amd64
pip install aianalyzer-1.2.0.dev202407022336+g2f0e1b-py3-none-any.whl

Runtime Setup#

Set the following environment variable in the conda environment created above:

For STX: (default)

set XLNX_VART_FIRMWARE=%RYZEN_AI_INSTALLATION_PATH%\voe-4.0-win_amd64\xclbins\strix\AMD_AIE2P_Nx4_Overlay.xclbin

For PHX/HPT:

set XLNX_VART_FIRMWARE=%RYZEN_AI_INSTALLATION_PATH%\voe-4.0-win_amd64\xclbins\phoenix\1x4.xclbin

The *.xclbin files are located in the voe-4.0-win_amd64\xclbins folder of the Ryzen AI Software installation package. For detailed information and other available options refer to the Runtime Setup page.

Test the Installation#

The Ryzen AI Software installation folder contains a test to verify that the Ryzen AI software is correctly installed. Instructions on how to run this test can be found here.