# Machine Learning for Timing Analysis: The Good, the Bad and the Ugly

Isabelle Puaut

► To cite this version:

Isabelle Puaut. Machine Learning for Timing Analysis: The Good, the Bad and the Ugly. Thomas Carle. WCET 2024 - 22nd International Workshop on Worst-Case Execution Time Analysis, Jul 2024, Lille, France. Open Access Series in Informatics (OASICS), Open Access Series in Informatics (OASICS), pp.1-1, 2024, Workshop on Worst-Case Execution Time Analysis (WCET). 10.4230/OA-SICS.WCET.2024.7. [https://inria.hal.science/hal-04672502v1](https://inria.hal.science/hal-04672502v1) . [hal-04672502](https://HAL Id: hal-04672502)

Submitted on 19 Aug 2024

**HAL** is a multi-disciplinary open access archive for the deposit and dissemination of scientific research documents, whether they are published 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>
# Machine Learning for Timing Analysis: The Good, the Bad and the Ugly

Isabelle Puaut

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

ID

Univ. Rennes, INRIA, CNRS, IRISA, France

## Abstract

The microarchitecture of processors is becoming increasingly complex and less documented, making the design of timing models for WCET calculation increasingly complicated, if not impossible. We have recently experimented with the use of machine learning techniques (ML) to predict the WCET of basic blocks [3, 1, 2, 4, 5]. Predicted WCETs can then be integrated into static WCET calculation tools, resulting in a hybrid WCET calculation.

In this keynote, we present our experience using ML for WCET calculation, across a range of architectures, from very simple ones (MSP430, Cortex M4) to more complex architectures. Rather than presenting only what worked, we also discuss in this keynote the bad, and even very bad, surprises encountered during the process, and how we overcame (most of) them.

**2012 ACM Subject Classification** Computer systems organization → Embedded and cyber-physical systems; Computer systems organization → Real-time systems; Computing methodologies → Machine learning

**Keywords and phrases** Worst-Case Execution Time (WCET) estimation, Machine Learning, Explainable ML models

Digital Object Identifier 10.4230/OASICS.WCET.2024.7

Category Invited Talk

## References

1. Abderaouf N. Amalou, Élisa Fromont, and Isabelle Puaut. CATREEN: context-aware code timing estimation with stacked recurrent networks. In Marek Z. Reformat, Du Zhang, and Nikolaos G. Bourbakis, editors, *34th IEEE International Conference on Tools with Artificial Intelligence, ICTAI 2022, Macao, China, October 31 – November 2, 2022*, pages 571–576. IEEE, 2022.

2. Abderaouf N Amalou, Elisa Fromont, and Isabelle Puaut. Cawet: Context-aware worst-case execution time estimation using transformers. In *35th Euromicro Conference on Real-Time Systems (ECRTS 2023)*. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2023.

3. Abderaouf N Amalou, Isabelle Puaut, and Gilles Muller. We-hml: hybrid wcet estimation using machine learning for architectures with caches. In *2021 IEEE 27th International Conference on Embedded and Real-Time Computing Systems and Applications (RTCSA)*, pages 31–40. IEEE, 2021.

4. Abderaouf Nassim Amalou. *Machine learning for timing estimation. (apprentissage automatisé pour l'estimation du temps d'exécution)*. PhD thesis, University of Rennes 1, France, 2023. URL: https://tel.archives-ouvertes.fr/tel-04406029.

5. Abderaouf Nassim Amalou, Elisa Fromont, and Isabelle Puaut. Fast and accurate context-aware basic block timing prediction using transformers. In Gabriel Rodríguez, P. Sadayappan, and Aravind Sukumaran-Rajam, editors, *Proceedings of the 33rd ACM SIGPLAN International Conference on Compiler Construction, CC 2024, Edinburgh, United Kingdom, March 2-3, 2024*, pages 227–237. ACM, 2024.

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