Composable Library Compiler for HPC Memory Optimization
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
High-performance computing (HPC) applications face inefficiencies due to large temporary results from library function calls, leading to significant space overhead and suboptimal performance across library function boundaries, as traditional methods fail to effectively optimize sequence calls across individual library functions.
Innovation Solution
A composable library approach is introduced, where a library compiler generates binary code and metadata with abstractions that guide the application compiler to compose library functions without knowing their semantics, enabling loop merging, array contraction, and other optimizations to reduce memory usage and computation time.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of manufacture
If traditional library functions are called sequentially with immediate consumption of results, then the implementation is simple and straightforward, but significant space overhead occurs due to large temporary results arrays
Solution Approach 1:
The patent merges multiple library function calls into a single composed function that processes data in a single pass. Instead of calling separate functions that each allocate temporary arrays, the composed function combines their operations, eliminating the need for intermediate temporary storage and reducing overall memory usage.
Solution Approach 2:
The patent segments the composition process into multiple levels: algorithm-level abstractions, loop-level optimizations, and code-level implementations. This segmentation allows the system to manage complexity while achieving memory efficiency through coordinated optimizations across different abstraction layers.
2Ease of operation
If library functions are constructed as stand-alone binary code with defined interfaces, then the interface enables application compiler to call functions individually, but optimization across library function boundaries cannot be effectively achieved
Solution Approach 1:
The patent introduces an intermediary composition layer between the application compiler and library functions. This layer uses abstraction metadata to guide the composition of library functions, allowing optimizations across function boundaries while maintaining the original function interfaces and semantics for end users.
Solution Approach 2:
The patent implements dynamic composition where the system automatically generates optimized function compositions based on runtime or compile-time analysis of data access patterns and dependencies, adapting the optimization strategy to the specific computational context while preserving the static function interfaces.
3Ease of operation
If results of library function calls are consumed immediately by the next call, then the data flow is straightforward, but the temporary results arrays create significant space overhead
Solution Approach 1:
The patent performs preliminary analysis of the computation graph to identify opportunities for reusing intermediate results across multiple function calls. By pre-planning the data flow and reusing intermediates where possible, the system eliminates the need to create new temporary arrays for each function call, reducing overall memory consumption.
Solution Approach 2:
The patent implements a reuse mechanism where temporary arrays are not immediately discarded after a function call but are recovered and reused for subsequent computations when data dependencies allow. This extends the lifecycle of temporary storage, reducing the peak memory requirement while maintaining the simplicity of immediate consumption semantics.
Data Source
AI summary
Technologies for generating composable library functions include a first computing device that includes a library compiler configured to compile a composable library and second computing device that includes an application compiler configured to compose library functions of the composable library based on a plurality of abstractions written at different levels of abstractions. For example, the abstractions may include an algorithm abstraction at a high level, a blocked-algorithm abstraction at medium level, and a region-based code abstraction at a low level. Other embodiments are described and claimed herein.


