You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

prepare.sh 1.9 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #!/bin/bash -e
  2. cd $(dirname $0)
  3. source ../ci/utils.sh
  4. # force use /usr/bin/sort on windows, /c/Windows/system32/sort do not support -V
  5. OS=$(uname -s)
  6. SORT=sort
  7. if [[ $OS =~ "NT" ]]; then
  8. SORT=/usr/bin/sort
  9. fi
  10. requiredGitVersion="1.8.4"
  11. currentGitVersion="$(git --version | awk '{print $3}')"
  12. if [ "$(printf '%s\n' "$requiredGitVersion" "$currentGitVersion" | ${SORT} -V | head -n1)" = "$currentGitVersion" ]; then
  13. echo "Please update your Git version. (foud version $currentGitVersion, required version >= $requiredGitVersion)"
  14. exit -1
  15. fi
  16. log "Start downloading git submodules"
  17. git submodule sync
  18. git submodule update -f --init midout
  19. git submodule update -f --init intel-mkl-dnn
  20. git submodule update -f --init HalidePrebuilt
  21. git submodule update -f --init Halide
  22. git submodule update -f --init protobuf
  23. git submodule update -f --init gtest
  24. git submodule update -f --init flatbuffers
  25. git submodule update -f --init cutlass
  26. git submodule update -f --init Json
  27. git submodule update -f --init cpuinfo
  28. name=`git config --get user.name`
  29. if [ -z "$name" ]; then
  30. name="default"
  31. fi
  32. email=`git config --get user.email`
  33. if [ -z "$email" ]; then
  34. email="default"
  35. fi
  36. source ./apply-patches.sh
  37. apply_cpuinfo_patches ${name} ${email}
  38. git submodule update -f --init OpenBLAS
  39. if [[ ! -d mkl/$(uname -m) ]]; then
  40. git submodule update -f --init mkl
  41. fi
  42. git submodule update -f --init libzmq
  43. git submodule update -f --init cppzmq
  44. git submodule update -f --init MegRay
  45. pushd MegRay/third_party >/dev/null
  46. git submodule sync
  47. git submodule update -f --init nccl
  48. git submodule update -f --init gdrcopy
  49. git submodule update -f --init ucx
  50. git submodule update -f --init rccl
  51. popd >/dev/null
  52. git submodule update -f --init pybind11
  53. git submodule update -f --init llvm-project
  54. git submodule update -f --init mc40
  55. git submodule update -f --init range-v3
  56. log "Finished downloading git submodules"

MegEngine 安装包中集成了使用 GPU 运行代码所需的 CUDA 环境,不用区分 CPU 和 GPU 版。 如果想要运行 GPU 程序,请确保机器本身配有 GPU 硬件设备并安装好驱动。 如果你想体验在云端 GPU 算力平台进行深度学习开发的感觉,欢迎访问 MegStudio 平台