# megengine/megengine

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/megengine-megengine).**

4,809 stars · 549 forks · C++ · Apache-2.0

## Links

- GitHub: https://github.com/MegEngine/MegEngine
- Homepage: https://megengine.org.cn/
- awesome-repositories: https://awesome-repositories.com/repository/megengine-megengine.md

## Description

MegEngine is a deep learning framework and automatic differentiation engine used for training and deploying neural networks. It functions as a differentiable programming library that enables the creation of mathematical models where operations are differentiable for gradient-based optimization.

The project provides a hardware-agnostic tensor runtime and cross-platform model runtime, allowing models to execute across diverse CPU and GPU hardware architectures. It utilizes a dynamic computational graph engine to build execution graphs on the fly, supporting flexible input shapes and complex control flow.

The framework covers the full AI model lifecycle, from iterative model training and validation to cross-platform deployment. It integrates an automatic differentiation pipeline to compute gradients and provides tools for exporting trained models to run efficiently across various hardware platforms.

## Tags

### Artificial Intelligence & ML

- [Automatic Differentiation Engines](https://awesome-repositories.com/f/artificial-intelligence-ml/gradient-computation/backpropagation-through-time/automatic-differentiation-engines.md) — Implements an automatic differentiation engine that computes gradients via a backward pass for model optimization.
- [Dynamic Graph Frameworks](https://awesome-repositories.com/f/artificial-intelligence-ml/computational-graph-frameworks/dynamic-graph-frameworks.md) — Builds execution graphs dynamically during the forward pass to support flexible input shapes and complex control flow.
- [Deep Learning Frameworks](https://awesome-repositories.com/f/artificial-intelligence-ml/deep-learning-frameworks.md) — Provides a complete framework for training and deploying neural networks with automatic differentiation and hardware acceleration.
- [End-to-End Model Lifecycles](https://awesome-repositories.com/f/artificial-intelligence-ml/end-to-end-model-lifecycles.md) — Provides a unified interface for the full AI model lifecycle, including training, validation, and deployment. ([source](https://www.megengine.org.cn/doc/stable/en/user-guide/index.html))
- [Hardware-Agnostic Accelerators](https://awesome-repositories.com/f/artificial-intelligence-ml/hardware-agnostic-accelerators.md) — Abstracts device-specific operations through a unified interface to execute tensors across diverse CPU and GPU accelerators.
- [Cross-Platform Deployments](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-deployment-and-serving/local-and-on-device-inference/edge-ai-model-deployment/cross-platform-deployments.md) — Exports and optimizes trained models for efficient execution across diverse hardware architectures using a unified interface.
- [Tensor Memory Management](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-optimization-and-inference/hardware-and-acceleration/tensor-computing-libraries/tensor-memory-management.md) — Manages the allocation and reuse of contiguous memory blocks to optimize large-scale matrix operations.
- [Model Training Pipelines](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-training-and-tuning/training-frameworks/model-training-pipelines.md) — Supports iterative deep learning workflows encompassing training, optimization, and performance validation.

### Part of an Awesome List

- [Differentiable Programming](https://awesome-repositories.com/f/awesome-lists/ai/differentiable-programming.md) — Allows the creation of mathematical models where all operations are differentiable for gradient-based optimization.
- [Deep Learning Frameworks](https://awesome-repositories.com/f/awesome-lists/ai/deep-learning-frameworks.md) — Provides a scalable deep learning framework with auto-differentiation.

### DevOps & Infrastructure

- [Cross-Platform Runtimes](https://awesome-repositories.com/f/devops-infrastructure/execution-environments/code-execution-runtimes/cross-platform-runtimes.md) — Provides a runtime environment for executing trained models consistently across diverse hardware architectures.

### Programming Languages & Runtimes

- [Heterogeneous Hardware Runtimes](https://awesome-repositories.com/f/programming-languages-runtimes/heterogeneous-hardware-runtimes.md) — Provides a runtime environment that executes tensor operations across diverse CPU and GPU hardware architectures.
- [Deferred Computation Graphs](https://awesome-repositories.com/f/programming-languages-runtimes/deferred-execution/lazy-evaluation/deferred-computation-graphs.md) — Defers computation until requested to enable graph-level optimizations and operator fusion.
- [Operator Dispatchers](https://awesome-repositories.com/f/programming-languages-runtimes/runtime-execution-environments/runtime-environments/runtimes/type-definition-systems/runtime-type-dispatching/universal-function-dispatchers/operator-dispatchers.md) — Routes high-level mathematical expressions to optimized low-level kernel implementations based on target hardware and data types.
