1.1. Installation Instructions

This section describes how to set up TI TVM on a host machine for model compilation and on a target EVM for inference.

1.1.1. Prerequisites

Host machine (x86_64):

  • Ubuntu 22.04 LTS

  • Python 3.10 (virtual environment recommended)

  • At least 16 GB RAM and 20 GB free disk space

  • System packages:

    sudo apt-get install libyaml-cpp-dev libglib2.0-dev python-setuptools
    

Target EVM (AArch64):

  • SD card with Linux file system from appropriate TI Processor Linux SDK installed

1.1.2. Supported Devices

Device Family

SOC Variable

C7™ NPU Acceleration

J721S2 / TDA4VL

J721S2 or TDA4VL

Yes

J784S4 / TDA4VH

J784S4 or TDA4VH

Yes

J722S / TDA4AEN / AM67A

J722S or TDA4AEN or AM67A

Yes

AM62A

AM62A

Yes

AM62

AM62

No

1.1.3. Processor SDK Versions

TI TVM 0.18.0 is released as part of the following Processor SDK versions:

Device Family

Processor SDK RTOS

Processor SDK Linux

J721E / TDA4VM

11.02.00.06

11.02.00.04

J721S2 / AM68A

11.02.00.06

11.02.00.04

J784S4 / AM69A

11.02.00.06

11.02.00.04

J722S / AM62A / AM62

N/A

N/A

1.1.4. Host Installation (Compilation)

The recommended way to install TI TVM is via the edgeai-tidl-tools repository. The setup script installs TVM, TIDL tools, and all required Python dependencies in a single step.

1.1.4.1. Clone edgeai-tidl-tools

Clone the repository and check out the tag that matches your SDK version:

git clone https://github.com/TexasInstruments/edgeai-tidl-tools.git
cd edgeai-tidl-tools
git checkout <tag>   # e.g. 11_02_04_00 — see repository tags for your SDK version

1.1.4.2. Run the setup script

Note

A Python 3.10 virtual environment is recommended before running the setup script.

./scripts/setup/setup.sh

The setup script installs the following:

Component

Version / Notes

TVM Python wheel

0.18.0 (x86_64, Ubuntu 22.04, Python 3.10)

ONNX Runtime Python wheel

1.15.0 (TI build with TIDL execution provider)

TFLite Runtime Python wheel

2.12.0 (TI build)

TIDL Runtime Python wheel

0.1.0

TIDL tools

Per-SOC libraries downloaded from software-dl.ti.com

AArch64 GCC toolchain

arm-gnu-toolchain 13.2.Rel1 (for cross-compilation)

C7x compiler (CGT)

ti-cgt-c7000 5.0.0.LTS (required for c7x_codegen=1)

C++ runtime dependencies

ONNX Runtime, TFLite, and TVM C++ headers/libraries

Example models and inputs

Out-of-box data for edgeai-tidl-tools examples

1.1.4.3. Set environment variables

Source the environment setup script with your target SoC:

source ./scripts/setup/setup_env.sh <SOC>   # e.g. J721E, J784S4, AM62A

This sets SOC, TIDL_TOOLS_PATH, ARM64_GCC_PATH, and CGT7X_ROOT automatically. See the table below for the full list of variables.

Variable

Description

SOC

Target SoC identifier (see Supported Devices above)

TIDL_TOOLS_PATH

Path to TIDL libraries (required for TIDL offload)

ARM64_GCC_PATH

Path to AArch64 GCC toolchain (required when compile_for_device=1)

CGT7X_ROOT

Path to C7000 Code Generation Tools (required when c7x_codegen=1)

1.1.4.4. Verify the installation

python3 -c "import tvm; print(tvm.__version__)"

Expected output: 0.18.0

1.1.5. Target Installation (Inference)

All dependencies required to run TVM inference are included in the Linux filesystem packaged with the Processor SDK.

Note

Processor SDK 11.2 only: Two Python packages required by the TVM runtime (psutil and typing_extensions) are missing from this release due to a known issue. Install them manually on the EVM:

pip3 install psutil typing_extensions

This will be resolved in the next SDK release.