Coder Social home page Coder Social logo

mtaillefumier / fft3d-fpga Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pc2/fft3d-fpga

0.0 0.0 0.0 442 KB

FFTFPGA is an OpenCL based library for Fast Fourier Transformations for FPGAs. This repository provides OpenCL host code in the form of FFTW like APIs as well as OpenCL kernel designs that can be synthesized to bitstreams.

License: MIT License

Shell 30.44% C++ 0.79% Python 0.03% C 66.71% CMake 2.02%

fft3d-fpga's Introduction

FFTFPGA

GitHub license GitHub license

FFTFPGA is an OpenCL based library for Fast Fourier Transformations for FPGAs. This repository provides OpenCL host code in the form of FFTW like APIs, which can be used to offload existing FFT routines to FPGAs with minimal effort. It also provides OpenCL kernels that can be synthesized to bitstreams, which the APIs can utilize.

Features

  • 1D, 2D and 3D Transforms
  • Input sizes of powers of 2
  • Single Precision (32 bit floating point)
  • C2C: Complex input to complex output
  • Out-of-place transforms
  • Batched 3D transforms
  • OpenCL Shared Virtual Memory (SVM) extensions for data transfers

Supported FPGAs

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:

Who is using FFTFPGA?

  • CP2K: the quantum chemistry software package has an interface to offload 3d FFTs to Intel FPGAs that uses the OpenCL kernel designs of FFTFPGA.

Quick Setup

Firstly, dependencies for building the system

  • CMake >= 3.10
  • 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  
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.

You have also compiled a sample application that helps invoke these APIs.

Strictly said, you have done the following:

  • fftfpga static library, linked such as -lfftfpga
  • fftfpga/fftfpga.h header file
  • fft - a sample application which links and includes the above two.

Now onto synthesizing the OpenCL FFT kernels. These can be synthesized to run on software emulation or on hardware as bitstreams.

  • Emulation
make <kernel_name>_emu
make fft3d_ddr_emulate
  • Hardware Bitstream
make <kernel_name>_syn
make fft3d_ddr_syn

Putting them all together, in order to execute the required FFT, set the path to the synthesized bitstream along with other correct configurations as command line parameters to the sample application generated.

./fft --num=64 --dim=3 --path=fft3d_ddr_128.aocx

Tip: for emulation, use the --emulate command line parameter.

List of Kernels

Kernel Name Description
1D fft1d OpenCL design provided by Intel
2D fft2d_ddr DDR memory is used for 2D Transpose
fft2d_bram BRAM is used for 2D Transpose
3D fft3d_ddr DDR memory is used for 3D Transpose
fft3d_bram BRAM is used for 3D Transpose

These kernels can be synthesized by appending _emulate or _syn to its suffix such as fft1d_emulate.

Please checkout the User Guide for more information such as configuration options etc.

Publications

FFTFPGA has been cited in the following publications:

  1. Evaluating the Design Space for Offloading 3D FFT Calculations to an FPGA for High-Performance Computing : https://doi.org/10.1007/978-3-030-79025-7_21

  2. CP2K: An electronic structure and molecular dynamics software package - Quickstep: Efficient and accurate electronic structure calculations: https://doi.org/10.1063/5.0007045

  3. Efficient Ab-Initio Molecular Dynamic Simulations by Offloading Fast Fourier Transformations to FPGAs : https://doi.org/10.1109/FPL50879.2020.00065

Related Repositories

  • ConvFPGA - an OpenCL based library for FFT-based convolution on FPGAs
  • FFTFPGA-eval - archives reports and measurements from FFTFPGA and ConvFPGA

Contact

Acknowledgements

fft3d-fpga's People

Contributors

arjunramaswami avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.