Graph Compilation & Operator Fusion: A modern AIR includes a compiler or graph optimizer. It fuses sequences of compatible ops into single kernels (e.g. combining Convolution+BatchNorm+ReLU) to reduce memory reads and kernel launch overhead. More advanced fusion frameworks (e.g. UOF – Unified Operator Fusion) even adaptively fuse ops across device types using a hardware-aware cost model. Such approaches have shown up to 3.8× end-to-end speedup for ResNet-50 inference when fusing on CPU, GPU, and NPU. The graph compiler also removes dead nodes, reorders operations for data locality, and generates platform-specific code (using MLIR, LLVM, etc.). In short, effective fusion and graph lowering is a key part of AIR’s performance.
Runtime Scheduling and Heterogeneous Compute: On device, AIR must schedule work across available compute units. This can mean splitting the network (partitioning) into subgraphs that run on different cores or chips. For example, parts of a model might run on the NPU while fallback ops run on CPU. Some edge-Cloud systems even split networks between device and cloud (“collaborative inference”): the device does a quick pass, and heavier processing is offloaded if needed. Scheduling frameworks (like HeteroSched, FlexFlow) consider computation vs. data transfer cost when assigning ops. The goal is to maximize parallelism and throughput while meeting real-time deadlines. Most AIRs today rely on either static schedules (decided at compile-time via delegates) or simple dynamic drivers (e.g. a loop over layers). Future AIRs may include more dynamic schedulers to handle bursty workloads.
Model Partitioning and Edge-Cloud Coordination: In some scenarios (e.g. very large models or privacy-sensitive tasks), AIR can support hybrid inference. A model may be partitioned so that early layers run on-device and later layers run in the cloud, or vice versa. This partitioning trades off latency vs. accuracy: the device can give an approximate answer quickly, and full inference can happen remotely if needed. Early work on “edge collaborative inference” shows how to split models across nodes or tiers to optimize latency. This is still an active area of research, but AIR designs may incorporate hooks for such distributed inference paths in the future.
In sum, AIRs use a toolbox of techniques – from quantized/sparse models and optimized architectures to graph compilers and multi-core scheduling – to fit “big” models into small devices with limited power. Each technique contributes: quantization/pruning shrink the model (size), fusion/compilation shrink execution time, and heterogeneous scheduling maximizes hardware usage.
Hardware Constraints and Target Devices
Edge devices vary widely in compute power, memory, and energy budget. AIR must adapt to this spectrum:
Microcontrollers (MCUs): Very limited memory (KB–MB), no OS. AI on MCUs (TinyML) handles only tiny models (voice keyword, anomaly detection). Frameworks like TensorFlow Lite Micro target this class. MCUs use fixed-point (no FPUs), so models must be extremely small (tens of KB of weights). Latencies are ~10–100ms per inference.
Mobile Devices: Modern smartphones and tablets are a primary AIR target. They have multi-core CPUs, GPUs, and often dedicated NPUs or DSPs. For instance, Qualcomm’s Snapdragon chips include Hexagon NPUs, and Apple’s A-series have a Neural Engine. These devices can run intermediate-sized models (tens to hundreds of MB) at tens of milliseconds latency. They also have moderate power (battery in range of 10–15 W). The typical workflow is to leverage NNAPI/Core ML to accelerate parts of the model on specialized units.
Embedded Linux Boards: Devices like Raspberry Pi, NVIDIA Jetson, Intel NUC, or automotive SoCs (NVIDIA Drive, Mobileye chips) have more horsepower. They may run full Ubuntu or ROS stacks. They can handle larger models (hundreds of MB) and even some lightweight training or batching. However, they often have thermal and power limits (e.g. 5–10 W for a Pi, 10–50 W for Jetson Xavier). AIR on these devices can be more flexible (supporting C++/Python, higher-level frameworks) but still needs optimization to meet real-time constraints.
Vehicles and Robotics: Autonomous vehicles have very strong real-time requirements (e.g. 10ms response) and use powerful embedded boards with GPUs/TPUs (NVIDIA Drive AGX, Intel Movidius, Tesla FSD chip, etc.). Airworthiness standards (ISO 26262) also impose rigorous software practices. Robotics may range from mobile robots (ROS on Jetson/NGC) to simple drones (MCUs or mobile SOCs). In all cases, AIR must cope with intermittent sensors, fast dynamics, and often temperature/vibration.
IoT Gateways and Edge Servers: While not “on-device” in the strict sense, small edge servers (like mini PCs or on-prem machines) form the high end of the edge spectrum. They have ample RAM (GBs) and multiple accelerators, but the AIR here can be a slimmed-down server inference engine focusing on many concurrent low-latency queries (e.g. smart-camera clusters).
Overall, AIR must be extremely portable across architectures. It may need different builds or delegate plugins for ARM (common in phones and embedded) vs. x86 (some gateways/PCs). It must run on Android and Linux (for mobile and robots) and ideally also support iOS (via Core ML integration). Because of these constraints, AIR is usually modular: a core runtime plus optional acceleration backends.
Benchmarks and Metrics for AIR
Evaluating AIR involves a combination of performance, efficiency, and accuracy metrics:
Latency and Throughput: The primary metrics are inference time (latency per query, often p90/p99) and throughput (inferences per second). Benchmarks like MLPerf Inference: Edge define specific test scenarios (Single-Stream, Multi-Stream, Offline) and measure how many inputs per second can be processed at a given quality target. For example, MLPerf uses models like ResNet-50 and BERT to compare systems. An AIR is judged by how low it drives latency (e.g. <30ms for real-time vision) and how high throughput it sustains under load.
Accuracy Retention: Any compression or optimization can degrade accuracy. Benchmarks require meeting a quality target (e.g. top-1 accuracy on ImageNet). Tools like MLPerf penalize solutions that drop below target. Thus, a good AIR must minimize the accuracy loss of quantization/pruning. In practice, we compare top-1/5 accuracy or F1 scores on standard datasets before and after conversion. For instance, as shown below, MobileBERT maintains ~90% F1 on SQuAD versus BERT’s 88%, despite being much smaller.
Power and Energy: MLPerf also includes power/energy measurements. For edge scenarios, one measures the system power draw during inference (at AC wall) and computes metrics like energy per inference or images/sec per watt. Lower energy per inference means longer battery life for mobile devices. For example, measuring the full device draw on Pixel 4 vs running MLPerf workloads would yield these stats. A good AIR aims to maximize energy efficiency (high inference rate with low power).
Memory Usage: Peak RAM usage and flash footprint are important. Benchmarks often report model size (MB), peak working memory, and CPU utilization. An AIR on a smartphone might be constrained to 1–2 GB RAM, so it must ensure the model and intermediate tensors fit. For embedded MCUs, metrics shift to KB of memory and binary size.
Quality-of-Service (QoS): In real applications, metrics like 99th percentile latency, jitter, and failure rate also matter. Some standards (e.g. for automotive) may impose real-time deadlines. We may measure QoS violations under load. These are domain-specific.
In summary, AIR is evaluated holistically: it must deliver target accuracy within tight latency and power budgets. Benchmark suites (MLPerf Edge) provide standardized comparisons, but many product teams also develop custom tests reflective of their use-case (e.g. 30fps object detection on UAV).