With the unveiling of chat-GPT, our world changed forever. Tasks that were previously thought impossible became as close as one prompt away. This event drove the demand for AI training techniques and infrastructure to unprecedented levels. In this work we explore one technique that we believe can be a valuable tool in meeting such boundless demand. AI training is currently hampered, among other things, by power hungry floating point operations, and while hardware manufacturers are scrambling to overcome it with custom architectures such a TPUs (Tensor Processing Units), the approach we explore in this work is orthogonal to such methods. This work aims at implementing a precision tuning framework, TAFFO, as an MLIR dialect. MLIR offers a plethora of features and a rich dialect ecosystem that already enable optimizations catered to AI workloads. With our dialect we will implement the core steps of precision tuning, transforming costly floating point operations into fast and cheap integer operations, by exploiting fixed point point arithmetic to preserve the semantics of the input program. This will come the cost of accuracy, but in the context of approximate computing, and specifically in the machine learning domain, this is a price that is gladly paid by many, if not all, key players in the industry.
Con il rilascio di Chat-GPT, il nostro mondo è cambiato per sempre. Compiti che prima erano ritenuti impossibili sono diventati alla distanza di un prompt. Questo avvenimento ha spinto la domanda di tecniche e infrastrutture per l'addestramento dell'Intelligenza Artificiale (IA) a livelli senza precedenti. In questo lavoro esploriamo una tecnica che riteniamo possa essere uno strumento valido per soddisfare questa domanda. L'addestramento dell'IA è attualmente ostacolato, insieme ad altri fattori, da operazioni in virgola mobile dispendiose dal punto di vista energetico. Mentre i produttori di hardware tentano di superare questi limiti con architetture ad hoc, l'approccio che esploriamo in questo lavoro è ortogonale a tali metodi. Questo lavoro mira a implementare un framework per il precision tuning, TAFFO, nell'ecosistema MLIR. MLIR offre una miriade di funzionalità e un ricco ecosistema di dialetti progettati per consentire ottimizzazioni specifiche per i carichi di lavoro dell'IA. Con il nostro dialetto implementeremo le fasi fondamentali del precision tuning, trasformando costose operazioni tra numeri a virgola mobile in operazioni tra numeri interi, che sono veloci ed economiche, e utilizzeremo l'aritmetica in virgola fissa per preservare la semantica del programma in ingresso. Ciò avverrà a costo della precisione, ma nel contesto del calcolo approssimato, e in particolare nel dominio dell'IA, questo è un prezzo che viene pagato volentieri da molte, se non da tutte, le principali aziende del settore.
MLIR dialect for precision tuning
GALLI, PAOLO
2023/2024
Abstract
With the unveiling of chat-GPT, our world changed forever. Tasks that were previously thought impossible became as close as one prompt away. This event drove the demand for AI training techniques and infrastructure to unprecedented levels. In this work we explore one technique that we believe can be a valuable tool in meeting such boundless demand. AI training is currently hampered, among other things, by power hungry floating point operations, and while hardware manufacturers are scrambling to overcome it with custom architectures such a TPUs (Tensor Processing Units), the approach we explore in this work is orthogonal to such methods. This work aims at implementing a precision tuning framework, TAFFO, as an MLIR dialect. MLIR offers a plethora of features and a rich dialect ecosystem that already enable optimizations catered to AI workloads. With our dialect we will implement the core steps of precision tuning, transforming costly floating point operations into fast and cheap integer operations, by exploiting fixed point point arithmetic to preserve the semantics of the input program. This will come the cost of accuracy, but in the context of approximate computing, and specifically in the machine learning domain, this is a price that is gladly paid by many, if not all, key players in the industry.| File | Dimensione | Formato | |
|---|---|---|---|
|
Taffo_MLIR-1.pdf
accessibile in internet solo dagli utenti autorizzati
Descrizione: Thesis
Dimensione
569.23 kB
Formato
Adobe PDF
|
569.23 kB | Adobe PDF | Visualizza/Apri |
|
Executive_Summary___TAFFO_MLIR.pdf
accessibile in internet solo dagli utenti autorizzati
Descrizione: Executive Summary
Dimensione
326.1 kB
Formato
Adobe PDF
|
326.1 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/231611