FLOPpy: A hardware-agnostic Python library to monitor the computational cost of machine and deep learning algorithms

Read full text
Authors: Francesco Scala, Francesco Mandarino, Liliana Martirano, Luigi Pontieri
Cited by: 1
References: 7

Abstract

The growing awareness of the computational and environmental costs associated with running Machine and Deep Learning models has increased interest in efficiency-aware evaluation. Model performance is commonly assessed through predictive metrics such as accuracy, which do not capture the computational cost required to obtain such results. Existing indicators like execution time, energy consumption, or CO 2 emissions depend strongly on hardware and infrastructure characteristics, limiting comparability and reproducibility. FLOPpy addresses this limitation by providing hardware-agnostic estimates of the computational effort required during both training and inference through the number of Floating Point Operations (FLOPs). Beyond this widely adopted metric, FLOPpy introduces the estimation of Bit-Operations (BOPs) by dynamically intercepting tensor precisions at runtime. This enables a precision-aware quantification of computation, capturing efficiency aspects that FLOPs alone cannot reflect. By jointly modeling operation count and numerical precision, the proposed library establishes a more faithful and comprehensive characterization of computational cost. FLOPpy integrates seamlessly with widely used Machine and Deep Learning libraries, allowing researchers and practitioners to incorporate reproducible, precision-aware efficiency analysis into existing experimental workflows.

Publication details

Journal / source
SoftwareX
Publisher
Elsevier BV
Volume
35
Pages
102865–102865
Publication date
14 July 2026
Language
EN