Abstract
Modern AI accelerators are shifting toward inter-core connected architectures to support massive workloads like Large Language Models (LLMs). However, existing virtualization techniques often fail to account for the specific hardware topologies of these "data flow" Neural Processing Units (NPUs), leading to significant resource underutilization and memory bottlenecks. This paper introduces vNPU, a comprehensive virtualization framework designed to preserve hardware topology benefits while enabling multi-tenancy. By implementing virtualized network-on-chip routing and range-based memory translation, vNPU achieves up to a 1.92x performance improvement over standard partitioning methods with negligible hardware overhead.
1. Introduction
As AI models scale in complexity, hardware manufacturers have transitioned from monolithic GPU designs to inter-core connected NPUs, such as those from Graphcore and Tenstorrent. These architectures utilize a "data flow" approach where cores are physically interconnected, allowing data to move directly between processing elements and bypassing the latency of external memory.
Despite these advantages, virtualizing such systems remains a challenge. Current industry standards, such as NVIDIA’s Multi-Instance GPU (MIG), rely on rigid, fixed partitions. These methods do not consider the spatial "shape" or topology required by specific models, resulting in "Topology Lock-in"—where available resources cannot be utilized because they do not match a predefined grid—and memory translation stalls caused by traditional page-table mechanisms.
2. The vNPU Framework
To address these limitations, vNPU introduces three primary architectural innovations designed to turn a physical NPU into multiple isolated virtual instances.
2.1 vRouter: Network-on-Chip Virtualization
The vRouter module virtualizes the Network-on-Chip (NoC) by intercepting data and instructions. It utilizes a Routing Table (RT) to map virtual core IDs to physical ones. This ensures that communication between cores within a single virtual machine remains isolated, preventing data leakage or interference between tenants sharing the same physical chip.
2.2 vChunk: Range-Based Memory Virtualization
Traditional virtualization uses 4KB page tables, which are ill-suited for NPUs that move large data chunks via DMA. Frequent "TLB misses" in such systems can stall the entire execution pipeline. vNPU replaces fine-grained page tables with Range Translation Tables (RTT). By exploiting the monotonic and iterative nature of NPU memory access, vChunk minimizes translation overhead and aligns virtualization with the way NPUs naturally handle large tensors as contiguous blocks.
2.3 Best-effort Topology Mapping
When a tenant requests a specific NPU configuration (e.g., a 3x3 grid), the vNPU hypervisor employs a Graph Edit Distance algorithm. This algorithm searches for the best available physical core arrangement. If an exact match is unavailable, it identifies the "closest" possible shape to minimize communication latency, thereby maximizing chip utilization and preventing resource wastage.
3. Evaluation and Results
The authors evaluated vNPU using a diverse suite of models, including Vision (ResNet, MobileNet, YOLO-lite), Language (GPT-2 variants), and Recommendation (DLRM) systems. The evaluation utilized a hardware prototype built with Chipyard and FireSim for micro-benchmarks, alongside the DCRA simulator for large-scale scenarios.
3.1 Performance Gains
vNPU demonstrated significant performance improvements in multi-tenant environments:
- Transformers: 1.92x speedup compared to MIG-style partitioning.
- ResNet: 1.28x speedup.
- Interference Mitigation: While traditional Unified Virtual Memory (UVM) approaches saw a 24% performance degradation due to memory contention, vNPU maintained negligible interference through its dedicated inter-core communication virtualization.
3.2 Efficiency and Overhead
The hardware extensions required for vNPU are remarkably lightweight. The framework incurs less than a 1% reduction in end-to-end performance and requires only approximately 2% additional FPGA resources (LUTs and FFs). Furthermore, vChunk reduced memory translation overhead from approximately 20% in page-based systems to under 4.3%.
4. Discussion and Future Work
While vNPU represents a significant step forward, certain challenges remain. For workloads with non-linear memory access patterns, such as Graph Neural Networks (GNNs), range-based translation may be less effective, potentially requiring a hybrid approach with traditional page-level translation. Additionally, the authors identified "topology fragmentation" as a long-term risk, where scattered core availability might eventually degrade performance, suggesting a need for live vNPU "defragmentation" strategies in future research.
5. Conclusion
vNPU provides the first robust virtualization layer for inter-core connected NPUs. By moving away from rigid partitioning and embracing topology-aware mapping and range-based memory management, it unlocks the full potential of spatial sharing in modern AI hardware, ensuring high utilization and performance for diverse multi-tenant workloads.
Summary updated