Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to using cmake --build and custom path #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions 00.rocm-core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,17 @@ cmake \
-DPROJECT_VERSION_PATCH=${ROCM_PATCH_VERSION} \
-DROCM_PATCH_VERSION=${ROCM_LIBPATCH_VERSION} \
-DROCM_BUILD_VERSION=${CPACK_DEBIAN_PACKAGE_RELEASE} \
-B build \
$ROCM_BUILD_DIR/../src/rocm-core
make package
sudo dpkg -i *.deb

if [[ $1 = "--cmake-install" ]]; then
echo "Cmake install into ${ROCM_INSTALL_DIR}"
cmake --build build --target install
else
echo "deb package install"
cmake --build build --target package
sudo dpkg -i *.deb
fi

END_TIME=`date +%s`
EXECUTING_TIME=`expr $END_TIME - $START_TIME`
Expand Down
13 changes: 10 additions & 3 deletions 11.rocm-llvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,17 @@ cmake \
-DPACKAGE_VERSION=14.0.0.22204.${ROCM_LIBPATCH_VERSION}-${CPACK_DEBIAN_PACKAGE_RELEASE} \
-DCPACK_DEBIAN_FILE_NAME=DEB-DEFAULT \
-G Ninja \
-B build \
$ROCM_GIT_DIR/llvm-project/llvm
ninja
ninja package
sudo dpkg -i *.deb

if [[ $1 = "--cmake-install" ]]; then
echo "Cmake install into ${ROCM_INSTALL_DIR}"
cmake --build build --target install
else
echo "deb package install"
cmake --build build --target package
sudo dpkg -i *.deb
fi

END_TIME=`date +%s`
EXECUTING_TIME=`expr $END_TIME - $START_TIME`
Expand Down
13 changes: 10 additions & 3 deletions 12.roct-thunk-interface.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,17 @@ cmake \
-DCPACK_PACKAGING_INSTALL_PREFIX=$ROCM_INSTALL_DIR \
-DCPACK_GENERATOR=DEB \
-G "Ninja" \
-B build \
$ROCM_GIT_DIR/ROCT-Thunk-Interface/
ninja
ninja package
sudo dpkg -i *.deb

if [[ $1 = "--cmake-install" ]]; then
echo "Cmake install into ${ROCM_INSTALL_DIR}"
cmake --build build --target install
else
echo "deb package install"
cmake --build build --target package
sudo dpkg -i *.deb
fi

END_TIME=`date +%s`
EXECUTING_TIME=`expr $END_TIME - $START_TIME`
Expand Down
13 changes: 10 additions & 3 deletions 13.rocm-cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,17 @@ cmake \
-DCPACK_PACKAGING_INSTALL_PREFIX=$ROCM_INSTALL_DIR \
-DCPACK_GENERATOR=DEB \
-G Ninja \
-B build \
$ROCM_GIT_DIR/rocm-cmake
ninja
ninja package
sudo dpkg -i *.deb

if [[ $1 = "--cmake-install" ]]; then
echo "Cmake install into ${ROCM_INSTALL_DIR}"
cmake --build build --target install
else
echo "deb package install"
cmake --build build --target package
sudo dpkg -i *.deb
fi

END_TIME=`date +%s`
EXECUTING_TIME=`expr $END_TIME - $START_TIME`
Expand Down
13 changes: 10 additions & 3 deletions 14.rocm-device-libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,17 @@ cmake \
-DCPACK_PACKAGING_INSTALL_PREFIX=$ROCM_INSTALL_DIR \
-DCPACK_GENERATOR=DEB \
-G Ninja \
-B build \
$ROCM_GIT_DIR/ROCm-Device-Libs
ninja
ninja package
sudo dpkg -i *.deb

if [[ $1 = "--cmake-install" ]]; then
echo "Cmake install into ${ROCM_INSTALL_DIR}"
cmake --build build --target install
else
echo "deb package install"
cmake --build build --target package
sudo dpkg -i *.deb
fi

END_TIME=`date +%s`
EXECUTING_TIME=`expr $END_TIME - $START_TIME`
Expand Down
13 changes: 10 additions & 3 deletions 15.rocr-runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,17 @@ cmake \
-DCPACK_PACKAGING_INSTALL_PREFIX=$ROCM_INSTALL_DIR \
-DCPACK_GENERATOR=DEB \
-G Ninja \
-B build \
$ROCM_GIT_DIR/ROCR-Runtime/src
ninja
ninja package
sudo dpkg -i *.deb

