# Using Floating Point Compression to increase H-Matrices performance

Clément Peaucelle, Emmanuel Agullo, Guillaume Sylvand

► To cite this version:

Clément Peaucelle, Emmanuel Agullo, Guillaume Sylvand. Using Floating Point Compression to increase H-Matrices performance. COMPAS 2025 - Conférence francophone d'informatique en Paral-lélisme, Architecture et Système, Jun 2025, Bordeaux, France. hal-05186849

HAL Id: hal-05186849

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

Submitted on 25 Jul 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
Using Floating Point Compression to increase
# H-Matrices performance

Clément Peaucelle, with Emmanuel Agullo and Guillaume Sylvand

Airbus, Centre INRIA de l'Université de Bordeaux

COMPAS - June 2025

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

AIRBUS

CERFACS

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

concace

<figure><img src="image_4.png" /></figure>
What we achieved :

Divided by 5 the size in memory of our *H*-Matrices

→ with a controlled precision!

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

<figure><img src="image_6.png" /></figure>
**Low Rank Compression**

Used in *H*-Matrices Algebra, Machine Learning, Image compression

[C. Eckart, G. Young, 1936]

**Floating Point Compression**

Used in HPC, scientific computing, Data Science

ZFP [P. Lindstrom, 2014], SZ [X. Liang, S. Di, D. Tao, Z. Chen, F. Cappello, 2018]

**Low Rank + FP compression**

Use of both types of compression in *H*-Matrices

[R. Kriemann, 2023 & 2024]
**Low Rank Compression**

Used in $H$-Matrices Algebra, Machine Learning, Image compression

[C. Eckart, G. Young, 1936]

**Floating Point Compression**

Used in HPC, scientific computing, Data Science

ZFP [P. Lindstrom, 2014], SZ [X. Liang, S. Di, D. Tao, Z. Chen, F. Cappello, 2018]

**Low Rank + Adaptive FP Compression**

Use of both types of compression in $H$-Matrices with **adaptive** FP compression
Modelisation tools based on the simulation of electromagnetic and acoustic wave propagation. Some examples:

* Antenna positioning (Electromagnetic)

* Electromagnetic compatibility (Electromagnetic)

* Radar stealth (Electromagnetic)

* Modelisation of civil aircraft engine noise (Acoustic)

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

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

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

<figure><img src="image_10.png" /></figure>
Way of storing and computing Interaction Matrices.

* Hierarchical decomposition of the object (binary tree): at each level of the tree, we treat information between well-separated domains → Matrix by blocks

* Well separated domains yields low ranks blocks.

<figure><img src="image_11.png" /><figcaption>Decomposition of the object and its resulting tree</figcaption></figure>
# H-Matrices: Advantages and memory limitations

Using this idea, we can **compress these low rank blocks** (Low Rank Approximation) to save space with controlled accuracy.

* **Dense representation** of the matrix

* Allows several types of **factorization**

* Whole **Algebra** to manipulate matrices **in that format** [B. Lizé, 2014]

→ **Direct solver** in $O(N \log N)$ (Time and Memory) for $N$ unknowns instead of $O(N^3)$ and $O(N^2)$.

**BUT** limited in problem size ($N = 10^7$ variables), on **memory and bandwidth**.

<figure><img src="image_12.png" /><figcaption>Structure by blocks of the H-Matrix</figcaption></figure>

<figure><img src="image_13.png" /><figcaption>Low Rank Approximation</figcaption></figure>

<figure><img src="image_14.png" /></figure>
Most of the blocks in a *H*-Matrix are Low Rank Blocks and stored as a Low Rank Approximation of precision $\varepsilon_{LR}$:

$$M \approx A \cdot B^T$$

with

$$\frac{\|M - A \cdot B^T\|_F}{\|M\|_F} \le \varepsilon_{LR}$$

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

Low Rank Approximation

We applied a FP compression (of precision $\varepsilon_{FP}$) on both panels to reduce their size in memory, with an error that can be controlled to be the same order than the Low Rank approximation.
<figure><img src="image_16.png" /></figure>

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

<figure><img src="image_18.png" /></figure>
<figure><img src="image_19.png" /></figure>

<figure><img src="image_20.png" /></figure>
<figure><img src="image_21.png" /></figure>
Each panel is partitioned into $p$ blocks of columns, and we choose a certain $\varepsilon_i$ as the FP compression precision for each pair $(A_i, B_i)$:

By choosing

$$ \varepsilon_i = \frac{\|A \cdot B^T\|_F}{\sqrt{p} \|A_i \cdot B_i^T\|_F} \varepsilon_{FP} $$

then we have:

$$ \varepsilon_{out} \le \varepsilon_{FP} $$

where $\varepsilon_{FP}$ and $p$ are chosen for the whole $\mathcal{H}$-Matrix.

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

