5-Layer Architecture Overview

1

High-Level Frameworks

Developer-friendly interfaces where machine learning models are defined using familiar Python APIs and high-level abstractions.

Examples:
PyTorch (nn.Module), TensorFlow (Graph/Eager), JAX (NumPy-style)
2

Bridges & Frontends

Translation layers that convert framework-specific code into intermediate representations for cross-platform optimization.

Examples:
torch.compile, tf.function, jax.jit, torch_xla, tf2onnx
3

Intermediate Representations

Standardized formats that enable model portability and serve as common interfaces between different tools in the ecosystem.

Examples:
ONNX, StableHLO, MLIR, FX Graph
4

Compilers & Runtimes

Optimization engines that transform intermediate representations into efficient, hardware-specific executable code.

Examples:
TorchInductor, XLA, TVM, ONNX Runtime, TensorRT
5

Hardware Targets

Physical computing platforms where optimized model code executes, ranging from general-purpose processors to specialized AI accelerators.

Examples:
CPUs, GPUs, TPUs, Mobile NPUs, Apple Neural Engine