Skip to content

This is a repository for my master thesis on AI hardware accelerators.

Notifications You must be signed in to change notification settings

davidecarini/AI_Accelerators_MSc_Thesis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI_Accelerators_MSc_Thesis

This is a repository for my master thesis on AI hardware accelerators developed @ Politecnico di Milano.

  • Advisor: Prof. Christian Pilato
  • Co-Advisor: Ing. Mattia Tibaldi

Description

In this repository there is the material used in the master thesis and stored on the server in DEIB. For the synthesis and implementation of CNNs on hardware are used two frameworks: HLS4ML and Vitis-AI. In the thesis there is a focus on the comparison between the two tools trying to figure out which one is better to use in different possible scenarios. With hls4ml, the xclbin is generated each time starting from the model that is given to it as input. Usually the generation of this bitstream takes about 3 hours. While in Vitis-AI an already existing bitstream is used and the model is compiled as if it were micro-code. For more details on how the tools work, go to the relative folders (HLS4ML, Vitis-AI) .

The dataset used for training and evaluation of the neural network is the MNIST (https://en.wikipedia.org/wiki/MNIST_database).

Neural Network

The neural network used in the thesis is a Convolutional Neural Network and it has the following structure:

Model: "mnist_cnn_model"
_________________________________________________________________
Layer (type)                 Output Shape              Param #   
=================================================================
input_1 (InputLayer)         [(None, 28, 28, 1)]       0         
_________________________________________________________________
conv2d (Conv2D)              (None, 26, 26, 12)        120       
_________________________________________________________________
max_pooling2d (MaxPooling2D) (None, 13, 13, 12)        0         
_________________________________________________________________
flatten (Flatten)            (None, 2028)              0         
_________________________________________________________________
dense (Dense)                (None, 10)                20290     
=================================================================
Total params: 20,410
Trainable params: 20,410
Non-trainable params: 0
_________________________________________________________________

Training time: 43,2 seconds
Size of the Keras model: 0.233736 MB
Keras test Accuracy: 98,05 %

Comparison between CNN on HLS4ML and Vitis-AI [Alveo U280]

TOOL Total images [Images] Test Accuracy [%] Throughput [Images\s] timg [μs]
HLS4ML 10000 97.66 60519.5 251.92
Vitis-AI 10000 98.07 3969.52 16.5

Links

DESCRIPTIONLINK
Excel Resultshttps://polimi365-my.sharepoint.com/:x:/g/personal/10568649_polimi_it/EZllLAMKUdZNiNXf4vR5Xv0BHTXIieT37QZPnv-lPMbPyw?e=JiFfKv&nav=MTVfezAwMDAwMDAwLTAwMDEtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMH0
Meeting Notes https://www.notion.so/030e0768ad6d4bb3bb5c99557ac8c06a?v=c46ee3523e3c481a92231fe94cc00bd3
LaTeX Thesishttps://www.overleaf.com/project/638883ef1f6f113398139581
LaTeX Executive Summaryhttps://www.overleaf.com/project/6388ce2146149184b3edeaf9
Colabhttps://colab.research.google.com/drive/1pKZtZ9_iotdf0YHwzCta6M2bcLMQDrCG
Final Presentationhttps://github.com/davidecarini/AI_Accelerators_MSc_Thesis/blob/main/deliveries/TemplatePoliMi.pptx

Author

NAMEEMAILPERSON CODESTUDENT ID
Davide Carini[email protected]10568649976571

Acknowledgments

For the development of this thesis I relied on these very useful repositories:

Contribute

Contributions and discovery of any bug are always welcome!

About

This is a repository for my master thesis on AI hardware accelerators.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published