TI/AM62A

TIDL-TOOL 사용 가이드

728x90

EdgeAI TIDL Tools
TI SoC(예: AM62A, J784S4, TDA4VM 등)에서
딥러닝 모델을 **C7x DSP + MMA(DNN 가속기)**에서 실행할 수 있도록
모델을 컴파일, 양자화, 최적화, 배포하는 툴체인입니다.

쉽게 말하면:

PC에서 학습된 ONNX 모델을
TI SoC 내부 가속기에 맞게 “변환해서 실행 가능하게 만들어주는 컴파일러 + 런타임 시스템”

 

일반 ONNX 모델은:

  • float32 연산 기반
  • CPU 중심 실행

하지만 TI SoC 내부 가속기는:

  • INT8 기반 연산
  • 특수한 메모리 구조
  • 타일링/스케줄링 필요

👉 그래서 그냥 ONNX를 복사한다고 실행되지 않음
👉 반드시 TIDL로 “컴파일” 과정을 거쳐야 함

(1) 학습 모델 (ONNX)
        ↓
(2) PC에서 TIDL 컴파일
        ↓
(3) model-artifacts 생성
        ↓
(4) 보드에 복사
        ↓
(5) ONNXRuntime + TIDLExecutionProvider 실행
        ↓
(6) C7x DSP + MMA 가속 실행

테스트 환경

  • Ubuntu 22.04, python 3.10
  • SK-AM62A-LP
  • 11_01_07_05 Processor SDK
  • 11_01_06_00 TIDL-TOOL

아래 포럼 글에 의하면 11_01 버전 SDK는 11_01_06_00 사용하라고 함. 

 

실제로 11_01_07_00은 동작 중에 tidl_tool 다운이 안되는 증상이 있음.

 

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1588884/sk-am62-lp-tidl-tool-for-sdk11-1-am62a/6122038?tisearch=e2e-sitesearch&keymatch=TIDL%2011_01_07_00#

 

SK-AM62-LP: TIDL tool for SDK11.1 AM62A - Processors forum - Processors - TI E2E support forums

 

e2e.ti.com

PC 환경 준비

 

1. 필요 라이브러리 설치

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

 

2. TIDL Tools 다운로드

 
SDK 버전에 맞는 태그 확인:
git clone https://github.com/TexasInstruments/edgeai-tidl-tools.git
cd edgeai-tidl-tools
git checkout <TAG Compatible with your SDK version>

 

3. 설정 스크립트 적용

SOC 환경 변수 설정 (예: am62a, j784s4 등)
export SOC=<Your SOC name>
source ./setup.sh

*새 터미널을 열 때마다 설정 필요:

cd edgeai-tidl-tools
source ./setup_env.sh ${SOC}

 

 

모델 컴파일

예제 모델 컴파일:

source ./scripts/run_python_examples.sh -o

위 결과로 다음 산출물이 생성됩니다:

├── model-artifacts/ # 컴파일된 모델
├── models/ # 모델
├── output_images/ # 출력 이미지
├── output_binaries/ # 실행 바이너리
└── test_report_pc_${soc}.csv # 테스트 리포트

 

 

PC 환경에 onnxscript가 설치되어 있지 않으면 다음과 같은 에러가 발생합니다:

ModuleNotFoundError: No module named 'onnxscript'

하지만 위 모듈을 따로 설치해도 그에 연관된 모듈과 버전이 맞지 않아 에러가 발생한다.

의존성 제거를 위해 tvm_compilation_timm_example.py에서 torch.onnx.export(..., dynamo=False)로 고정

개발보드에서 테스트

개발 보드에 TIDL Tools 다운로드

SDK 버전에 맞는 태그 확인:
git clone https://github.com/TexasInstruments/edgeai-tidl-tools.git
cd edgeai-tidl-tools
git checkout <TAG Compatible with your SDK version>

산출물을 보드로 복사

PC → 보드

scp -r <pc>/edgeai-tidl-tools/model-artifacts/  <dev board>/edgeai-tidl-tool/
scp -r <pc>/edgeai-tidl-tools/models/  <dev board>/edgeai-tidl-tool/

Python 실행:

export SOC=<Your SOC name>
python3 ./examples/osrt_python/tidl_onnx_inference.py

리포트 생성:

python3 ./scripts/gen_test_report.py
 

참고 : 

https://github.com/TexasInstruments/edgeai-tidl-tools/tree/rel_11_01

 

GitHub - TexasInstruments/edgeai-tidl-tools: Edgeai TIDL Tools and Examples - This repository contains Tools and example develop

Edgeai TIDL Tools and Examples - This repository contains Tools and example developed for Deep learning runtime (DLRT) offering provided by TI’s edge AI solutions. - GitHub - TexasInstruments/edge...

github.com

 

728x90

'TI > AM62A' 카테고리의 다른 글

[11] AM62A - SDCard 이미지 만들기  (1) 2025.09.01
[11] AM62A-SK Processor SDK Build  (0) 2025.08.19
[AM62A] GPIO 제어  (1) 2024.07.13
[AM62A] Falcon Mode  (1) 2024.06.02
[09] AM62A-SK ROBOTICS SDK  (0) 2024.03.21