Hello there!
In this post I want to introduce a PYNQ driver I’ve created for fpgaConvNet. fpgaConvNet is a project that aims to accelerate Convolutional Neural Networks (CNNs) on FPGAs with state-of-the-art performance and efficiency. If you want to learn more about it, check the tutorials they have.
The driver aims to bring the power of fpgaConvNet to the PYNQ framework, easing the deployment of CNNs on PYNQ boards. The driver is available on GitHub, and it includes a Jupyter notebook to show how to use it. Basically, its functionality is the following:
from pynq import Overlay
from fpgaconvnet_pynq_driver import *
overlay = Overlay('bitstream.bit')
fpgaconvnet_ip = overlay.fpgaconvnet_ip_0
fpgaconvnet_ip.load_partition('partitions.json', 0)
Y = fpgaconvnet_ip.run(X)
The driver also includes a function, fpgaconvnet_ip.test_performance()
, that characterizes the latency and throughput of the accelerator. Also, if it is run in a PMBus-enabled board, it uses the PYNQ PMBus API to measure the power consumption of the accelerator and calculate the energy per inference.
Any feedback is welcome! I hope you find it useful.
Cheers,
Daniel