Giter Site home page Giter Site logo

double-batched-fft-library's Introduction

Double-Batched FFT Library

A library for computing the Discrete Fourier Transform; targeting Graphics Processing Units; supporting OpenCL, Level Zero, and SYCL; with double-batching.

IntroductionFeaturesInstallationDocumentationLicense

Introduction

The Double-Batched FFT Library is a library for computing the Fast Fourier Transform (FFT) on Graphics Processing Units (GPUs). GPU support is enabled via SYCL, OpenCL, or Level Zero.

A distinctive feature is the support of double-batching. That is, given the M x N_1 x ... x N_d x K input tensor, where the Fourier transform shall be taken over the N-modes, the library support batching over the M-mode and K-mode in a single kernel. Single-batching, offered by many FFT libraries, is included as the special case M=1.

Features

  • Forward and backward FFTs with complex input data and complex output data (c2c)
  • FFTs with real input data and complex output data (r2c)
  • FFTs with complex input data and real output data (c2r)
  • 1d, 2d, and 3d FFTs
  • Single and double precision
  • Single-batching and double-batching
  • User callbacks written in OpenCL-C for loads and stores (only in 1d)
  • Optimized for small FFTs with N <= 512

Installation

Install the oneAPI Base Toolkit. Build and install the project with

cmake -Bbuild -S. -DCMAKE_CXX_COMPILER=icpx -DCMAKE_BUILD_TYPE=Release
cmake --build build
cmake --install build --prefix /path/to/installation

Documentation

Online

The documentation is available at https://intel.github.io/double-batched-fft-library/

Local build

Install Doxygen and Python dependencies:

apt install doxygen
pip install -r docs/requirements.txt

Build and install with CMake (add -DBUILD_DOCUMENTATION=ON). To read the docs:

cd /path/to/installation/share/doc/bbfft
python -m http.server 8000

Open http://127.0.0.1:8000/ in a browser.

License

BSD 3-Clause License

double-batched-fft-library's People

Contributors

al42and avatar bd4 avatar hservatg avatar koysean avatar mabraham avatar omarkahmed avatar rdower avatar uphoffc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

double-batched-fft-library's Issues

Spack package?

Hello,

Is there any chance a spack package of this could be made? I'm asking since we had a request to install it, and a spack package would be more convenient for us. No problem if this isn't possible, we just wanted to ask in case.

Thanks!

Unit test failures when compiled with open-source IntelLLVM

Hello! I tried building the DBFFT with open-source Intel LLVM, and I'm getting a lot of failed tests when running on an integrated Gen12 GPU. Here's one example:

$ clang++ --version
clang version 16.0.0 (https://github.com/intel/llvm 44c6437684d64aba82d5a3de0e4bbe21d2b1f7ce)
[...]
$ cmake ../ -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -DNO_DOUBLE_PRECISION=ON && make
[...]
$ ONEAPI_DEVICE_SELECTOR=level_zero:gpu sycl-ls
Warning: ONEAPI_DEVICE_SELECTOR environment variable is set to level_zero:gpu.
To see the correct device id, please unset ONEAPI_DEVICE_SELECTOR.

[ext_oneapi_level_zero:gpu:0] Intel(R) Level-Zero, Intel(R) UHD Graphics 770 [0x4680] 1.3 [1.3.24347]

$ ONEAPI_DEVICE_SELECTOR=level_zero:gpu ./test/test-r2c --test-case='r2c 1d identity<float>'
[doctest] doctest version is "2.4.8"
[doctest] run with "--help" for options
===============================================================================
/home/aland/double-batched-fft-library/test/r2c.cpp:392:
TEST CASE:  r2c 1d identity<float>
  in-place

/home/aland/double-batched-fft-library/test/r2c.cpp:392: ERROR: test case THREW exception: exception thrown in subcase - will translate later when the whole test case has been exited (cannot translate while there is an active exception)

===============================================================================
/home/aland/double-batched-fft-library/test/r2c.cpp:392:
TEST CASE:  r2c 1d identity<float>

DEEPEST SUBCASE STACK REACHED (DIFFERENT FROM THE CURRENT ONE):
  in-place

/home/aland/double-batched-fft-library/test/r2c.cpp:392: ERROR: test case THREW exception: std::bad_alloc

===============================================================================
[doctest] test cases: 1 | 0 passed | 1 failed | 7 skipped
[doctest] assertions: 0 | 0 passed | 0 failed |
[doctest] Status: FAILURE!

The debugger shows that identity_test in https://github.com/intel/double-batched-fft-library/blob/main/test/r2c.cpp#L400 is called with garbage values of M, N, and K.

Preferred short name for the project

Hello!

This repo name, CMakeLists.txt, and the docs refer to this project as "Double-Batched FFT", which is fine, but a bit of a mouthful, especially compared to other library names (cuFFT, VkFFT, oneMKL, ...). This can be problematic when using the name on plots or in tables or simply when referring to it in documentation for an external project.

The filenames and namespace uses bbfft, which is also fine but has some problems:

  • it's not obvious that "bb fft" and "double-batched fft" refer to the same thing,
  • it's unclear how to capitalize it (BBFFT? bbfft? bbFFT?) since the code imposes its style.

Could you please advise on whether there is a recommended shorthand for referring to the project?

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.