Thinking Fast and Correct: Automated Rewriting of Numerical Code through Compiler Augmentation
Floating-point numbers are finite-precision approximations to real numbers and are ubiquitous in computer applications in nearly every field. Selecting the right floating-point representation that balances performance and numerical accuracy is a difficult task – one that has become even more critical as hardware trends toward high-performance, low-precision operations. Although the common wisdom around changing floating-point precision implies that accuracy and performance are inversely correlated, more advanced techniques can often circumvent this tradeoff. Applying complex numerical optimizations to real-world code, however, is an arduous engineering task that requires expertise in numerical analysis and performance engineering, and application-specific numerical context. While there is a plethora of existing tools that partially automate this process, they are limited in the scope of optimization techniques or still require substantial human intervention.
We present Poseidon, a modular and extensible framework that fully automates floating-point optimizations for real-world applications within a production compiler. Our key insight is that a small surrogate profile often reveals sufficient numerical context to drive effective rewrites. Poseidon operates as a two-phase compiler: the first compilation instruments the program to capture numerical context; the second compilation consumes profiled data, generates and evaluates candidate rewrites, and solves for optimal performance/accuracy tradeoffs. Poseidon's interoperability with standard compiler analyses and optimizations grants it analysis and optimization advantages unavailable to existing source- and binary-level approaches. On multiple large-scale applications, Poseidon leads to outsized benefits in performance without substantially changing accuracy, and outsized accuracy benefits without diminishing performance. On a quaternion differentiator, Poseidon enables a $1.46\times$ speedup with a relative error of $10^{-7}$. On DOE's LULESH hydrodynamics application, Poseidon improves program accuracy to exactly match a 512-bit simulation run without substantially reducing performance.
Tue 3 FebDisplayed time zone: Hobart change
14:10 - 15:30 | |||
14:10 20mTalk | PIP: Making Andersen’s Points-to Analysis Sound and Practical for Incomplete C Programs Main Conference Håvard Rognebakke Krogstie NTNU, Helge Bahmann Independent Researcher, Magnus Själander Norwegian University of Science and Technology (NTNU), Nico Reissmann Independent Researcher Pre-print Media Attached | ||
14:30 20mTalk | Thinking Fast and Correct: Automated Rewriting of Numerical Code through Compiler Augmentation Main Conference Siyuan Brant Qian University of Illinois at Urbana-Champaign, Vimarsh Sathia University of Illinois Urbana Champaign, Ivan Ivanov Institute of Science Tokyo, Jan Hueckelheim Argonne National Laboratory, Paul Hovland Argonne National Laboratory, William S. Moses University of Illinois Urbana-Champaign Pre-print Media Attached | ||
14:50 20mTalk | PolyUFC: Polyhedral Compilation Meets Roofline Analysis for Uncore Frequency Capping Main Conference Nilesh Rajendra Shah Indian Institute of Technology Hyderabad, India, M V V S Manoj Kumar IIT Hyderabad, Dhairya Baxi IIT Hyderabad, Ramakrishna Upadrasta IIT Hyderabad Pre-print | ||
15:10 20mTalk | Accelerating App Recompilation across Android System Updates by Code Reusing Main Conference Hongtao Wu Wuhan University, Yu Chen Wuhan University, Mengfei Xie Wuhan University, Futeng Yang Guangdong OPPO Mobile Telecommunications, Jun Yan Guangdong OPPO Mobile Telecommunications, Jiang Ma OPPO Electronics Corp., Jianming Fu Wuhan University, Jason Xue MBZUAI, Qingan Li Wuhan University, China Pre-print | ||