prepare.sh 1.4 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 34 35 36
git submodule update --init cpuinfo
source ./apply-patches.sh
apply_cpuinfo_patches

37 38 39 40 41 42 43 44 45 46 47
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 已提交
48 49

git submodule update --init pybind11
50
git submodule update --init llvm-project