# PROMISE: Floating-point Autotuning with Customized Precisions

Xinye Chen, Thibault Hilaire, Fabienne Jézéquel

► To cite this version:

Xinye Chen, Thibault Hilaire, Fabienne Jézéquel. PROMISE: Floating-point Autotuning with Customized Precisions. Workshop on Approximate Computing in Numerical Linear Algebra, Oct 2025, Paris, France. hal-05291790

HAL Id: hal-05291790

https://hal.science/hal-05291790v1

Submitted on 1 Oct 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# PROMISE: Floating-point Autotuning with Customized Precisions

Xinye Chen, Thibault Hilaire, Fabienne Jézéquel

Sorbonne Université, CNRS, LIP6, F-75005 Paris, France
xinye.chen@lip6.fr, thibault.hilaire@lip6.fr, fabienne.jezequel@lip6.fr

## PROMISE: Automated Precision Tuning

Achieving optimal performance in numerical computations often hinges on aggressively quantizing arithmetic and data to low-precision formats or rigorous rounding error analysis to retain numerical accuracy. The PROMISE (PRecision OptiMISE) software [1] provides a **task-specific validation** using CADNA<sup>a</sup> for automated precision tuning, enabling a balance between computational efficiency and numerical fidelity. Here, we advance PROMISE with **customized precision formats** to examine the low-precision potential in a suite of numerical algorithms for performance gains, offering actionable insights into selecting **optimal precision levels** for diverse algorithms. The extended PROMISE version is publicly available at

https://gitlab.lip6.fr/pequan/promise/-/tree/newfeat.

<sup>a</sup>https://cadna.lip6.fr/

## Improvements in PROMISE

### Customized Precision Emulation: Combination with FloatX

FloatX [2], a C++ header-only library, emulates custom reduced-precision floating-point formats with **user-defined exponent and significand bits**, enabling incremental code transformation (see Figure 1). Unlike GNU MPFR [3], which only sets total precision, FloatX uses hardware-supported native types with heavy inlining for efficiency, often outperforming MPFR in low-precision scenarios without extra storage overhead [2].

Integrating FloatX with PROMISE provides tailored reduced-precision floating-point support, allowing programmers to optimize applications efficiently **without the overhead of customized precision formats**. The new version retains the built-in FP16 type, implemented via an IEEE 754-based half-precision library<sup>a</sup>, for faster FP16 arithmetic compared to FloatX.

<figure><img src="image_2.png" /><figcaption>Figure 1: Customized reduced-precision format.</figcaption></figure>

To **emulate reduced-precision mathematical functions** for realistic effects, we use C++ function overloading to integrate FloatX into standard mathematical functions. This involves rounding inputs and outputs (detailed in Algorithm below) to enable efficient low-precision emulation for mathematical functions.

**Require:** $x_1, \dots, x_m$: input values; $f$: function $f: \mathbb{R}^m \to \mathbb{R}$; $(e, t)$: precision parameter.

1: **for** $i = 1: m$ **do**
2:     $\tilde{x}_i \leftarrow \text{round}(x_i, e, t)$
3:     **end for**
4: $y \leftarrow \text{round}(f(\tilde{x}_1, \tilde{x}_2, \dots, \tilde{x}_m), e, t)$
5:     **return** $y$

$\triangleright$ Round each input

$\triangleright$ Evaluate function $f$ with rounded inputs, and then round output

Algorithm 1: Emulation of reduced precision mathematical functions.

### Delta Debugging Workflow for Multiple Precisions

To optimize the precision configurations while maintaining a required accuracy, PROMISE leverages the CADNA library to control round-off errors and employs the Delta Debug algorithm to find suitable type configurations.

The program is first compiled into **instrumented code** to track floating-point operations. Executed with CADNA, it uses Discrete Stochastic Arithmetic [4] to **estimate exact significant digits** and **quantify numerical variability**. PROMISE then applies **delta debugging** to iteratively minimize the configuration space, identifying a **suitable set of operations requiring high precision** to ensure correctness while safely reducing precision elsewhere.

<figure><img src="image_3.png" /><figcaption>Figure 2: Two-precision search.</figcaption></figure>

