A specification that supports FPGA devices on the TensorFlow framework
Hongbo Zhao, Hongwei Kan, YanWei Wang, Qianqian Zhao, Dongdong Su, Guangkui Huang · Proceedings of the 2020 4th International Conference on Electronic Information Technology and Computer Engineering · 2020
With the rise of artificial intelligence and machine learning, many applications and services require FPGA support to speed up the training process and improve efficiency. FPGA has its unique advantages including inference; but now TensorFlow only supports CPU and GPU, TPU, does not support FPGA, cannot use FPGA to accelerate specific models, and cannot play the full role of FPGA in TensorFlow. Based on the above problems, this paper proposes a method for efficiently using FPGA in TensorFlow. This method uses TensorFlow's original device management mechanism, adds an abstract method for FPGA devices under the TensorFlow framework, and writes implementation specifications for FPGA operators. Finally, we used OpenCL to build kernels of FPGA devices, took full advantage of the parallel computing advantages of FPGA devices, and used the CNN LeNet5 model and MNIST dataset to conduct corresponding experiments. The experimental results show that the training accuracy of the two devices is basically the same. This paper provides a feasible solution for TensorFlow to use FPGA devices for neural network calculations.