Matrix Triangulation Tile Optimization
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing matrix triangulation algorithms lack portability across different processor architectures and memory hierarchies, requiring labor-intensive hand-optimization or expensive, domain-specific compilers, and custom hardware is not cost-effective for widespread use.
Innovation Solution
The method involves generating tile functions for matrix triangulation, profiling them for optimal composition and performance on a target architecture, and using a two-dimensional dynamic programming algorithm to determine the optimal sequence of tile function invocations, enabling self-optimizing software libraries that adapt to various architectures and cache layouts.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If hand-optimization is performed for a specific architecture, then performance is improved, but labor intensity and lack of portability increase
Solution Approach 1:
The patent segments the matrix triangulation algorithm into multiple tile functions with different tile sizes. Each tile function processes a specific tile configuration, allowing the system to measure and compare performance of different segments without manually optimizing the entire algorithm for each architecture.
Solution Approach 2:
The system automatically measures cost data for different tile functions on the target architecture and uses dynamic programming to select the optimal composition. This self-optimizing approach eliminates manual hand-optimization while maintaining portability across different processor architectures.
2Productivity
If sophisticated compilers with architecture modeling are used, then optimization capability is improved, but cost and complexity increase
Solution Approach 1:
The patent introduces an intermediary measurement and selection system that sits between the standard compiler and the target architecture. Instead of requiring sophisticated architecture modeling within the compiler, the system measures actual cost data on the target architecture and uses dynamic programming to bridge the gap between generic code and optimized performance.
Solution Approach 2:
The system changes the approach from modifying compiler parameters and architecture models to measuring actual execution costs and dynamically selecting the optimal tile function composition based on measured performance data, thereby achieving optimization without complex compilation systems.
3Productivity
If custom hardware is designed for matrix triangulation, then performance is improved, but cost and justification difficulty increase
Solution Approach 1:
Instead of designing custom hardware, the patent creates multiple software copies of the matrix triangulation algorithm with different tile configurations. The system measures and selects the optimal software copy for the given architecture, achieving hardware-like performance through optimized software without the cost and complexity of custom hardware design.
4Productivity
If software is re-optimized for each platform change, then performance is maintained, but time and effort increase
Solution Approach 1:
The patent performs preliminary measurements of cost data for all tile functions on the target architecture during the initial compilation or first execution. This preliminary action creates a performance profile that can be reused for different problem sizes, eliminating the need for re-optimization when the platform changes.
Solution Approach 2:
The system creates a universal optimization framework that works across different processor architectures and problem sizes. By measuring cost data and using dynamic programming to select optimal tile compositions, the same software library can adapt to various platforms without requiring separate hand-optimized versions for each architecture.
Data Source
AI summary
Method, apparatus, and computer readable medium for producing an optimized matrix triangulation algorithm is described. In one example, tile functions are generated for a matrix triangulation problem. Cost data is measured for the tile functions with respect to a target architecture. The cost data is processed to identify optimal composition of tiles for rows in an iteration space of the matrix triangulation problem. The optimal compositions of tiles are processed to identify optimal composition of rows for triangles in the iteration space. A sequence of tile function invocation based on the optimal compositions of tiles and the optimal compositions of rows is generated.


