git clone --depth=1 https://github.com/RadeonOpenCompute/rocm-cmake.git && \
mkdir ' rocm-cmake/build' && pushd " $_ " && \
cmake -DCMAKE_INSTALL_PREFIX=' /opt/rocm' .. && \
cmake --build . && \
sudo cmake --install . && \
popd
Install ROCT-Thunk-Interface
git clone -b roc-3.6.x --depth=1 https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface.git && \
mkdir ' ROCT-Thunk-Interface/build' && pushd " $_ " && \
cmake -DCMAKE_INSTALL_PREFIX=' /opt/rocm' .. && \
cmake --build . && \
sudo cmake --install . && \
sudo cp -r ' ../include' ' /opt/rocm/' && \
popd
git clone -b rocm-3.6.x --depth=1 https://github.com/RadeonOpenCompute/ROCR-Runtime.git && \
mkdir ' ROCR-Runtime/src/build' && pushd " $_ " && \
cmake -DCMAKE_INSTALL_PREFIX=' /opt/rocm' -DHSAKMT_INC_PATH=' /opt/rocm/include' -DHSAKMT_LIB_PATH=' /opt/rocm/lib64' .. && \
cmake --build . && \
sudo cmake --install . && \
popd
git clone --depth=1 https://github.com/RadeonOpenCompute/rocminfo.git && \
mkdir ' rocminfo/build' && pushd " $_ " && \
cmake -DCMAKE_INSTALL_PREFIX=' /opt/rocm' -DROCM_DIR=' /opt/rocm' .. && \
cmake --build . && \
sudo cmake --install . && \
popd
Install ROCM LLVM / CLang
git clone -b amd-stg-open --depth=1 https://github.com/RadeonOpenCompute/llvm-project.git && \
mkdir ' llvm-project/build' && pushd " $_ " && \
cmake -DCMAKE_BUILD_TYPE=' Release' -DCMAKE_INSTALL_PREFIX=' /opt/rocm/llvm' -DLLVM_ENABLE_ASSERTIONS=1 -DLLVM_TARGETS_TO_BUILD=' AMDGPU;X86' -DLLVM_ENABLE_PROJECTS=' compiler-rt;lld;clang' ../llvm && \
cmake --build . && \
sudo cmake --install . && \
popd
git clone -b amd-stg-open --depth=1 http://github.com/RadeonOpenCompute/ROCm-Device-Libs.git && \
mkdir ' ROCm-Device-Libs/build' && pushd " $_ " && \
export PATH=' /opt/rocm/llvm/bin:' " $PATH " && \
cmake -DCMAKE_INSTALL_PREFIX=' /opt/rocm' .. && \
cmake --build . && \
sudo cmake --install . && \
popd
Install ROCm-CompilerSupport
git clone -b amd-stg-open --depth=1 https://github.com/RadeonOpenCompute/ROCm-CompilerSupport && \
export PATH=' /opt/rocm/llvm/bin:' " $PATH " && \
mkdir ' ROCm-CompilerSupport/lib/comgr/build' && pushd " $_ " && \
cmake -DCMAKE_INSTALL_PREFIX=' /opt/rocm' .. && \
cmake --build . && \
sudo cmake --install . && \
popd
git clone -b roc-3.6.x --depth=1 https://github.com/ROCm-Developer-Tools/ROCclr.git && \
git clone -b roc-3.6.x --depth=1 https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime.git && \
\
export ROCclr_DIR=" $( readlink -f ROCclr) " && \
export OPENCL_DIR=" $( readlink -f ROCm-OpenCL-Runtime) " && \
\
mkdir -p " $ROCclr_DIR " ' /build' && pushd " $_ " && \
cmake -DOPENCL_DIR=" $OPENCL_DIR " -DCMAKE_INSTALL_PREFIX=' /opt/rocm/rocclr' .. && \
cmake --build . --parallel $( nproc) && \
sudo cmake --install . && \
popd
git clone -b roc-3.6.x https://github.com/ROCm-Developer-Tools/HIP.git && \
mkdir ' HIP/build' && pushd " $_ " && \
cmake -DCMAKE_BUILD_TYPE=' Release' -DHIP_COMPILER=' clang' -DHIP_PLATFORM=' rocclr' -DCMAKE_PREFIX_PATH=' /opt/rocm' -DCMAKE_INSTALL_PREFIX=' /opt/rocm' .. && \
cmake --build . && \
sudo cmake --install . && \
popd
pushd ' HIP/samples/0_Intro/square' && \
export HIP_PATH=' /opt/rocm' && \
cmake --build . && \
popd