Multi-Tier Memory Allocation System for HBM Optimization
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
High-performance computing systems face performance bottlenecks due to limited memory bandwidth, leading to memory read request queuing and stalls, which is exacerbated by the difficulty in identifying which data structures should be allocated in high-bandwidth memory (HBM) versus low-bandwidth memory (LBM) to optimize execution performance.
Innovation Solution
A memory allocation system that collects statistics on memory requests and bandwidth utilization during program execution to dynamically determine which data structures should be allocated in HBM, using compiler directives or a compiler adaptation to implement a memory allocation plan that prioritizes high memory utilization regions in HBM, allowing for real-time adjustments based on changing data characteristics.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If data structures are allocated in HBM to improve memory bandwidth utilization, then program execution performance is improved, but the difficulty of identifying candidate data structures increases
Solution Approach 1:
The system employs feedback mechanisms by monitoring runtime memory access patterns and using this information to dynamically identify and allocate data structures to HBM. The feedback loop collects statistics on memory bandwidth utilization and access frequencies, then uses this data to make informed allocation decisions, resolving the difficulty of identifying candidates through empirical observation rather than static analysis.
Solution Approach 2:
The system enables self-service by allowing the program itself to generate the necessary information for optimization. Through runtime instrumentation, the program automatically provides data about its own memory access patterns, eliminating the need for external expert analysis or complex static compilation processes to identify candidate data structures.
2Productivity
If compiler optimizations and hardware features are used to alter memory access patterns, then execution efficiency is improved, but the identification of memory allocation candidates becomes more complex
Solution Approach 1:
The system applies preliminary action by instrumenting the program during compilation to insert monitoring code that collects memory access statistics. This preliminary instrumentation is performed once during compilation, and then the runtime system uses the collected data to make allocation decisions, avoiding the need for complex real-time analysis of optimized memory access patterns.
Solution Approach 2:
The system introduces an intermediary layer between the compiler optimizations and the memory allocation decision-making process. This intermediary runtime system collects and processes memory access statistics, translating the effects of compiler optimizations and hardware features into actionable allocation information without requiring direct complex analysis of the optimized code paths.
3Speed
If HBM is used as cache memory in cache mode, then memory access speed is improved, but the flexibility in addressing different data access patterns is reduced
Solution Approach 1:
The system applies dynamics by transitioning from static memory allocation modes to dynamic runtime allocation. Instead of committing to cache mode or flat mode beforehand, the system monitors actual memory access patterns during program execution and dynamically decides which data structures should reside in HBM, adapting to changing access patterns and program phases.
Solution Approach 2:
The system changes the parameter of memory allocation configuration from fixed to variable. By using runtime-collected statistics on memory bandwidth utilization and access frequencies, the system adjusts which data structures are allocated to HBM based on actual program behavior, allowing optimal adaptation to different data access patterns without being constrained by a single allocation mode.
Data Source
AI summary
A system is provided for allocating memory for data of a program for execution by a computer system with a multi-tier memory that includes LBM and HBM. The system accesses a data structure map that maps data structures of the program to the memory addresses within an address space of the program to which the data structures are initially allocated. The system executes the program to collect statistics relating to memory requests and memory bandwidth utilization of the program. The system determines an extent to which each data structure is used by a high memory utilization portion of the program based on the data structure map and the collected statistics. The system generates a memory allocation plan that favors allocating data structures in HBM based on the extent to which the data structures are used by a high memory utilization portion of the program.


