Accelerating VGG neural network in GPU and FPGA technologies

In recent years, Neural Networks have come to the forefront by eloquently solving long-standing problems. Deep Learning has made possible computational models, composed of multiple processing layers, to learn representations of data with multiple levels of abstraction. This in turn, has led to advan...

Πλήρης περιγραφή

Λεπτομέρειες βιβλιογραφικής εγγραφής
Κύριος συγγραφέας: Χριστόπουλος, Στέφανος
Άλλοι συγγραφείς: Christopoulos, Stefanos
Γλώσσα:English
Έκδοση: 2022
Θέματα:
Διαθέσιμο Online:https://hdl.handle.net/10889/23751
id nemertes-10889-23751
record_format dspace
institution UPatras
collection Nemertes
language English
topic Neural networks
Machine learning
Artificial intelligence
Computer vision
GPU
FPGA
Νευρωνικά δίκτυα
Μηχανική μάθηση
Τεχνητή νοημοσύνη
Υπολογιστική όραση
spellingShingle Neural networks
Machine learning
Artificial intelligence
Computer vision
GPU
FPGA
Νευρωνικά δίκτυα
Μηχανική μάθηση
Τεχνητή νοημοσύνη
Υπολογιστική όραση
Χριστόπουλος, Στέφανος
Accelerating VGG neural network in GPU and FPGA technologies
description In recent years, Neural Networks have come to the forefront by eloquently solving long-standing problems. Deep Learning has made possible computational models, composed of multiple processing layers, to learn representations of data with multiple levels of abstraction. This in turn, has led to advances in Computer Vision, Speech Recognition, Machine Translation and many other fields such as Cancer Research. Due to their ability to solve real-world problems, Neural Networks have countless applications and are starting to become part of every-day life. Web searches, music/video recommendations, mobile phone camera processing and even semi-autonomous driving vehicles run with the help of Neural Networks. By nature, Neural Networks require little engineering effort. Instead, they mostly rely on computational power and vast amounts of data which appears to be a driving factor in their success in our modern digital world. Unfortunately, as Moore’s Law seems to be slowing down, it becomes increasingly important to write software that can utilize the underlying hardware to its maximum but also design hardware with software in mind. To this end, in the current thesis, I set to maximally use the available resources of the GPU for the purpose of training Deep Neural Networks. Furthermore, I seek to demonstrate the feasibility of running large Neural Networks on FPGAs that can be used as edge devices. With this goal in mind, I design a Convolution Accelerator for FPGA devices. I apply GPU software optimization strategies to develop custom CUDA kernels for various Neural Network layers and use them to accelerate the VGG16 Neural Network. By using the Winograd Convolution algorithm, optimizing Matrix Multiplication on GPUs and reducing memory bandwidth requirements by fusing layers, I achieve an 8% reduction in execution time over Nvidia’s cuDNN library during Inference and 30% during training of VGG16. In addition, my implementation surpasses Google’s Tensorflow performance by more than 40% during training. In addition, using Xilinx’s Vitis HLS tool, I implement 2 designs with different quantizations of the Winograd Convolution algorithm for the convolutional layers of VGG16 during Inference. Performance results show the FPGA design being 33% more energy efficient than the GPU while achieving sufficiently low execution times to be used as an edge device for Neural Network Inference.
author2 Christopoulos, Stefanos
author_facet Christopoulos, Stefanos
Χριστόπουλος, Στέφανος
author Χριστόπουλος, Στέφανος
author_sort Χριστόπουλος, Στέφανος
title Accelerating VGG neural network in GPU and FPGA technologies
title_short Accelerating VGG neural network in GPU and FPGA technologies
title_full Accelerating VGG neural network in GPU and FPGA technologies
title_fullStr Accelerating VGG neural network in GPU and FPGA technologies
title_full_unstemmed Accelerating VGG neural network in GPU and FPGA technologies
title_sort accelerating vgg neural network in gpu and fpga technologies
publishDate 2022
url https://hdl.handle.net/10889/23751
work_keys_str_mv AT christopoulosstephanos acceleratingvggneuralnetworkingpuandfpgatechnologies
AT christopoulosstephanos epitachynsētouneurōnikoudiktyouvggsetechnologiesgpukaifpga
_version_ 1771297180916645888
spelling nemertes-10889-237512022-11-08T04:35:30Z Accelerating VGG neural network in GPU and FPGA technologies Επιτάχυνση του νευρωνικού δικτύου VGG σε τεχνολογίες GPU και FPGA Χριστόπουλος, Στέφανος Christopoulos, Stefanos Neural networks Machine learning Artificial intelligence Computer vision GPU FPGA Νευρωνικά δίκτυα Μηχανική μάθηση Τεχνητή νοημοσύνη Υπολογιστική όραση In recent years, Neural Networks have come to the forefront by eloquently solving long-standing problems. Deep Learning has made possible computational models, composed of multiple processing layers, to learn representations of data with multiple levels of abstraction. This in turn, has led to advances in Computer Vision, Speech Recognition, Machine Translation and many other fields such as Cancer Research. Due to their ability to solve real-world problems, Neural Networks have countless applications and are starting to become part of every-day life. Web searches, music/video recommendations, mobile phone camera processing and even semi-autonomous driving vehicles run with the help of Neural Networks. By nature, Neural Networks require little engineering effort. Instead, they mostly rely on computational power and vast amounts of data which appears to be a driving factor in their success in our modern digital world. Unfortunately, as Moore’s Law seems to be slowing down, it becomes increasingly important to write software that can utilize the underlying hardware to its maximum but also design hardware with software in mind. To this end, in the current thesis, I set to maximally use the available resources of the GPU for the purpose of training Deep Neural Networks. Furthermore, I seek to demonstrate the feasibility of running large Neural Networks on FPGAs that can be used as edge devices. With this goal in mind, I design a Convolution Accelerator for FPGA devices. I apply GPU software optimization strategies to develop custom CUDA kernels for various Neural Network layers and use them to accelerate the VGG16 Neural Network. By using the Winograd Convolution algorithm, optimizing Matrix Multiplication on GPUs and reducing memory bandwidth requirements by fusing layers, I achieve an 8% reduction in execution time over Nvidia’s cuDNN library during Inference and 30% during training of VGG16. In addition, my implementation surpasses Google’s Tensorflow performance by more than 40% during training. In addition, using Xilinx’s Vitis HLS tool, I implement 2 designs with different quantizations of the Winograd Convolution algorithm for the convolutional layers of VGG16 during Inference. Performance results show the FPGA design being 33% more energy efficient than the GPU while achieving sufficiently low execution times to be used as an edge device for Neural Network Inference. Τα τελευταία χρόνια, τα Νευρωνικά Δίκτυα έχουν έρθει στο προσκήνιο λύνοντας μακροχρόνια προβλήματα. Το Deep Learning έχει καταστήσει δυνατά υπολογιστικά μοντέλα, αποτελούμενα από πολλαπλά επίπεδα επεξεργασίας, που έχουν τη δυνατότητα να μάθουν αναπαραστάσεις δεδομένων με πολλαπλά επίπεδα αφαίρεσης. Αυτό με τη σειρά του, οδήγησε σε προόδους στην υπολογιστική όραση, στην αναγνώριση ομιλίας, στη μηχανική μετάφραση και σε πολλούς άλλους τομείς όπως η έρευνα για τον καρκίνο. Λόγω της ικανότητάς τους να επιλύουν πρακτικά προβλήματα, τα Νευρωνικά Δίκτυα έχουν αμέτρητες εφαρμογές και αρχίζουν να γίνονται μέρος της καθημερινής ζωής. Αναζητήσεις στο διαδίκτυο, συστάσεις μουσικής/βίντεο, επεξεργασία εικόνας στην κάμερα κινητών και ακόμη και ημιαυτόνομα οχήματα οδήγησης τρέχουν με τη βοήθεια των Νευρωνικών Δικτύων. Από τη φύση τους, τα Νευρωνικά Δίκτυα εφαρμόζονται σχετικά εύκολα, δίχως να απαιτούν πολλές εργατοώρες. Αντιθέτως, βασίζονται κυρίως στην υπολογιστική ισχύ και τον τεράστιο όγκο δεδομένων, τα οποία φαίνεται να αποτελούν κινητήριο παράγοντα για την επιτυχία τους στον σύγχρονο ψηφιακό μας κόσμο. Δυστυχώς, καθώς ο νόμος του Moore φαίνεται να επιβραδύνεται, γίνεται όλο και πιο σημαντικό να γράφεται λογισμικό που μπορεί να χρησιμοποιήσει το υποκείμενο υλικό στο μέγιστο, αλλά και να σχεδιάζεται υλικό με το λογισμικό κατά νου. Για το σκοπό αυτό, σε αυτή τη διπλωματική, προσπαθώ να αξιοποιήσω στο μέγιστο τους πόρους της GPU με σκοπό την πιο ταχεία εκπαίδευση των Νευρωνικών Δικτύων. Επιπλέον, επιδιώκω να δείξω πως είναι δυνατή η εκτέλεση μεγάλων Νευρωνικών Δικτύων σε FPGA που μπορούν να χρησιμοποιηθούν ως edge devices. Για αυτό το σκοπό, σχεδιάζω ένα Convolution Accelerator για συσκευές FPGA. Εφαρμόζω στρατηγικές βελτιστοποίησης λογισμικού GPU για την ανάπτυξη υψηλά αποδοτικών CUDA kernel για διάφορα layers Νευρωνικών Δικτύων και τα χρησιμοποιώ για την επιτάχυνση του Νευρωνικού Δικτύου VGG16. Συγκεκριμένα, επιτυγχάνεται η επιτάχυνση του Convolution layer μέσω του αλγορίθμου του Winograd ο οποίος μειώνει τον αριθμό των απαιτούμενων πολλαπλασιασμών. Επιπλέον, βελτιστοποιείται η, πολύ σημαντική για τα Νευρωνικά Δίκτυα, διαδικασία του πολλαπλασιασμού πινάκων. Σε συνδυασμό, με τη μείωση του απαραίτητου memory bandwidth μέσω της ενοποίησης πολλαπλών layers, επιτυγχάνω 8% μείωση του χρόνου εκτέλεσης σε σχέση με τη βιβλιοθήκη cuDNN της Nvidia στο Inference και 30% στο training του VGG16. Επιπλέον, η εφαρμογή μου ξεπερνά σε απόδοση το Tensorflow της Google κατά περισσότερο από 40% στο training. Επιπλέον, χρησιμοποιώντας το εργαλείο Vitis HLS της Xilinx, υλοποιώ 2 σχέδια, με διαφορετική κβάντιση, του αλγορίθμου Winograd Convolution για τα Convolution layers του VGG16 που αφορούν το Inference. Με τη στρατηγική χρήση buffers και τη σωστή δόμηση του αλγορίθμου ώστε να ταιριάζει στους περιορισμούς του FPGA επιτυγχάνω ικανοποιητικά αποτελέσματα. Η υλοποίηση με FPGA είναι 33% πιο ενεργειακά αποδοτική από τη GPU, ενώ επιτυγχάνει αρκετά χαμηλούς χρόνους εκτέλεσης ώστε να καθίσταται δυνατή η χρήση του FPGA ως edge device για Inference ακόμα και μεγάλων Νευρωνικών. 2022-11-07T10:28:11Z 2022-11-07T10:28:11Z 2021-10-22 https://hdl.handle.net/10889/23751 en application/pdf