hipFFT is an FFT marshalling library that supports rocFFT and cuFFT backends.
hipFFT exports an interface that doesn't require the client to change, regardless of the chosen backend. It sits between your application and the backend FFT library, where it marshals inputs to the backend and marshals results back to your application.
Note
The published hipFFT documentation is available at hipFFT in an organized, easy-to-read format, with search and a table of contents. The documentation source files reside in the hipFFT/docs folder of this repository. As with all ROCm projects, the documentation is open source. For more information, see Contribute to ROCm documentation.
To build our documentation locally, run the following code:
cd docs
pip3 install -r sphinx/requirements.txt
python3 -m sphinx -T -E -b html -d _build/doctrees -D language=en . _build/html
You can download pre-built packages from the ROCm package servers.
If you're using Ubuntu, you can run: sudo apt update && sudo apt install hipfft
.
To build hipFFT from source, follow these steps:
-
Install the library build dependencies:
-
Install the client build dependencies:
- The clients (samples, tests, etc) included with the hipFFT source depend on hipRAND, FFTW and GoogleTest.
-
Build hipFFT:
To show all build options:
mkdir build && cd build cmake -LH ..
Here are some CMake build examples:
- AMD GPU
- Case: Build a project using HIP language APIs + hipFFT with standard host compiler
- Code:
cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -L ..
- Code:
- Case: Build a project using HIP language APIs + hipFFT + device kernels with HIP-Clang
- Code:
cmake -DCMAKE_CXX_COMPILER=amdclang++ -DCMAKE_BUILD_TYPE=Release -DBUILD_CLIENTS=ON -L ..
- Code:
- Case: Build a project using HIP language APIs + hipFFT with standard host compiler
- NVIDIA GPU
- Case: Build a project using HIP language APIs + hipFFT with standard host compiler
- Code:
cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -DBUILD_WITH_LIB=CUDA -L ..
- Code:
- Case: Build a project using HIP language APIs + hipFFT + device kernels with HIP-NVCC
- Code:
HIP_PLATFORM=nvidia cmake -DCMAKE_CXX_COMPILER=hipcc -DCMAKE_BUILD_TYPE=Release -DBUILD_CLIENTS=ON -L ..
- Code:
- Case: Build a project using HIP language APIs + hipFFT with standard host compiler
The `-DBUILD_CLIENTS=ON` option is only allowed with the amdclang++ or HIPCC compilers.
If you have existing CUDA code and want to transition to HIP, follow these steps:
- HIPIFY your code and fix all unsupported CUDA features and user-defined macros
- Build with HIP-NVCC to run on an NVIDIA device
- Build with HIP-Clang to run on an AMD device
More information about porting to HIP is available in the HIP porting guide.
You can report bugs and feature requests through the GitHub issue tracker.
If you want to contribute to hipFFT, you must follow our contribution guidelines.