ExecuTorch Overview.

<aside> ✨

ExecuTorch = Executing Pytorch on the Edge

Pytorch 모델을 온디바이스(on-device)로 추론(inference) 가능하게 만드는 배포 솔루션

</aside>

Focus on..

Why ExecuTorch?

  1. 기존 pyTorch → Edge 복잡한 파이프라인을 단일화된 export → transform → execute 파이프라인으로 해결

    구분 기존 방식 (PyTorch Mobile) ExecuTorch
    Export 구조 PyTorch에서 export → TorchScript Graph → HW별로 수동 변환 단일화된 ExportedProgram (EXIR) → EdgeProgramManager가 각 delegate로 자동 분할 및 변환
    컴파일 방식 TorchScript (JIT-based) PyTorch 2 Export (AOT-based)
    런타임 Interpreter Native runtime
    그래프 생성 torch.jit.trace / torch.jit.script torch.export()
    메모리 Allocation JIT-based memory allocation AOT-based memory planning
    Overhead Runtime 1.5MB 40KB
  2. PyTorch Ecosystem의 활용

Core Functionalities.

source: https://www.youtube.com/watch?v=9U9MNbNcu-w

source: https://www.youtube.com/watch?v=9U9MNbNcu-w

1. Export

<aside> ✨

PyTorch Program → {Export} → ExecuTorch Graph

</aside>

2. AOT Compilation

<aside> ✨

ExecuTorch Graph → {Compile} → ExecuTorch Program

</aside>