提交 589b427e 编写于 作者: Z zhanghaolong 提交者: zhanghaolong

Update README.md

上级 d5cff81c
...@@ -25,48 +25,8 @@ python3 -m pip install megengine -f https://megengine.org.cn/whl/mge.html ...@@ -25,48 +25,8 @@ python3 -m pip install megengine -f https://megengine.org.cn/whl/mge.html
## Building from Source ## Building from Source
### Prerequisites * CMake build details. please refer to [BUILD_README.md](scripts/cmake-build/BUILD_README.md)
* Python binding build details, Please refer to [BUILD_PYTHON_WHL_README.md](scripts/whl/BUILD_PYTHON_WHL_README.md)
Most of the dependencies of MegEngine are located in [third_party](third_party) directory, which can be prepared by executing:
```bash
./third_party/prepare.sh
./third_party/install-mkl.sh
```
But some dependencies need to be installed manually:
* [CUDA](https://developer.nvidia.com/cuda-toolkit-archive)(>=10.1), [cuDNN](https://developer.nvidia.com/cudnn)(>=7.6) are required when building MegEngine with CUDA support.
* [TensorRT](https://docs.nvidia.com/deeplearning/sdk/tensorrt-archived/index.html)(>=5.1.5) is required when building with TensorRT support.
* LLVM/Clang(>=6.0) is required when building with Halide JIT support.
* Python(>=3.5) and numpy are required to build Python modules.
### Build
MegEngine uses CMake as the build tool.
We provide the following scripts to facilitate building.
* [host_build.sh](scripts/cmake-build/host_build.sh) builds MegEngine that runs on the same host machine (i.e., no cross compiling).
The following command displays the usage:
```
scripts/cmake-build/host_build.sh -h
```
* [cross_build_android_arm_inference.sh](scripts/cmake-build/cross_build_android_arm_inference.sh) builds MegEngine for DNN inference on Android-ARM platforms.
The following command displays the usage:
```
scripts/cmake-build/cross_build_android_arm_inference.sh -h
```
* [cross_build_linux_arm_inference.sh](scripts/cmake-build/cross_build_linux_arm_inference.sh) builds MegEngine for DNN inference on Linux-ARM platforms.
The following command displays the usage:
```
scripts/cmake-build/cross_build_linux_arm_inference.sh -h
```
* [cross_build_ios_arm_inference.sh](scripts/cmake-build/cross_build_ios_arm_inference.sh) builds MegEngine for DNN inference on iOS (iPhone/iPad) platforms.
The following command displays the usage:
```
scripts/cmake-build/cross_build_ios_arm_inference.sh
```
Please refer to [BUILD_README.md](scripts/cmake-build/BUILD_README.md) for more details.
## How to Contribute ## How to Contribute
......
...@@ -26,52 +26,8 @@ python3 -m pip install megengine -f https://megengine.org.cn/whl/mge.html ...@@ -26,52 +26,8 @@ python3 -m pip install megengine -f https://megengine.org.cn/whl/mge.html
## 通过源码编译安装 ## 通过源码编译安装
### 环境依赖 * CMake编译细节请参考 [BUILD_README.md](scripts/cmake-build/BUILD_README.md)
* Python绑定编译细节请参考 [BUILD_PYTHON_WHL_README.md](scripts/whl/BUILD_PYTHON_WHL_README.md)
大多数编译 MegEngine 的依赖位于 [third_party](third_party) 目录,可以通过以下命令自动安装:
```bash
./third_party/prepare.sh
./third_party/install-mkl.sh
```
但是有一些依赖需要手动安装:
* [CUDA](https://developer.nvidia.com/cuda-toolkit-archive)(>=10.1), [cuDNN](https://developer.nvidia.com/cudnn)(>=7.6) ,如果需要编译支持 CUDA 的版本。
* [TensorRT](https://docs.nvidia.com/deeplearning/sdk/tensorrt-archived/index.html)(>=5.1.5) ,如果需要编译支持 TensorRT 的版本。
* LLVM/Clang(>=6.0) ,如果需要编译支持 Halide JIT 的版本(默认开启)。
* Python(>=3.5), Numpy, SWIG(>=3.0) ,如果需要编译生成 Python 模块。
### 开始编译
MegEngine使用CMake作为构建工具。我们提供以下脚本来帮助编译:
* [host_build.sh](scripts/cmake-build/host_build.sh) 用于本地编译。
参数 -h 可用于查询脚本支持的参数:
```
scripts/cmake-build/host_build.sh -h
```
* [cross_build_android_arm_inference.sh](scripts/cmake-build/cross_build_android_arm_inference.sh) 用于ARM-安卓交叉编译。
参数 -h 可用于查询脚本支持的参数:
```
scripts/cmake-build/cross_build_android_arm_inference.sh -h
```
* [cross_build_linux_arm_inference.sh](scripts/cmake-build/cross_build_linux_arm_inference.sh) 用于ARM-Linux交叉编译。
参数 -h 可用于查询脚本支持的参数:
```
scripts/cmake-build/cross_build_linux_arm_inference.sh -h
```
* [cross_build_ios_arm_inference.sh](scripts/cmake-build/cross_build_ios_arm_inference.sh) 用于iOS交叉编译。
参数 -h 可用于查询脚本支持的参数:
```
scripts/cmake-build/cross_build_ios_arm_inference.sh
```
更多细节请参考 [BUILD_README.md](scripts/cmake-build/BUILD_README.md)
## 如何参与贡献 ## 如何参与贡献
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册