Modern computing applications increasingly face performance and energy constraints, especially in fields such as machine learning, scientific computing, and embedded systems. Many of these applications do not require full numerical precision for every computation— introducing opportunities to optimize efficiency by reducing precision while maintaining acceptable accuracy. Precision tuning is a technique that adjusts the numerical representation of variables and operations to improve execution speed, reduce power consumption, and lower memory requirements. However, existing precision tuning tools often require manual expertise, making them impractical for large-scale adoption. This work explores two key challenges in tool design for precision tuning: (1) the trade-offs between static and profile-guided analysis and (2) the integration of precision tuning in a hardware-software co-design framework. Static analysis estimates precision requirements based on mathematical reasoning alone, often leading to overly conservative precision choices. In contrast, profile-guided tuning gathers real execution data to dynamically determine the precision needs of different computations, achieving a better balance between accuracy and efficiency. Our evaluation on the PolyBench/C benchmark suite shows that profile-guided analysis improves numerical accuracy by an order of magnitude in over 80% of benchmarks, while maintaining comparable execution speed. In specific cases, such as heat-3d, profileguided tuning achieves a 10× speedup, whereas static analysis leads to a slowdown due to conservative estimates. Similarly, in deriche, profile-guided tuning delivers a 3× speedup by overcoming inefficiencies in the static approach. Most precision tuning tools optimize software without considering the underlying hardware. We introduce a co-design approach, where precision tuning is applied simultaneously at the software and hardware levels to maximize efficiency. By tuning software computations to match hardware capabilities, we achieve better performance and energy savings. When applied to an FPGA-based floating-point unit, our design approach reduces energy consumption of the program by up to 55% compared to the 32 bit floating-point baseline, while maintaining the specified error threshold, and reduces the design time by 2700× compared to the traditional gate-level simulation-based design approach. Additionally, we apply precision tuning to real-world applications, including Field- Oriented Control (FOC) for motor control and bicubic image scaling. In FOC, profileguided tuning achieves a 594% speedup while maintaining a mean relative error below 10−7, compared to 293% speedup for static tuning. In bicubic scaling, static tuning results in a 15% slowdown, while profile-guided tuning delivers a 795% speedup with no accuracy loss, demonstrating its advantage in computationally intensive scenarios. By combining automation, adaptability, and co-design principles, this research makes precision tuning more practical and scalable, paving the way for more energy-efficient and high-performance computing systems.
Le moderne applicazioni informatiche affrontano sempre più vincoli di prestazioni ed energia, in particolare nei settori dell’apprendimento automatico, del calcolo scientifico e dei sistemi embedded. Molte di queste applicazioni non richiedono la massima precisione numerica per ogni calcolo, creando opportunità per ottimizzare l’efficienza riducendo la precisione, pur mantenendo un’accuratezza accettabile. Il precision tuning è una tecnica che adatta la rappresentazione numerica delle variabili e delle operazioni per migliorare la velocità di esecuzione, ridurre il consumo energetico e abbassare i requisiti di memoria. Tuttavia, gli strumenti esistenti per il precision tuning spesso richiedono competenze manuali, rendendoli poco pratici per un'adozione su larga scala. Questo lavoro esplora due sfide principali nella progettazione degli strumenti di precision tuning: 1. Il compromesso tra analisi statica e analisi basata sul profilo. 2. L’integrazione del precision tuning in un framework di co-progettazione hardware-software. L'analisi statica stima i requisiti di precisione basandosi esclusivamente sul ragionamento matematico, portando spesso a scelte eccessivamente conservative. Al contrario, il precision tuning guidato dal profilo raccoglie dati di esecuzione reali per determinare dinamicamente la precisione necessaria nelle diverse operazioni, ottenendo un miglior equilibrio tra accuratezza ed efficienza. La nostra valutazione sulla suite di benchmark PolyBench/C mostra che l'analisi basata sul profilo migliora la precisione numerica di un ordine di grandezza in oltre l'80% dei benchmark, mantenendo una velocità di esecuzione comparabile. In casi specifici, come heat-3d, il precision tuning basato sul profilo ottiene un accelerazione di 10×, mentre l’analisi statica causa un rallentamento a causa di stime troppo conservative. Allo stesso modo, in deriche, il tuning basato sul profilo offre un incremento di velocità di 3× superando le inefficienze dell’approccio statico. La maggior parte degli strumenti di precision tuning ottimizza il software senza considerare l’hardware sottostante. Introduciamo un approccio di co-progettazione, in cui il precision tuning viene applicato simultaneamente a livello software e hardware per massimizzare l’efficienza. Ottimizzando i calcoli software per adattarli alle capacità hardware, si ottengono prestazioni migliori e un minor consumo energetico. Applicato a un’unità in virgola mobile su FPGA, il nostro approccio riduce il consumo energetico del programma fino al 55% rispetto alla baseline a 32 bit, mantenendo la soglia di errore specificata, e riduce il tempo di progettazione di 2700× rispetto al tradizionale approccio basato sulla simulazione a livello di gate. Inoltre, applichiamo il precision tuning ad applicazioni reali, tra cui il controllo orientato al campo (FOC) per il controllo motore e il ridimensionamento bicubico delle immagini. Nel FOC, il tuning basato sul profilo ottiene un incremento di velocità del 594%, mantenendo un errore relativo medio inferiore a 10^{-7}, rispetto al 293% ottenuto con il tuning statico. Nel ridimensionamento bicubico, il tuning statico comporta un rallentamento del 15%, mentre il tuning basato sul profilo offre un incremento di velocità del 795% senza perdita di accuratezza, dimostrando il suo vantaggio nei contesti computazionalmente intensivi. Combinando automazione, adattabilità e co-progettazione, questa ricerca rende il precision tuning più pratico e scalabile, aprendo la strada a sistemi informatici più efficienti dal punto di vista energetico e ad alte prestazioni.
Construction of precision tuning tools
DENISOV, LEV
2024/2025
Abstract
Modern computing applications increasingly face performance and energy constraints, especially in fields such as machine learning, scientific computing, and embedded systems. Many of these applications do not require full numerical precision for every computation— introducing opportunities to optimize efficiency by reducing precision while maintaining acceptable accuracy. Precision tuning is a technique that adjusts the numerical representation of variables and operations to improve execution speed, reduce power consumption, and lower memory requirements. However, existing precision tuning tools often require manual expertise, making them impractical for large-scale adoption. This work explores two key challenges in tool design for precision tuning: (1) the trade-offs between static and profile-guided analysis and (2) the integration of precision tuning in a hardware-software co-design framework. Static analysis estimates precision requirements based on mathematical reasoning alone, often leading to overly conservative precision choices. In contrast, profile-guided tuning gathers real execution data to dynamically determine the precision needs of different computations, achieving a better balance between accuracy and efficiency. Our evaluation on the PolyBench/C benchmark suite shows that profile-guided analysis improves numerical accuracy by an order of magnitude in over 80% of benchmarks, while maintaining comparable execution speed. In specific cases, such as heat-3d, profileguided tuning achieves a 10× speedup, whereas static analysis leads to a slowdown due to conservative estimates. Similarly, in deriche, profile-guided tuning delivers a 3× speedup by overcoming inefficiencies in the static approach. Most precision tuning tools optimize software without considering the underlying hardware. We introduce a co-design approach, where precision tuning is applied simultaneously at the software and hardware levels to maximize efficiency. By tuning software computations to match hardware capabilities, we achieve better performance and energy savings. When applied to an FPGA-based floating-point unit, our design approach reduces energy consumption of the program by up to 55% compared to the 32 bit floating-point baseline, while maintaining the specified error threshold, and reduces the design time by 2700× compared to the traditional gate-level simulation-based design approach. Additionally, we apply precision tuning to real-world applications, including Field- Oriented Control (FOC) for motor control and bicubic image scaling. In FOC, profileguided tuning achieves a 594% speedup while maintaining a mean relative error below 10−7, compared to 293% speedup for static tuning. In bicubic scaling, static tuning results in a 15% slowdown, while profile-guided tuning delivers a 795% speedup with no accuracy loss, demonstrating its advantage in computationally intensive scenarios. By combining automation, adaptability, and co-design principles, this research makes precision tuning more practical and scalable, paving the way for more energy-efficient and high-performance computing systems.File | Dimensione | Formato | |
---|---|---|---|
final_submission.pdf
accessibile in internet per tutti
Dimensione
907.68 kB
Formato
Adobe PDF
|
907.68 kB | Adobe PDF | Visualizza/Apri |
I documenti in POLITesi sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.
https://hdl.handle.net/10589/237053