Install FlagFFT#
Quick Start#
Clone, build, and verify in one go:
# 1. Clone
git clone https://github.com/flagos-ai/FlagFFT.git
cd FlagFFT
# 2. Initialize submodule
git submodule update --init --recursive
# 3. Build the library, CLI, and test binaries
cmake -B build -DCMAKE_BUILD_TYPE=Release \
-DFLAGFFT_BUILD_CLI=ON \
-DFLAGFFT_BUILD_TESTS=ON
cmake --build build -j$(nproc)
# 4. Install the Python codegen package (required for JIT kernel generation)
pip install .
# 5. Run the full accuracy + performance test suite
python tools/run_tests.py --combination full --gpus 0
The runner prints a live progress table and writes summary.json with per-operator accuracy (pass/fail) and performance (geometric mean speedup vs cuFFT) results.
Build Options#
Option |
Default |
Description |
|---|---|---|
|
|
Build the |
|
|
Build the C++ test suite (requires Google Test + CUDA) |
|
|
GPU backend selector (only |
|
— |
|
Build Library Only#
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j$(nproc)
This produces build/libflagfft.so.
Build Library + CLI + Tests#
cmake -B build -DCMAKE_BUILD_TYPE=Release \
-DFLAGFFT_BUILD_CLI=ON \
-DFLAGFFT_BUILD_TESTS=ON
cmake --build build -j$(nproc)
Install to System (Optional)#
After building, install the library and tools system-wide:
cmake --install build --prefix /usr/local
Installs libflagfft.so to lib/, the public header flagfft.h to include/, and flagfft-cli to bin/ (if built with -DFLAGFFT_BUILD_CLI=ON).
Use Docker#
A pre-built environment with all dependencies is available as an alternative to manual setup:
docker build -t flagfft-dev -f docker/Dockerfile .
docker run --gpus all -v $(pwd):/workspace/FlagFFT -it flagfft-dev
# Inside the container, run the build and test steps from Quick Start.
Set Environment Variables#
Variable |
Description |
|---|---|
|
Path to the Python interpreter used by JIT codegen (default: |
|
Path to the SQLite tuning database (default: |
|
Set to |