Skip to content

Commit

Permalink
Auto-checkout submodules, auto-patch variant for HIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Prather committed Jan 22, 2024
1 parent 4973132 commit f82cca0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,12 @@ fi
# delete the build directory
if [[ "$ARGS" == *"clean"* ]]; then

# Should do this manually when compiling on backend nodes!
if [ ! -f external/parthenon/CMakeLists.txt ]; then
git submodule update --recursive --init
fi

# Patch parthenon to use KHARMA's coordinates, anything incidental
cd external/parthenon
if [[ $(( $(git --version | cut -d '.' -f 2) > 35 )) == "1" ]]; then
git apply --quiet ../patches/parthenon-*.patch
Expand All @@ -293,6 +299,18 @@ if [[ "$ARGS" == *"clean"* ]]; then
fi
cd -

# HIP requires device-capable variant functions
if [[ "$ARGS" == *"hip"* ]]; then
cd external/variant
if [[ $(( $(git --version | cut -d '.' -f 2) > 35 )) == "1" ]]; then
git apply --quiet ../patches/variant-hip.patch
else
git apply ../patches/variant-hip.patch
fi
cd -
fi


rm -rf build
fi
mkdir -p build
Expand Down

0 comments on commit f82cca0

Please # to comment.