Files
rocm-systems/hipamd/INSTALL.md
T
Rahul Garg ba0220578e SWDEV-288929 - Fix typo
Change-Id: I56acb7ce3021304b2cd2c8bc2b840cbdcdefd072
2021-07-23 07:10:31 -04:00

1.3 KiB

Prerequisites

Getting the source code

git clone -b develop https://github.com/ROCm-Developer-Tools/hipamd.git
git clone -b develop https://github.com/ROCm-Developer-Tools/hip.git
git clone -b develop https://github.com/ROCm-Developer-Tools/ROCclr.git
git clone -b develop https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime.git

Set the environment variables

export HIPAMD_DIR="$(readlink -f hipamd)"
export HIP_DIR="$(readlink -f hip)"
export ROCclr_DIR="$(readlink -f ROCclr)"
export OPENCL_DIR="$(readlink -f ROCm-OpenCL-Runtime)"

Build HIPAMD

Commands to build hipamd are as following,

cd "$HIPAMD_DIR"
mkdir -p build; cd build
cmake -DHIP_COMMON_DIR=$HIP_DIR -DAMD_OPENCL_PATH=$OPENCL_DIR -DROCCLR_PATH=$ROCCLR_DIR -DCMAKE_PREFIX_PATH="/opt/rocm/" -DCMAKE_INSTALL_PREFIX=$PWD/install ..
make -j$(nproc)
sudo make install

Note, HIP_COMMON_DIR looks for hip common (HIP) source codes. By default, release version of hipamd is built.