ConvFPGA is an OpenCL based library for Fast Fourier Transformation based Convolutions on FPGAs.
- FFT-based 3D Convolution
- Input sizes of powers of 2
- Single Precision (32 bit floating point)
- Batched convolutions
- OpenCL Shared Virtual Memory (SVM) extensions for data transfers
This library has been tested using the following FPGAs present in the Noctua cluster of the Paderborn Center for Parallel Computing (PC2) at Paderborn University:
- Bittware 520N card with Intel Stratix 10 GX 2800 FPGA
- Intel FPGA PAC D5005 card with Intel Stratix 10 SX 2800 FPGA
Firstly, dependencies for building the system
- CMake >= 3.16
- C++ compiler with C++11 support (GCC 4.9.0+)
- Intel FPGA SDK for OpenCL
- FFTW3
Once you have this covered, execute the following:
mkdir build && cd build # Directory to store build outputs
cmake ..
make
You have built the API i.e., the OpenCL host code that invokes different transformations correctly are packed into a static library. This must be linked to an application that helps invoke the APIs
Strictly said, you have built the following:
convfpga
static library, linked such as-l
convfpga/convfpga.h
header fileconvolution
- an application which links and includes the above two.
Now onto synthesizing the OpenCL Convolution kernels. These can be synthesized to run on software emulation or on hardware as bitstreams.
- Emulation
make <kernel_name>_emu
make conv3D_emulate
- Hardware Bitstream
make <kernel_name>_syn
make conv3D_syn
Putting them all together, in order to execute the required convolution, set the path to the synthesized bitstream along with other correct configurations as command line parameters to the sample application generated.
./convolution --num=64 --path=conv3d.aocx
Tip: for emulation, use the --emulate
command line parameter.
For explanations regarding the command line options and the OpenCL kernels, check out x and y in the user guide.
- FFTFPGA - an OpenCL based library for Fast Fourier Transformations for FPGAs
- FFTFPGA-eval - archives reports and measurements from FFTFPGA and ConvFPGA
- Marius Meyer for code reviews, testing and discussions.