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.

README_CN.md 4.6 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. # MegEngine
  2. <p align="center">
  3. <img width="250" height="109" src="logo.png">
  4. </p>
  5. [English](README.md) | 中文
  6. MegEngine 是一个快速、可拓展、易于使用且支持自动求导的深度学习框架。
  7. ------
  8. ## 安装说明
  9. **注意:** MegEngine 现在支持在 Linux-64bit/Windows-64bit/macos-10.14及其以上 (MacOS只支持cpu) 等平台上安装 Python 包,支持Python3.5 到 Python3.8。对于 Windows 10 用户,可以通过安装 [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl) 进行体验,同时我们也原生支持Windows。MegEngine 也支持在很多其它平台上进行推理运算。
  10. ### 通过包管理器安装
  11. 通过 pip 安装的命令如下:
  12. ```bash
  13. python3 -m pip install --upgrade pip
  14. python3 -m pip install megengine -f https://megengine.org.cn/whl/mge.html
  15. ```
  16. ## 通过源码编译安装
  17. ### 环境依赖
  18. 大多数编译 MegEngine 的依赖位于 [third_party](third_party) 目录,可以通过以下命令自动安装:
  19. ```bash
  20. ./third_party/prepare.sh
  21. ./third_party/install-mkl.sh
  22. ```
  23. 但是有一些依赖需要手动安装:
  24. * [CUDA](https://developer.nvidia.com/cuda-toolkit-archive)(>=10.1), [cuDNN](https://developer.nvidia.com/cudnn)(>=7.6) ,如果需要编译支持 CUDA 的版本。
  25. * [TensorRT](https://docs.nvidia.com/deeplearning/sdk/tensorrt-archived/index.html)(>=5.1.5) ,如果需要编译支持 TensorRT 的版本。
  26. * LLVM/Clang(>=6.0) ,如果需要编译支持 Halide JIT 的版本(默认开启)。
  27. * Python(>=3.5), Numpy, SWIG(>=3.0) ,如果需要编译生成 Python 模块。
  28. ### 开始编译
  29. MegEngine使用CMake作为构建工具。我们提供以下脚本来帮助编译:
  30. * [host_build.sh](scripts/cmake-build/host_build.sh) 用于本地编译。
  31. 参数 -h 可用于查询脚本支持的参数:
  32. ```
  33. scripts/cmake-build/host_build.sh -h
  34. ```
  35. * [cross_build_android_arm_inference.sh](scripts/cmake-build/cross_build_android_arm_inference.sh) 用于ARM-安卓交叉编译。
  36. 参数 -h 可用于查询脚本支持的参数:
  37. ```
  38. scripts/cmake-build/cross_build_android_arm_inference.sh -h
  39. ```
  40. * [cross_build_linux_arm_inference.sh](scripts/cmake-build/cross_build_linux_arm_inference.sh) 用于ARM-Linux交叉编译。
  41. 参数 -h 可用于查询脚本支持的参数:
  42. ```
  43. scripts/cmake-build/cross_build_linux_arm_inference.sh -h
  44. ```
  45. * [cross_build_ios_arm_inference.sh](scripts/cmake-build/cross_build_ios_arm_inference.sh) 用于iOS交叉编译。
  46. 参数 -h 可用于查询脚本支持的参数:
  47. ```
  48. scripts/cmake-build/cross_build_ios_arm_inference.sh
  49. ```
  50. 更多细节请参考 [BUILD_README.md](scripts/cmake-build/BUILD_README.md)
  51. ## 如何参与贡献
  52. * MegEngine 依据 [贡献者公约(Contributor Covenant)](https://contributor-covenant.org)来管理开源社区。请阅读 [行为准则](CODE_OF_CONDUCT.md) 了解更多信息。
  53. * 每一名 MegEngine 的贡献者都需要签署贡献者许可协议(Contributor License Agreement,CLA)来明确贡献内容相关的知识产权许可。更多细节请参考 [协议内容](CONTRIBUTOR_LICENSE_AGREEMENT.md)。
  54. * 我们欢迎你通过以下方式来帮助 MegEngine 变得更好:
  55. * 贡献代码;
  56. * 完善[文档](https://github.com/MegEngine/Docs);
  57. * 在 [MegEngine 论坛](https://discuss.megengine.org.cn) 和 Stack Overflow 回答问题;
  58. * 在 [MegEngine Model Hub](https://github.com/megengine/hub) 贡献新模型;
  59. * 在 [MegStudio](https://studio.brainpp.com) 平台尝试新想法;
  60. * 报告使用中的 [Bugs 和 Issues](https://github.com/MegEngine/MegEngine/issues);
  61. * 审查 [Pull Requests](https://github.com/MegEngine/MegEngine/pulls);
  62. * 给 MegEngine 点亮小星星;
  63. * 在你的论文和文章中引用 MegEngine;
  64. * 向你的好友推荐 MegEngine;
  65. * ...
  66. 我们相信我们能够搭建一个开放友善的开源社区环境,用人工智能造福人类。
  67. ## 联系我们
  68. * 问题: [github.com/MegEngine/MegEngine/issues](https://github.com/MegEngine/MegEngine/issues)
  69. * 邮箱: [megengine-support@megvii.com](mailto:megengine-support@megvii.com)
  70. * 论坛: [discuss.megengine.org.cn](https://discuss.megengine.org.cn)
  71. * QQ: 1029741705
  72. * OPENI: [openi.org.cn/MegEngine](https://www.openi.org.cn/html/2020/Framework_0325/18.html)
  73. ## 资源
  74. - [MegEngine](https://megengine.org.cn)
  75. - [MegStudio](https://studio.brainpp.com)
  76. - [Brain++](https://brainpp.megvii.com)
  77. ## 开源许可
  78. MegEngine 使用 Apache License, Version 2.0
  79. Copyright (c) 2014-2021 Megvii Inc. All rights reserved.

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