prepare.sh 1.6 KB
Newer Older
1 2
#!/bin/bash -e

C
ChaiMind 已提交
3 4
cd $(dirname $0)

5 6 7 8 9 10 11
# force use /usr/bin/sort on windows, /c/Windows/system32/sort do not support -V
OS=$(uname -s)
SORT=sort
if [[ $OS =~ "NT" ]]; then
    SORT=/usr/bin/sort
fi

C
ChaiMind 已提交
12 13
requiredGitVersion="1.8.4"
currentGitVersion="$(git --version | awk '{print $3}')"
14
if [ "$(printf '%s\n' "$requiredGitVersion" "$currentGitVersion" | ${SORT} -V | head -n1)" = "$currentGitVersion" ]; then
C
ChaiMind 已提交
15
    echo "Please update your Git version. (foud version $currentGitVersion, required version >= $requiredGitVersion)"
S
stoneMo 已提交
16 17 18
    exit -1
fi

19
git submodule sync
20 21 22 23 24

git submodule foreach --recursive git reset --hard
git submodule foreach --recursive git clean -fd


25
git submodule update --init midout
26 27 28 29 30
git submodule update --init intel-mkl-dnn
git submodule update --init Halide
git submodule update --init protobuf
git submodule update --init flatbuffers
git submodule update --init gtest
M
Megvii Engine Team 已提交
31
git submodule update --init cutlass
32

33
git submodule update --init cpuinfo
K
konghuanjun 已提交
34 35 36 37 38 39 40 41 42 43

name=`git config --get user.name`
if [ -z "$name" ]; then
    name="default"
fi
email=`git config --get user.email`
if [ -z "$email" ]; then
    email="default"
fi

44
source ./apply-patches.sh
K
konghuanjun 已提交
45
apply_cpuinfo_patches ${name} ${email}
46

47 48 49 50 51 52 53 54 55 56 57
git submodule update --init OpenBLAS
git submodule update --init libzmq
git submodule update --init cppzmq

git submodule update --init MegRay
pushd MegRay/third_party >/dev/null
    git submodule sync
    git submodule update --init nccl
    git submodule update --init gdrcopy
    git submodule update --init ucx
popd >/dev/null
M
Megvii Engine Team 已提交
58 59

git submodule update --init pybind11
60
git submodule update --init llvm-project
61
git submodule update --init range-v3