70e18827a6
Change-Id: I638afb4c7f0b96df3f0c1cc0b3bf04ab57692d27
1.2 KiB
1.2 KiB
Prerequisites
- Install mesa-common-dev
- Either build or install COMGR, CLANG and Device Library
Getting the source code
git clone -b rocm-4.4.x https://github.com/ROCm-Developer-Tools/hipamd.git
git clone -b rocm-4.4.x https://github.com/ROCm-Developer-Tools/hip.git
git clone -b rocm-4.4.x https://github.com/ROCm-Developer-Tools/ROCclr.git
git clone -b rocm-4.4.x 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 AMDHIP
Commands to build amdhip 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 source codes. By default, release version of AMDHIP is built.