LibraryX: A Framework for Cross-Library-Call Optimization
Developing scientific computing applications that are both maintainable and achieve good performance is a challenging task. At the software level, software design principles in crease productivity but obfuscate the ability to easily discover performance opportunities. This is exacerbated by the complexity of modern hardware systems, which require deep hardware knowledge to achieve good performance. This leaves application developers with two main options for performance critical operations, use domain specific software libraries to write their applications, or ask a performance expert to optimize their application. The library approach has the benefit of providing usability with good performance, but leaves performance on the table, as there are opportunities to optimize across the library call boundary. Unfortunately, a compiler cannot easily find these because library calls are treated as black boxes. A performance expert can provide the best performance, but has to write specialized code removing the library calls and any usability.
To address the gap between writing productive software and achieving optimized performance, this thesis introduces LibraryX, a framework for cross-library-call optimization. Using LibraryX scientific applications can be written using standard domain specific li braries which will be replaced with an optimized implementation during execution with out source code modification. This is done through a combination of library call semantic capture, optimized code generation, and runtime compilation. LibraryX is able to recognize the semantics of library calls or what operation the library call is performing. The computation semantics is then sent to the SPIRAL code generation system for analysis and optimization, producing an optimized implementation. This implementation is then executed in place of the original library call sequence.
We showcase the high level design of the LibraryX framework, specifically showing how it can be used for a few key domains within scientific computing. These domains include spectral methods, graph analytics/sparse linear algebra, and structured grids. We demonstrate how LibraryX uses various library capture mechanisms for each domain and how the SPIRAL code generation system can optimize specific library call sequences for each domain. This enables LibraryX to cross not only the library call boundary, but also the library domain boundary, allowing developers to use different domain libraries simultaneously. We then showcase how LibraryX can be extended to support multi-accelerator systems by plugging into a runtime system called IRIS. We finally show how LibraryX
can be extended to support legacy applications written in Fortran and act as a hardware accelerator offloading system.
History
Date
2025-05-02Degree Type
- Dissertation
Thesis Department
- Electrical and Computer Engineering
Degree Name
- Doctor of Philosophy (PhD)