MegEngine 是基于计算图的深度神经网络学习框架

网友投稿 637 2022-11-01

MegEngine 是基于计算图的深度神经网络学习框架

MegEngine 是基于计算图的深度神经网络学习框架

MegEngine

English | 中文

MegEngine is a fast, scalable and easy-to-use deep learning framework, with auto-differentiation.

Installation

NOTE: MegEngine now only supports Linux platform with python 3.5 or higher. On Windows 10 you could try WSL(Windows Subsystem for Linux) to use Linux within Windows.

Binaries

Commands to install from binaries via pip wheels are as follows:

pip3 install megengine -f https://megengine.org-/whl/mge.html

Build from Source

Prerequisites

Most of the dependencies of MegEngine are located in third_party directory, and you do not need to install these by yourself. you can prepare these repositories by executing:

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

But some dependencies should be manually installed:

CUDA(>=10.1), cuDNN(>=7.6)are required when building MegEngine with CUDA support (default ON)TensorRT(>=5.1.5) is required when building with TensorRT support (default ON)LLVM/Clang(>=6.0) is required when building with Halide JIT support (default ON)Python(>=3.5), Numpy, SWIG(>=3.0) are required to build Python modules. (default ON)

Build

MegEngine prefers Out-Of-Source flavor, and compile in a mostly-static way. Here are the instructions:

Make a directory for the build.mkdir -p buildcd build Generate build configurations by CMake. For CUDA build:cmake .. -DMGE_WITH_TEST=ON For CPU only build, use -DMGE_WITH_CUDA=OFF:cmake .. -DMGE_WITH_CUDA=OFF -DMGE_WITH_TEST=ON For deployment with C++ only, use -DMGE_INFERENCE_ONLY=ON, and turn off test with -DMGE_WITH_TEST=OFF:cmake .. -DMGE_INFERENCE_ONLY=ON -DMGE_WITH_TEST=OFF Use -DCMAKE_INSTALL_PREFIX=YOUR_PATH to specify the install path. Start to build.make -j$(nproc) [optional] Install the library if compiled for deployment at step 2.make install

Here are some other useful options for the build.

MGE_ARCH specifies which arch MegEngine are building for. (default AUTO)MGE_WITH_DISTRIBUTED if multiple machine distributed support is enabled. (default ON)MGE_WITH_PYTHON_MODULE if build python module. (default ON)MGE_BLAS chooses MKL or OpenBLAS as BLAS library for MegEngine. (default MKL)MGE_CUDA_GENCODE supplies the -gencode option for nvcc. (default not supply)MGE_DISABLE_FLOAT16 if disable float16 support. (default OFF)MGE_ENABLE_EXCEPTIONS if enable exception support in C++. (default ON)MGE_ENABLE_LOGGING if enable logging in MegEngine. (default AUTO)

More options can be found by:

cd buildcmake -LAH .. 2>/dev/null| grep -B 1 'MGE_' | less

How to Contribute

MegEngine adopts Contributor Covenant to maintain our community. Please read the Code of Conduct to get more information.Every contributor of MegEngine must sign a Contributor License Agreement (CLA) to clarify the intellectual property license granted with the contributions. For more details, please refer Contributor License AgreementYou can help MegEngine better in many ways: Write code.Improve documentation.Answer questions on MegEngine Forum, or Stack Overflow.Contribute new models in MegEngine Model Hub.Try a new idea on MegStudio.Report or investigate bugs and issues.Review Pull Requests.Star MegEngine repo.Reference MegEngine in your papers and articles.Recommend MegEngine to your friends....

We believe we can build an open and friendly community and power humanity with AI.

How to contact us

Issue: github.com/MegEngine/MegEngine/issuesEmail: megengine-support@megvii.comForum: discuss.megengine.org-QQ: 1029741705OPENI: openi.org-/MegEngine

Resources

MegEngineMegStudioBrain++

License

MegEngine is Licensed under the Apache License, Version 2.0

Copyright (c) 2014-2020 Megvii Inc. All rights reserved.

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:EmojiPickerUI - 为iPadOS实现一个macOS风格的表情挑选器框架
下一篇:LightCTR:一个轻量级的CTR 预估机器学习开源框架
相关文章

 发表评论

暂时没有评论,来抢沙发吧~