TL;DR
This paper tackles the challenge of optimizing on-chip memory organization in chip multiprocessors (CMPs) by proposing both static and dynamic memory partitioning strategies. They leverage polyhedral algebra and integer linear programming to create application-specific memory architectures that significantly reduce energy consumption compared to traditional approaches.
What Problem Does This Paper Address?
Modern chip multiprocessors (CMPs) pack multiple processing cores onto a single chip, offering significant performance gains by reducing off-chip communication. However, this dense integration places immense pressure on the on-chip memory subsystem. Traditional memory architectures for CMPs fall into two main categories: shared memory, where all cores access a single memory pool (leading to bandwidth bottlenecks and contention), and private memory, where each core has its own dedicated memory (leading to potential data duplication and underutilization). The core problem this paper addresses is how to design an on-chip memory organization that balances the benefits of shared and private memory, adapting to the specific needs of an application and its varying data access patterns during execution, ultimately minimizing energy consumption.
Methods
The authors propose two main approaches:
- Application-Specific Static Design:
- Polyhedral Formulation: They use Presburger formulas and a polyhedral tool (Omega Library) to precisely model array accesses and data sharing patterns within loop nests. This allows them to estimate the amount of private and shared data for each processor.
- Memory Partitioning: Based on these estimations, they divide the on-chip memory into private and shared components. This involves allocating memory slices to processors and processor pairs.
- Integer Linear Programming (ILP): ILP is used to determine the optimal allocation of memory banks (groups of slices) to processors, aiming to minimize disparities between demanded and allocated memory.
- Dynamic Memory Partitioning:
- Program Phase Analysis: The application is divided into "phases" (typically loop nests). For each phase, the static approach is applied to determine an optimal memory configuration.
- Runtime Reconfiguration: The system dynamically reconfigures the on-chip memory (at a "bank" granularity) between program phases. This is managed by a "bank table" that is updated via special compiler-inserted instructions.
- Locality Optimization: An ILP-based approach is used to optimize memory bank assignments across phases to exploit inter-phase data reuse and further improve performance and energy efficiency.
Datasets
The paper evaluates their approach using a suite of eight data-intensive embedded applications: Atr, SP, Encr, Hyper, Wood, Usonic, Jpegview, and Srec. These benchmarks are described as having both array-based and pointer-based implementations, with the authors using the array-based versions for their experiments. No new benchmarks were introduced.
Key Insights and Ideas
- Polyhedral Algebra is Powerful for Memory Analysis: The paper demonstrates the effectiveness of polyhedral algebra and Presburger formulas in precisely quantifying data access and sharing patterns, which is crucial for informed memory partitioning.
- Hybrid Architectures Outperform Pure Approaches: Both static and dynamic hybrid memory architectures (combining private and shared components) consistently show significant improvements in energy efficiency over purely private or purely shared on-chip memory designs.
- Dynamic Reconfiguration is Key for Varying Workloads: For applications with changing data access patterns across different execution phases, dynamic memory partitioning offers substantial advantages over static configurations, adapting to the immediate needs of the program.
- Bank-Level Management is Practical: Managing memory at the "bank" level (a set of consecutive slices) is more practical than slice-level management for dynamic reconfiguration due to reduced complexity in area and interconnect.
- Inter-Phase Locality Matters: Explicitly optimizing memory assignments across program phases to preserve data locality can yield further significant improvements in both energy and execution time.
Key Results
- The proposed dynamic memory partitioning approach ("Application-Specific +") consistently achieved the best results in terms of memory energy consumption across all tested applications.
- Compared to a fixed "Application-Specific" design, the dynamic approach reduced memory energy consumption by approximately 10%.
- The dynamic approach improved upon pure private and pure shared memory cases by 13.1% and 11.5% respectively, on average.
- The effectiveness of the approach increased with a higher number of processors, as pure private memory suffered more from data duplication.
- The dynamic approach showed better scalability with an increasing number of processors compared to other schemes.
- Activating the locality optimization pass (Section 3.6) provided an additional ~6% improvement in both energy consumption and execution cycles on average.
Limitations and Future Work
- Limited Sharing in Static Design: The initial static approach primarily focused on banks shared by at most two processors. While they propose extensions for higher-order sharing, these were not fully automated.
- Heuristic Nature: Some results in the dynamic approach showed exceptions due to the heuristic nature of the proposed algorithms.
- Future Work:
- Extend the approach to handle multi-level memory hierarchies.
- Develop accompanying code restructuring techniques to further enhance memory energy savings.
- Port the simulation infrastructure to an FPGA-based platform for more realistic evaluation.
- Further explore higher-order data sharing (beyond pairs of processors) in the static design.
Summary updated