if [[ $1 = "--cmake-install" ]]; then
echo "Cmake install into ${ROCM_INSTALL_DIR}"
cmake --build build --target install
else
echo "deb package install"
cmake --build build --target package
sudo dpkg -i *.deb
fi

END_TIME=`date +%s`
EXECUTING_TIME=`expr $END_TIME - $START_TIME`
Expand Down
13 changes: 10 additions & 3 deletions 16.rocminfo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,17 @@ cmake \
-DCPACK_PACKAGING_INSTALL_PREFIX=$ROCM_INSTALL_DIR \
-DCPACK_GENERATOR=DEB \
-G Ninja \
-B build \
$ROCM_GIT_DIR/rocminfo
ninja
ninja package
sudo dpkg -i *.deb

if [[ $1 = "--cmake-install" ]]; then
echo "Cmake install into ${ROCM_INSTALL_DIR}"
cmake --build build --target install
else
echo "deb package install"
cmake --build build --target package
sudo dpkg -i *.deb
fi

END_TIME=`date +%s`
EXECUTING_TIME=`expr $END_TIME - $START_TIME`
Expand Down
13 changes: 10 additions & 3 deletions 17.rocm-compilersupport.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,17 @@ cmake \
-DCPACK_PACKAGING_INSTALL_PREFIX=$ROCM_INSTALL_DIR \
-DCPACK_GENERATOR=DEB \
-G Ninja \
-B build \
$ROCM_GIT_DIR/ROCm-CompilerSupport/lib/comgr
ninja
ninja package
sudo dpkg -i *.deb

if [[ $1 = "--cmake-install" ]]; then
echo "Cmake install into ${ROCM_INSTALL_DIR}"
cmake --build build --target install
else
echo "deb package install"
cmake --build build --target package
sudo dpkg -i *.deb
fi

END_TIME=`date +%s`
EXECUTING_TIME=`expr $END_TIME - $START_TIME`
Expand Down
23 changes: 17 additions & 6 deletions 18.hip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,35 @@ HIP_DIR=$ROCM_GIT_DIR/HIP

START_TIME=`date +%s`

# There are some perl scripts that require this envar
HIP_CLANG_PATH="$ROCM_INSTALL_DIR/llvm/bin" \
cmake \
-DOFFLOAD_ARCH_STR="$AMDGPU_TARGETS" \
-DHIP_CLANG_PATH="$ROCM_INSTALL_DIR/llvm/bin" \
-DCMAKE_INSTALL_PREFIX=$ROCM_INSTALL_DIR \
-DHIP_COMMON_DIR="$HIP_DIR" \
-DAMD_OPENCL_PATH="$OPENCL_DIR" \
-DROCCLR_PATH="$ROCCLR_DIR" \
-DCMAKE_PREFIX_PATH="$ROCM_INSTALL_DIR" \
-DCMAKE_BUILD_TYPE=Release \
-DCPACK_GENERATOR=DEB \
-DROCM_PATCH_VERSION=50100 \
-DCMAKE_INSTALL_PREFIX=$ROCM_BUILD_DIR/hip/install \
-DROCM_PATH="$ROCM_INSTALL_DIR" \
-DCMAKE_INSTALL_PREFIX=$ROCM_INSTALL_DIR \
-D__HIP_ENABLE_PCH=OFF \
-G Ninja \
-B build \
$ROCM_GIT_DIR/hipamd

ninja
# sudo ninja install
ninja package
# sudo dpkg -i *.deb
sudo dpkg -i hip-dev*.deb hip-doc*.deb hip-runtime-amd*.deb hip-samples*.deb
if [[ $1 = "--cmake-install" ]]; then
echo "Cmake install into ${CMAKE_INSTALL_PREFIX}"
cmake --build build --target install
else
echo "deb package install"
cmake --build build
cmake --build build --target package
sudo dpkg -i hip-dev*.deb hip-doc*.deb hip-runtime-amd*.deb hip-samples*.deb
fi

END_TIME=`date +%s`
EXECUTING_TIME=`expr $END_TIME - $START_TIME`
Expand Down