Build and install hipFFT and hipFFTW from source#
To build hipFFT as part of the ROCm Core SDK, see TheRock build instructions. TheRock is the recommended way to build ROCm components from source.
Alternatively, you can build hipFFT standalone using the following instructions.
Building hipFFT and hipFFTW from source#
hipFFT and hipFFTW require a ROCm-enabled platform. For more information, see the ROCm compatibility matrix.
To build hipFFT and hipFFTW from source, follow these steps:
Install the library build dependencies:
On AMD platforms, install rocFFT. To build hipFFT and hipFFTW from source, rocFFT must be installed with the development headers. These headers can be added by installing the
rocfft-devorrocfft-develpackage. If rocFFT was built from source, then these headers are already included.Install the client build dependencies for the clients:
The clients that are included with the source code, including samples and tests, depend on hipRAND, FFTW, and GoogleTest.
Build hipFFT and hipFFTW:
To show all build options, run these commands from the
rocm-libraries/projects/hipfftdirectory:mkdir build && cd build cmake -LH ..
Here are some CMake build examples for AMD GPUs:
Building a project using HIP language APIs and hipFFT (or hipFFTW) with the standard host compiler:
cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -L ..
Building a project using HIP language APIs, hipFFT (or hipFFTW), and device kernels with HIP-Clang:
cmake -DCMAKE_CXX_COMPILER=amdclang++ -DCMAKE_BUILD_TYPE=Release -DBUILD_CLIENTS=ON -L ..
Note
The
-DBUILD_CLIENTS=ONoption is only allowed with the amdclang++ or HIPCC compilers.