Skip to content

Build on NVIDIA platform

tingxingdong edited this page Apr 20, 2018 · 1 revision

Install CUDA

Update and install hip nvcc environment

Debian repository - apt Add the ROCm apt repository

For Debian based systems, like Ubuntu, configure the Debian ROCm repository as follows:

wget -qO - http://repo.radeon.com/rocm/apt/debian/rocm.gpg.key | sudo apt-key add - sudo sh -c 'echo deb [arch=amd64] http://repo.radeon.com/rocm/apt/debian/ xenial main > /etc/apt/sources.list.d/rocm.list'

sudo apt-get update

sudo apt-get install hip_nvcc

Notice: DO NOT sudo apt-get install rocm See here for details.

Verify your installation

cd /opt/rocm/hip/bin

./hipconfig

It will shows

== hipconfig HIP_PATH : /opt/rocm/hip/bin HIP_PLATFORM : nvcc CPP_CONFIG : -D__HIP_PLATFORM_NVCC__= -I/opt/rocm/hip/bin/include -I/usr/local/cuda/include

add nvcc and /opt/rocm/hip/bin in your environment variable

Configure and build steps

Unfortunately, the install.sh has bug and cannot run on NVIDIA platform. You need to manually build rocFFT.

mkdir -p [ROCFFT_BUILD_DIR]/release
cd [ROCFFT_BUILD_DIR]/release
# Default install location is in /opt/rocm, define -DCMAKE_INSTALL_PREFIX=<path> to specify other
# Default build config is 'Release', define -DCMAKE_BUILD_TYPE=<config> to specify other
CXX=/opt/rocm/bin/hipcc ccmake [ROCFFT_SOURCE]
make -j$(nproc)
sudo make install # sudo required if installing into system directory such as /opt/rocm