Poseidon: Profile-Guided Numerical Rewriting at Full-Application Scale
summary
Poseidon automatically extracts symbolic expressions from pre-optimized IR, uses a small surrogate profile to get per-instruction sensitivities, and composes algebraic rewrites (via Herbie) and mixed-precision/emulation candidates, scored by microbenchmarked costs and MPFR-based error checks, then selects Pareto-optimal rewrites with a DP solver. It runs inside the production compiler using LLVM passes (mem2reg, inlining) to see full-context subgraphs, handles a 5,000+ line LULESH proxy (200 loops) with nine algebraic rewrites to recover FP64 accuracy, and yields a 1.46× speedup at 1e-7 relative error.
AI-written summary · about
chapters (19)
- 0:00Poseidon framework intro
- 1:20Numerical software optimization challenges
- 3:12Structured critical value hypothesis
- 4:37Precision vs algebraic rewrites
- 6:04Scientific questions and Precimonious
- 7:26Profiling pass and runtime data
- 9:11Herbie integration for rewrites
- 10:58Evaluating rewrite candidates with DP solver
- 11:41Quaternion differentiator results
- 12:45Poseidon on DLE proxy app
- 14:10Accelerator code optimization challenges
- 15:16Poseidon’s accelerator extension
- 16:22Astronomy and chemistry results
- 17:48Summary and future
- 18:32Q&A: Posit comparisons
- 19:37Q&A: E-graph sequencing
- 20:39Q&A: Global solve necessity
- 21:24Q&A: First-order error limits
- 22:27Q&A: Overflow and underflow
related talks
15mScaling Optimization Over Uncertainty via Compilation
22mAlgorithm-Aware Hardware Optimization using E-Graph Rewriting: how should we marry(…)
19mMinotaur: A SIMD-Oriented Synthesizing Superoptimizer
16mCompiling Symbolic Execution with Staging and Algebraic Effects
14mPerformance Interfaces for Hardware Accelerators
29mPartially Evaluating Symbolic Interpreters for All
20mHEaaN.MLIR: An Optimizing Compiler for Fast Ring-Based Homomorphic Encryption
08mCompiling pattern matching to in-place modifications