<figure><img src="image_4.png" /><figcaption>Figure 3: Multi-precision search.</figcaption></figure>

The reduced-precision search is conducted **greedily**. Precisions are sorted by increasing unit roundoff. PROMISE then applies **delta debugging** iteratively to non-repetitive precision pairs (e.g., for half, single, and double precisions, it first tests single and double, then half and single). A single precision pair search uses thorough delta debugging (Figure 2), while a multi-precision search (e.g., FP64, FP32, FP16, E4M3) involves multiple iterative steps of the single-pair process (Figure 3).

## Conclusion

We present a more flexible and practical PROMISE version for customized precision tuning as well as reduced-precision emulation for mathematical functions. Our empirical results on selected tests from the Rodinia benchmark demonstrate the potential, in science and engineering, for using low-precision settings taking into account a required accuracy.

## Precision tuning on the Rodinia benchmark suite

### Precision Search with Varying Significant Digits in the Result

We ran PROMISE in four precision settings to exploit potential mixed-precision combinations: (I) E4M3 - FP16 - FP32 - FP64; (II) E5M2 - FP16 - FP32 - FP64; (III) E4M3 - BF16 - FP32 - FP64; (IV) E5M2 - BF16 - FP32 - FP64. All tests were performed in single thread on a DELL PowerEdge R750xa server with 2 TB of memory, equipped with two Intel Xeon Gold 6330 processors, featuring at 2.00 GHz. For various programs from the Rodinia benchmark [5], in the following, we present the resulting precision configurations taking into account the required accuracy, we also show the runtime of PROMISE.

<figure><img src="image_5.png" /><figcaption>Figure 4: Back Propagation (Output of neural network).</figcaption></figure>

<figure><img src="image_6.png" /><figcaption>Figure 5: HotSpot (the temperature values of a grid after a transient thermal simulation).</figcaption></figure>

<figure><img src="image_7.png" /><figcaption>Figure 6: ParticleFilter (the x-coordinates of particles after filtering).</figcaption></figure>

## Discussion

In Figure 4 (IV), achieving seven or more digits of accuracy is not possible with any configuration. However, four to six digits can be achieved using six FP64, six FP32, and four E5M2 variables. For low accuracy (e.g., one digit), eight E5M2 variables can be used. Thanks to its exponent range, including BF16 for the precision search by PROMISE often increases the lower precision part in the resulting precision configurations compared to FP16. Besides, for the runtime, the increasing portion of low precision types defined by FloatX triggers **little extra runtime**, while we cannot observe significant slow down by the FP16 precision from the IEEE half precision library. The cost of PROMISE is largely attributed to a deeper search to lower precision by delta debugging. The full results as well as the test code for the benchmarking are publicly available at https://github.com/PEQUAN/hpc-mix-mlbench.

Supported by France 2030 NumPEx Exa-MA project (ANR-22-EXNU-0002) managed by French National Research Agency (ANR).

## References

[1] S. Graillat, F. Jézéquel, R. Picot, F. Févotte, and B. Lathuilière, “Auto-tuning for floating-point precision with Discrete Stochastic Arithmetic,” *Journal of Computational Science*, vol. 36, p. 101017, 2019.
[2] G. Flegar, F. Scheidegger, V. Novaković, G. Mariani, A. E. Tomás, A. C. I. Malossi, and E. S. Quintana-Ortí, “FloatX: A C++ library for customized floating-point arithmetic,” *ACM Trans. Math. Softw.*, vol. 45, no. 4, 2019.
[3] L. Fousse, G. Hanrot, V. Lefèvre, P. Pélissier, and P. Zimmermann, “MPFR: A multiple-precision binary floating-point library with correct rounding,” vol. 33, no. 2, pp. 13–es, 2007.
[4] J. Vignes, “Discrete Stochastic Arithmetic for Validating Results of Numerical Software,” *Numerical Algorithms*, vol. 37, no. 1, pp. 377–390, 2004.
[5] S. Che, M. Boyer, J. Meng, D. Tarjan, J. W. Sheaffer, S.-H. Lee, and K. Skadron, “Rodinia: A benchmark suite for heterogeneous computing,” in *IEEE International Symp. on Workload Characterization*, 2009, pp. 44–54.