TL;DR
This paper introduces a novel VP virtualization technique that allows a single vector coprocessor (VP) to be shared among multiple threads simultaneously. This approach significantly boosts VP utilization and energy efficiency by dynamically allocating vector registers and enabling heterogeneous threads to run concurrently, achieving impressive speedups and energy savings.
What Problem Does This Paper Address?
Vector coprocessors (VPs) are specialized hardware units designed to accelerate data-level parallelism (DLP) by processing multiple data elements with a single instruction. However, in typical multicore systems, a VP is often dedicated to a single thread. This leads to underutilization for several reasons: applications have serial code sections, data dependencies can cause stalls, and it might be more efficient to run some applications on the scalar host to free up the VP for highly vectorized tasks. This underutilization results in wasted performance and energy. The paper addresses the challenge of efficiently sharing a VP among multiple threads, even those with varying vector lengths and computational needs, to maximize its performance and energy benefits.
Methods
The core innovation is a VP virtualization technique that enables Simultaneous Multithreading (SMT) for vector threads. This technique has two main components:
- Vector Register File (VRF) Virtualization: A novel algorithm dynamically allocates physical vector registers to threads. This creates a distinct, virtualized register name space for each thread, eliminating the need for programmers or compilers to manage register name conflicts statically. This is achieved through a Translation Lookup Table (TLT) that maps virtual register IDs to physical ones at runtime.
- Hardware Modifications: The VP architecture is augmented with a register management module (RMM) and a hardwired TLT. The RMM handles register allocation, deallocation, and splitting/merging to minimize fragmentation, while the TLT provides fast virtual-to-physical register ID translation.
The authors also implemented a throughput-oriented scheduler and incorporated power gating for enhanced energy efficiency. The system was prototyped on an FPGA, featuring a multicore architecture with multiple scalar cores (MicroBlaze) and a shared VP.
Datasets
The paper does not explicitly mention training datasets. For evaluation, the authors used a set of 15 benchmarks covering various applications:
- Matrix Multiplication (MM)
- Finite Impulse Response (FIR) digital filter
- Vector-Dot Product (VDP)
- Discrete Cosine Transform (DCT)
- RGB to YIQ color space mapping (RGB2YIQ)
These benchmarks were implemented using C with macro definitions for vector instructions, allowing for different vector lengths (VL=16, 32, 64) and varying numbers of threads.
Key Insights and Ideas
- Virtualization is Key to SMT for VPs: The paper demonstrates that a software-driven virtualization approach, particularly for VRF management, is crucial for enabling efficient SMT on VPs. This overcomes the limitations of static resource allocation and complex manual conflict resolution.
- Dynamic VRF Allocation Solves a Major Bottleneck: The ability to dynamically map virtual registers to physical ones, and to split/merge registers based on thread needs, is a significant advancement. It makes VP sharing more flexible and efficient, especially for threads with disparate vector lengths.
- Heterogeneous Threads Benefit Greatly: The approach allows simultaneous execution of threads with different vector lengths and computational characteristics, leading to higher overall VP utilization than previously possible.
- Scheduling and Power Gating Amplify Gains: The combination of SMT, a smart scheduler, and power gating creates a synergistic effect, maximizing performance and minimizing energy consumption.
Key Results
The benchmarking on an FPGA prototype yielded impressive results:
- Speedup: Up to 333% speedup was observed compared to a similar-sized system that allows VP access to only one thread at a time.
- Energy Savings: Up to 37% total energy savings were achieved with proper thread scheduling and power gating.
- VP Utilization: The proposed SMT approach significantly increased VP utilization, especially for benchmarks that previously showed low utilization (e.g., as low as 8.5% for a single thread).
- Scalability: The architecture scales well with an increasing number of threads, with average speedups approaching four for a queue length of eight.
- Fragmentation: The VRF management strategy effectively minimizes register fragmentation, with fragmentation impacting requests only with a 0.026% probability.
Limitations and Future Work
- Limitations:
- The current prototype supports up to four threads sharing a VP simultaneously.
- The paper focuses on homogeneous threads within a single application for some scheduling scenarios, though the core virtualization supports heterogeneous threads.
- The performance of the scheduler is evaluated for closed systems (fixed number of threads) and open systems (randomly arriving threads), but further exploration of complex task arrival patterns might be beneficial.
- Future Work:
- The authors suggest exploring throughput-oriented thread scheduling for both closed and open systems.
- Further investigation into the simultaneous execution of heterogeneous threads with different VLs arriving from different MBs is mentioned.
- The paper implies that the approach can be extended to more threads by linearly expanding TLT entries and arbitrator states.
Summary updated