A Holistic Approach to Automatic Mixed-Precision Code Generation and Tuning for Affine Programs
Jinchen Xu, Guanghui Song, Bei Zhou, Fei Li, Jiangwei Hao, Jie Zhao
Abstract
Reducing floating-point (FP) precision is used to trade the quality degradation of a numerical program's output for performance, but this optimization coincides with type casting, whose overhead is undisclosed until a mixed-precision code version is generated. This uncertainty enforces the decoupled implementation of mixed-precision code generation and autotuning in prior work. In this paper, we present a holistic approach called PrecTuner that consolidates the mixed-precision code generator and the autotuner by defining one parameter. This parameter is first initialized by some automatically sampled values and used to generate several code variants, with various loop transformations also taken into account. The generated code variants are next profiled to solve a performance model formulated using the aforementioned parameter, possibly under a pre-defined quality degradation budget. The best-performing value of the defined parameter is finally predicted without evaluating all code variants. Experimental results of the PolyBench benchmarks on CPU demonstrate that PrecTuner outperforms LuIs by 3.28× while achieving smaller errors, and we also validate its effectiveness in optimizing a real-life large-scale application. In addition, PrecTuner also obtains a mean speedup of 1.81× and 1.52×-1.73× over Pluto on single- and multi-core CPU, respectively, and 1.71× over PPCG on GPU.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Your agent calls
Lunesearch_papers
Free to start. No credit card required.
Terminal
Install the CLIlune papers get ea9c3f44-ce4f-46f3-811e-7cdef263cf3aCited by top-tier papers1
Ask how each one uses itRelated papers
- Predicting Performance and Accuracy of Mixed-Precision Programs for Precision TuningYutong Wang, Cindy Rubio-GonzálezICSE 2024 · 7 citations
- Cost of Soundness in Mixed-Precision TuningAnastasia Isychev, Debasmita LoharOOPSLA 2025 · 2 citations
- ApproxTuner: a compiler and runtime system for adaptive approximationsHashim Sharif, Yifan Zhao, Maria Kotsifakou, Akash Kothari et al.PPoPP 2021 · 22 citations
- Architecture-aware Precision Tuning with Multiple Number Representation SystemsDaniele Cattaneo, Michele Chiari, Nicola Fossati, Stefano Cherubin et al.DAC 2021 · 21 citations
- pLiner: isolating lines of floating-point code for compiler-induced variabilityHui Guo, Ignacio Laguna, Cindy Rubio-GonzálezSC 2020 · 15 citations
