thesis

From high-level languages to dataflow circuits

Abstract

La manera tradicional de computar alguna cosa és creant software que es pot executar en la unitat de processament central (CPU) d'un processador. El problema és que una CPU no té la capacitat de còmput suficient per executar correctament aplicacions pertanyents a certs àmbits, com per exemple l'aprenentatge profund o la mineria de cripto-monedes. Amb el pas del temps, les unitats de processament gràfic (GPUs) es van començar a utilitzar en altres camps més enllà dels ideats inicialment (p.e. videojocs), permetent l'execució d'aquelles aplicacions que les CPU no podien. No obstant, existeix una altra manera per executar programes o algorismes, la qual és molt més eficient en el consum de temps i energia que executar software en CPUs i GPUs. Aquesta altra manera consisteix a dissenyar i implementar directament un circuit hardware per executar alguna cosa en particular, en lloc d'utilitzar un circuit de propòsit general que permet executar qualsevol cosa. Per aquesta raó, l'objectiu d'aquest projecte és el de desenvolupar una eina de síntesis que generi circuits de data flow a partir de llenguatges de programació d'alt nivell. Aquests circuits es poden implementar en tecnologies com les matrius de portes programables (FPGAs). Aquest projecte crearà el back end d'un compilador, amb l'ajuda d'algun front end d'un compilador que permeti la traducció de codi d'alt nivell en una representació intermèdia, com per exemple LLVM. La idea és tenir un únic codi intermedi per múltiples llenguatges d'alt nivell. Aleshores, aquesta representació intermèdia es passarà al nostre back end, i aquest generarà un conjunt de mòduls amb diferents funcionalitats, i canals per transmetre dades entre mòduls, en la forma d'un graf dirigit. Finalment, aquests grafs s'implementaran en les mencionades FGPAs, creant el circuit hardware final que s'executarà. El funcionament d'aquests circuits seguirà el paradigma del data flow, proposat en el MIT a mitjans dels anys 70.The traditional way to compute something is writing software that can be executed in the processor's central processing unit (CPU). However, a CPU does not have the computing capacity to properly run applications belonging to certain fields like for example, deep learning and cryptocurrency mining. With the passage of time, graphic processing units (GPUs) began to be used in other fields besides the initially intended ones (e.g. video games), permitting the execution of those applications that CPUs could not. Nevertheless, exists a different way to execute programs or algorithms, that is much more efficient in time and power consumption than executing software in CPUs and GPUs. This other way consists in directly designing and implementing a hardware circuit to particularly execute something, instead of using a general-purpose circuitry that can compute anything. For this reason, the goal of this project is the development of a synthesis tool that generates data flow circuits from high-level languages. These circuits can be later be implemented in technologies such as field-programmable gate arrays (FPGAs). This project will create a compiler back end, with the help of some existing compiler front end that can translate the initial high-level code into some intermediate representation, such as LLVM. The idea is to have a unique intermediate code for multiple high-level languages. Then, this intermediate representation will be fed to our back end, and it will generate a set of modules with different functions, and channels to transmit data between modules, in the form of directed graphs. Finally, these graphs will be implemented in the mentioned FPGAs, creating the final hardware circuit that will be run. The functioning of these circuits, will follow the data flow paradigm proposed at the MIT in the mid 70's

    Similar works