Quantization-Aware NN Layers with High-throughput FPGA Implementation for Edge AI
Author:
Pistellato Mara1ORCID, Bergamasco Filippo1ORCID, Bigaglia Gianluca2ORCID, Gasparetto Andrea2ORCID, Albarelli Andrea1ORCID, Boschetti Marco3, Passerone Roberto4ORCID
Affiliation:
1. Dipartimento di Scienze Ambientali, Informatica e Statistica (DAIS), Università Ca’Foscari di Venezia, Via Torino 155, 30170 Venezia, Italy 2. Dipartimento di Management, Università Ca’Foscari di Venezia, Cannaregio 873, 30121 Venezia, Italy 3. Covision Lab SCARL, Via Durst 4, 39042 Bressanone, Italy 4. Dipartimento di Ingegneria e Scienza dell’Informazione (DISI), University of Trento, Via Sommarive 9, 38123 Trento, Italy
Abstract
Over the past few years, several applications have been extensively exploiting the advantages of deep learning, in particular when using convolutional neural networks (CNNs). The intrinsic flexibility of such models makes them widely adopted in a variety of practical applications, from medical to industrial. In this latter scenario, however, using consumer Personal Computer (PC) hardware is not always suitable for the potential harsh conditions of the working environment and the strict timing that industrial applications typically have. Therefore, the design of custom FPGA (Field Programmable Gate Array) solutions for network inference is gaining massive attention from researchers and companies as well. In this paper, we propose a family of network architectures composed of three kinds of custom layers working with integer arithmetic with a customizable precision (down to just two bits). Such layers are designed to be effectively trained on classical GPUs (Graphics Processing Units) and then synthesized to FPGA hardware for real-time inference. The idea is to provide a trainable quantization layer, called Requantizer, acting both as a non-linear activation for neurons and a value rescaler to match the desired bit precision. This way, the training is not only quantization-aware, but also capable of estimating the optimal scaling coefficients to accommodate both the non-linear nature of the activations and the constraints imposed by the limited precision. In the experimental section, we test the performance of this kind of model while working both on classical PC hardware and a case-study implementation of a signal peak detection device running on a real FPGA. We employ TensorFlow Lite for training and comparison, and use Xilinx FPGAs and Vivado for synthesis and implementation. The results show an accuracy of the quantized networks close to the floating point version, without the need for representative data for calibration as in other approaches, and performance that is better than dedicated peak detection algorithms. The FPGA implementation is able to run in real time at a rate of four gigapixels per second with moderate hardware resources, while achieving a sustained efficiency of 0.5 TOPS/W (tera operations per second per watt), in line with custom integrated hardware accelerators.
Funder
SMACT Competence Center scpa, project CoNNeCT
Subject
Electrical and Electronic Engineering,Biochemistry,Instrumentation,Atomic and Molecular Physics, and Optics,Analytical Chemistry
Reference58 articles.
1. Machine Learning at the Network Edge: A Survey;Sarwar;ACM Comput. Surv.,2022 2. Kar, G., Jain, S., Gruteser, M., Bai, F., and Govindan, R. (2017, January 12–14). Real-Time traffic estimation at vehicular edge nodes. Proceedings of the 2017 2nd ACM/IEEE Symposium on Edge Computing, SEC 2017, San Jose, CA, USA. 3. A Methodology for the Design of Safety-Compliant and Secure Communication of Autonomous Vehicles;Passerone;IEEE Access,2019 4. Lifelong Exploratory Navigation: An Architecture for Safer Mobile Robots;Cancila;IEEE Des. Test,2021 5. Barnell, M., Raymond, C., Isereau, D., Capraro, C., and Cote, E. (2017, January 7–8). Utilizing high-performance embedded computing, agile condor, for intelligent processing: An artificial intelligence platform for remotely piloted aircraft. Proceedings of the 2017 Intelligent Systems Conference, IntelliSys, London, UK.
|
|