README.md 4.6 KB
Newer Older
1 2
# MegEngine

Z
zhanghaolong 已提交
3 4 5
<p align="center">
  <img width="250" height="109" src="logo.png">
</p>
6 7 8

English | [中文](README_CN.md)

W
wenjuan 已提交
9
MegEngine is a fast, scalable and easy-to-use deep learning framework, with auto-differentiation.
10 11 12 13 14

------

## Installation

J
jiakai 已提交
15
**NOTE:** MegEngine now supports Python installation on Linux-64bit/Windows-64bit/MacOS(CPU-Only)-10.14+ platforms with Python from 3.5 to 3.8. On Windows 10 you can either install the Linux distribution through [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl) or install the Windows distribution directly. Many other platforms are supported for inference.
16 17 18

### Binaries

J
jiakai 已提交
19
To install the pre-built binaries via pip wheels:
20 21

```bash
Z
zhanghaolong 已提交
22
python3 -m pip install --upgrade pip
Z
zhanghaolong 已提交
23
python3 -m pip install megengine -f https://megengine.org.cn/whl/mge.html
24 25
```

J
jiakai 已提交
26
## Building from Source
27 28 29

### Prerequisites

J
jiakai 已提交
30
Most of the dependencies of MegEngine are located in [third_party](third_party) directory, which can be prepared by executing:
31 32 33 34 35 36

```bash
./third_party/prepare.sh
./third_party/install-mkl.sh
```

J
jiakai 已提交
37
But some dependencies need to be installed manually:
38

J
jiakai 已提交
39
* [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.
Z
zhanghaolong 已提交
40 41
* [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.
J
jiakai 已提交
42
* Python(>=3.5) and numpy are required to build Python modules.
43 44 45

### Build

Z
zhanghaolong 已提交
46 47 48
MegEngine uses CMake as the build tool.
We provide the following scripts to facilitate building.

J
jiakai 已提交
49 50
* [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:
Z
zhanghaolong 已提交
51 52 53
  ```
  scripts/cmake-build/host_build.sh -h
  ```
J
jiakai 已提交
54 55
* [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:
Z
zhanghaolong 已提交
56 57 58
  ```
  scripts/cmake-build/cross_build_android_arm_inference.sh -h
  ```
J
jiakai 已提交
59 60
* [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:
Z
zhanghaolong 已提交
61 62 63
  ```
  scripts/cmake-build/cross_build_linux_arm_inference.sh -h
  ```
J
jiakai 已提交
64 65
* [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:
Z
zhanghaolong 已提交
66 67 68 69
  ```
  scripts/cmake-build/cross_build_ios_arm_inference.sh
  ```
Please refer to [BUILD_README.md](scripts/cmake-build/BUILD_README.md) for more details.
70 71 72

## How to Contribute

J
jiakai 已提交
73 74
* MegEngine adopts [Contributor Covenant](https://contributor-covenant.org) as a guideline to run our community. Please read the [Code of Conduct](CODE_OF_CONDUCT.md).
* Every contributor of MegEngine must sign a [Contributor License Agreement (CLA)](CONTRIBUTOR_LICENSE_AGREEMENT.md) to clarify the intellectual property license granted with the contributions.
J
Json Lee 已提交
75
* You can help to improve MegEngine in many ways:
76 77 78 79 80 81 82 83
    * Write code.
    * Improve [documentation](https://github.com/MegEngine/Docs).
    * Answer questions on [MegEngine Forum](https://discuss.megengine.org.cn), or Stack Overflow.
    * Contribute new models in [MegEngine Model Hub](https://github.com/megengine/hub).
    * Try a new idea on [MegStudio](https://studio.brainpp.com).
    * Report or investigate [bugs and issues](https://github.com/MegEngine/MegEngine/issues).
    * Review [Pull Requests](https://github.com/MegEngine/MegEngine/pulls).
    * Star MegEngine repo.
J
jiakai 已提交
84
    * Cite MegEngine in your papers and articles.
85
    * Recommend MegEngine to your friends.
J
jiakai 已提交
86
    * Any other form of contribution is welcomed.
87

J
jiakai 已提交
88
We strive to build an open and friendly community. We aim to power humanity with AI.
89

J
jiakai 已提交
90
## How to Contact Us
91 92 93 94

* Issue: [github.com/MegEngine/MegEngine/issues](https://github.com/MegEngine/MegEngine/issues)
* Email: [megengine-support@megvii.com](mailto:megengine-support@megvii.com)
* Forum: [discuss.megengine.org.cn](https://discuss.megengine.org.cn)
Z
zhanghaolong 已提交
95
* QQ Group: 1029741705
W
wenjuan 已提交
96
* OPENI: [openi.org.cn/MegEngine](https://www.openi.org.cn/html/2020/Framework_0325/18.html)
97 98 99 100 101 102 103 104 105

## Resources

- [MegEngine](https://megengine.org.cn)
- [MegStudio](https://studio.brainpp.com)
- [Brain++](https://brainpp.megvii.com)

## License

J
Json Lee 已提交
106
MegEngine is licensed under the Apache License, Version 2.0
107

J
jiakai 已提交
108
Copyright (c) 2014-2021 Megvii Inc. All rights reserved.