<figure><img src="image_23.png" /><figcaption>Column-wise partition of the panels for the Adaptive compression</figcaption></figure>

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

<figure><img src="image_25.png" /></figure>
We used the compressors integrated within **Composyx**, a C++ linear algebra library developed by INRIA focused on **composability** to ensure high composability.

[Composyx: https://gitlab.inria.fr/composyx/composyx]

<figure><img src="image_26.png" /><figcaption>Composability with Composyx</figcaption></figure>

Several compression libraries have been tried and compared, and other can easily be added:

* **SZ2** [X. Liang, S. Di, D. Tao, Z. Chen & F. Cappello, IEEE International Conference on Big Data, 2018]

* **ZFP** [P. Lindstrom, IEEE Transactions on Visualization and Computer Graphics, December 2014]

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

<figure><img src="image_28.png" /></figure>
We have tested it on a simple problem (sequential version):

① creating the solution $x_0$ and computing the right-hand side $b$

② assembling the $\mathcal{H}$-Matrix $M$

③ factorizing the $\mathcal{H}$-Matrix $M$

④ compressing then uncompressing it (giving us the $\mathcal{H}$-Matrix $M_c$)

⑤ solving the system $M_c x = b$, of solution $x_1$

⑥ comparing $x_1$ and $x_0$ (Relative Forward Error)

Several parameters can be changed: the arithmetic, the compressor, the number of blocks $p$ and the two compression precisions $\varepsilon_{LR}$ and $\varepsilon_{FP}$.

<figure><img src="image_29.png" /></figure>
Problem of size N = 512,000; double complex arithmetic; $\varepsilon_{LR}$ = 1e-3;
$\varepsilon_{FP}$ = 1e-4:

## H-Matrices

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

Forward Error : 2.93e-3

Total Time : 3,108.4s

## H-Matrices + FP Compression

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

Forward Error : 3.30e-3

Total Time : 3,274.0s
Problem of size N = 512,000; double complex arithmetic; $\varepsilon_{LR}$ =1e-3;
$\varepsilon_{FP}$ =1e-4:

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

<figure><img src="image_33.png" /></figure>
Problem of size N = 512,000; double complex arithmetic; $\varepsilon_{LR}$ =1e-3;
$\varepsilon_{FP}$ =1e-4; $p$ = 4:

## H-Matrices

1,953.6 Gb

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

36.4 Gb

Forward Error : 2.93e-3

Total Time : 3,108.4s

## H-Matrices + Adaptive FP Compression

1,953.6 Gb

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

6.7 Gb

Forward Error : 3.28e-3

Total Time : 3,257.0s
Problem of size N = 512,000; double complex arithmetic; $\varepsilon_{LR} = 1e-3$; $\varepsilon_{FP} = 1e-4$; $p = 4$:

<figure><img src="image_36.png" /></figure>
Several things are worth testing to try and improve the results:

* Other compressors (SZ3, ...)

* Different parameters *p* and *ε*<sub>FP</sub> for different Low Rank blocks

* Applying FP compression on-the-fly during factorization

* Compression of full blocks

* Implementation in parallel code

* Test on industrial case

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

<figure><img src="image_38.png" /></figure>
* Benoit Lizé. *Résolution Directe Rapide pour les Éléments Finis de Frontière en Électromagnétisme et Acoustique: H-Matrices. Parallélisme et Applications Industrielles*. PhD thesis, Université Paris-Nord - Paris XIII, 2014.

* Sequential Open Source Implementation of a H-Matrix Library: https://github.com/jeromerobert/hmat-oss/

* Composyx: https://gitlab.inria.fr/composyx/composyx

* Peter Lindstrom. *Fixed-Rate Compressed Floating-Point Arrays. IEEE Transactions on Visualization and Computer Graphics*, 20(12):2674-2683, December 2014. doi:10.1109/TVCG.2014.2346458.
* Ronald Kriemann, *Hierarchical Lowrank Arithmetic with Binary Compression*, 2023, arXiv:2308.10960

* Ronald Kriemann, *Performance of H-Matrix-Vector Multiplication with Floating Point Compression*, 2024, arXiv:2405.03456

* Carl Eckart, Gale Young, *The approximation of one matrix by another of lower rank*. Psychometrika, Volume 1, 1936, Pages 211–8.
doi:10.1007/BF02288367

* Xin Liang, Sheng Di, Dingwen Tao, Zizhong Chen, Franck Cappello, *Error-Controlled Lossy Compression Optimized for High Compression Ratios of Scientific Datasets*, in IEEE International Conference on Big Data (Bigdata 2018), Seattle, WA, USA, 2018.

<figure><img src="image_39.png" /></figure>
How do we choose p ?

→ Impact of p on Error and Compression Factor:

<figure><img src="image_40.png" /><figcaption>Error & Compression Factor (N = 512 000)</figcaption></figure>

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