diff --git a/README.md b/README.md index cc2424b5406d72d489e98c9f6bd979013bb94002..1463209214cd881a0309e880330fb763106b90c0 100644 --- a/README.md +++ b/README.md @@ -1,313 +1,116 @@ -![MindSpore Logo](https://gitee.com/mindspore/mindspore/raw/master/docs/MindSpore-logo.png "MindSpore logo") -[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mindspore.svg)](https://pypi.org/project/mindspore) -[![PyPI](https://badge.fury.io/py/mindspore.svg)](https://badge.fury.io/py/mindspore) -[![Downloads](https://static.pepy.tech/badge/mindspore)](https://pepy.tech/project/mindspore) -[![DockerHub](https://img.shields.io/docker/pulls/mindspore/mindspore-cpu.svg)](https://hub.docker.com/r/mindspore/mindspore-cpu) -[![LICENSE](https://img.shields.io/github/license/mindspore-ai/mindspore.svg?style=flat-square)](https://github.com/mindspore-ai/mindspore/blob/master/LICENSE) -[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://gitee.com/mindspore/mindspore/pulls) -[查看中文](./README_CN.md) +MindSpore 是一个开源的深度学习训练与推理框架,适用于移动、边缘和云场景。它提供友好的设计和高效的执行,支持 Ascend AI 处理器,并实现软硬件协同优化。 - +## 安装 -- [What Is MindSpore](#what-is-mindspore) - - [Automatic Differentiation](#automatic-differentiation) - - [Automatic Parallel](#automatic-parallel) -- [Installation](#installation) - - [Pip mode method installation](#pip-mode-method-installation) - - [Source code compilation installation](#source-code-compilation-installation) - - [Docker Image](#docker-image) -- [Quickstart](#quickstart) -- [Docs](#docs) -- [Community](#community) - - [Governance](#governance) - - [Communication](#communication) -- [Contributing](#contributing) -- [Maintenance phases](#maintenance-phases) -- [Maintenance status](#maintenance-status) -- [Release Notes](#release-notes) -- [License](#license) +### 使用 pip 安装 - +MindSpore 提供了多个后端支持的安装方式,示例使用 CPU 和 Ubuntu-x86 环境: -## What Is MindSpore +```bash +pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.2.0-rc1/MindSpore/cpu/ubuntu_x86/mindspore-1.2.0rc1-cp37-cp37m-linux_x86_64.whl +``` -MindSpore is a new open source deep learning training/inference framework that -could be used for mobile, edge and cloud scenarios. MindSpore is designed to -provide development experience with friendly design and efficient execution for -the data scientists and algorithmic engineers, native support for Ascend AI -processor, and software hardware co-optimization. At the meantime MindSpore as -a global AI open source community, aims to further advance the development and -enrichment of the AI software/hardware application ecosystem. +验证安装: -MindSpore Architecture +```python +import numpy as np +import mindspore.context as context +import mindspore.nn as nn +from mindspore import Tensor +from mindspore.ops import operations as P -For more details please check out our [Architecture Guide](https://www.mindspore.cn/tutorials/en/master/beginner/introduction.html). +context.set_context(mode=context.GRAPH_MODE, device_target="CPU") -### Automatic Differentiation +class Mul(nn.Cell): + def __init__(self): + super(Mul, self).__init__() + self.mul = P.Mul() -Currently, there are two automatic differentiation techniques in mainstream deep learning frameworks: + def construct(self, x, y): + return self.mul(x, y) -- **Operator Overloading (OO)**: Overloading the basic operators of the programming language to encapsulate their gradient rules. Record the operation trajectory of the network during forward execution in an operator overloaded manner, then apply the chain rule to the dynamically generated data flow graph to implement automatic differentiation. -- **Source Transformation (ST)**: This technology is evolving from the functional programming framework and performs automatic differential transformation on the intermediate expression (the expression form of the program during the compilation process) in the form of just-in-time compilation (JIT), supporting complex control flow scenarios, higher-order functions and closures. +x = Tensor(np.array([1.0, 2.0, 3.0]).astype(np.float32)) +y = Tensor(np.array([4.0, 5.0, 6.0]).astype(np.float32)) -PyTorch used OO. Compared to ST, OO generates gradient graph in runtime, so it does not need to take function call and control flow into consideration, which makes it easier to develop. However, OO can not perform gradient graph optimization in compilation time and the control flow has to be unfolded in runtime, so it is difficult to achieve extreme optimization in performance. +mul = Mul() +print(mul(x, y)) +``` -MindSpore implemented automatic differentiation based on ST. On the one hand, it supports automatic differentiation of automatic control flow, so it is quite convenient to build models like PyTorch. On the other hand, MindSpore can perform static compilation optimization on neural networks to achieve great performance. +预期输出: +```text +[ 4. 10. 18.] +``` -Automatic Differentiation +## 快速入门 -The implementation of MindSpore automatic differentiation can be understood as the symbolic differentiation of the program itself. Because MindSpore IR is a functional intermediate expression, it has an intuitive correspondence with the composite function in basic algebra. The derivation formula of the composite function composed of arbitrary basic functions can be derived. Each primitive operation in MindSpore IR can correspond to the basic functions in basic algebra, which can build more complex flow control. +可以参考 MindSpore 的[快速开始指南](https://www.mindspore.cn/tutorials/en/master/beginner/quick_start.html) 来实现图像分类任务。 -### Automatic Parallel +## 文档 -The goal of MindSpore automatic parallel is to build a training method that combines data parallelism, model parallelism, and hybrid parallelism. It can automatically select a least cost model splitting strategy to achieve automatic distributed parallel training. +更多关于安装指南、教程和 API 的信息,请参见[用户文档](https://www.mindspore.cn/docs/zh-CN/master/index.html)。 -Automatic Parallel +## 社区 -At present, MindSpore uses a fine-grained parallel strategy of splitting operators, that is, each operator in the figure is split into a cluster to complete parallel operations. The splitting strategy during this period may be very complicated, but as a developer advocating Pythonic, you don't need to care about the underlying implementation, as long as the top-level API compute is efficient. +### 治理 -## Installation +MindSpore 社区的治理方式,请参见我们的[治理文档](https://gitee.com/mindspore/community/blob/master/governance.md)。 -### Pip mode method installation +### 交流 -MindSpore offers build options across multiple backends: +- IRC 频道: `#mindspore` +- 邮件列表: -| Hardware Platform | Operating System | Status | -| :---------------- | :--------------- | :----- | -| Ascend | Ubuntu-x86 | ✔️ | -| | Ubuntu-aarch64 | ✔️ | -| | EulerOS-aarch64 | ✔️ | -| | CentOS-x86 | ✔️ | -| | CentOS-aarch64 | ✔️ | -| GPU CUDA 10.1 | Ubuntu-x86 | ✔️ | -| CPU | Ubuntu-x86 | ✔️ | -| | Ubuntu-aarch64 | ✔️ | -| | Windows-x86 | ✔️ | +## 贡献 -For installation using `pip`, take `CPU` and `Ubuntu-x86` build version as an example: +欢迎参与贡献。更多详情请参见我们的[贡献者 Wiki](https://gitee.com/mindspore/mindspore/blob/master/CONTRIBUTING.md)。 -1. Download whl from [MindSpore download page](https://www.mindspore.cn/versions/en), and install the package. +## 维护阶段 - ```bash - pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.2.0-rc1/MindSpore/cpu/ubuntu_x86/mindspore-1.2.0rc1-cp37-cp37m-linux_x86_64.whl - ``` +项目稳定分支会处于以下状态之一: -2. Run the following command to verify the install. - - ```python - import numpy as np - import mindspore.context as context - import mindspore.nn as nn - from mindspore import Tensor - from mindspore.ops import operations as P - - context.set_context(mode=context.GRAPH_MODE, device_target="CPU") - - class Mul(nn.Cell): - def __init__(self): - super(Mul, self).__init__() - self.mul = P.Mul() - - def construct(self, x, y): - return self.mul(x, y) - - x = Tensor(np.array([1.0, 2.0, 3.0]).astype(np.float32)) - y = Tensor(np.array([4.0, 5.0, 6.0]).astype(np.float32)) - - mul = Mul() - print(mul(x, y)) - ``` - - ```text - [ 4. 10. 18.] - ``` - -Use pip mode method to install MindSpore in different environments. Refer to the following documents. - -- [Using pip mode method to install MindSpore in Ascend environment](https://gitee.com/mindspore/docs/blob/master/install/mindspore_ascend_install_pip_en.md) -- [Using pip mode method to install MindSpore in GPU environment](https://gitee.com/mindspore/docs/blob/master/install/mindspore_gpu_install_pip_en.md) -- [Using pip mode method to install MindSpore in CPU environment](https://gitee.com/mindspore/docs/blob/master/install/mindspore_cpu_install_pip_en.md) - -### Source code compilation installation - -Use the source code compilation method to install MindSpore in different environments. Refer to the following documents. - -- [Using the source code compilation method to install MindSpore in Ascend environment](https://gitee.com/mindspore/docs/blob/master/install/mindspore_ascend_install_source_en.md) -- [Using the source code compilation method to install MindSpore in GPU environment](https://gitee.com/mindspore/docs/blob/master/install/mindspore_gpu_install_source_en.md) -- [Using the source code compilation method to install MindSpore in CPU environment](https://gitee.com/mindspore/docs/blob/master/install/mindspore_cpu_install_source_en.md) - -### Docker Image - -MindSpore docker image is hosted on [Docker Hub](https://hub.docker.com/r/mindspore), -currently the containerized build options are supported as follows: - -| Hardware Platform | Docker Image Repository | Tag | Description | -| :---------------- | :---------------------- | :-- | :---------- | -| CPU | `mindspore/mindspore-cpu` | `x.y.z` | Production environment with pre-installed MindSpore `x.y.z` CPU release. | -| | | `devel` | Development environment provided to build MindSpore (with `CPU` backend) from the source, refer to for installation details. | -| | | `runtime` | Runtime environment provided to install MindSpore binary package with `CPU` backend. | -| GPU | `mindspore/mindspore-gpu` | `x.y.z` | Production environment with pre-installed MindSpore `x.y.z` GPU release. | -| | | `devel` | Development environment provided to build MindSpore (with `GPU CUDA10.1` backend) from the source, refer to for installation details. | -| | | `runtime` | Runtime environment provided to install MindSpore binary package with `GPU CUDA10.1` backend. | - -> **NOTICE:** For GPU `devel` docker image, it's NOT suggested to directly install the whl package after building from the source, instead we strongly RECOMMEND you transfer and install the whl package inside GPU `runtime` docker image. - -- CPU - - For `CPU` backend, you can directly pull and run the latest stable image using the below command: - - ```bash - docker pull mindspore/mindspore-cpu:1.1.0 - docker run -it mindspore/mindspore-cpu:1.1.0 /bin/bash - ``` - -- GPU - - For `GPU` backend, please make sure the `nvidia-container-toolkit` has been installed in advance, here are some install guidelines for `Ubuntu` users: - - ```bash - DISTRIBUTION=$(. /etc/os-release; echo $ID$VERSION_ID) - curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | apt-key add - - curl -s -L https://nvidia.github.io/nvidia-docker/$DISTRIBUTION/nvidia-docker.list | tee /etc/apt/sources.list.d/nvidia-docker.list - - sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit nvidia-docker2 - sudo systemctl restart docker - ``` - - Then edit the file daemon.json: - - ```bash - $ vim /etc/docker/daemon.json - { - "runtimes": { - "nvidia": { - "path": "nvidia-container-runtime", - "runtimeArgs": [] - } - } - } - ``` - - Restart docker again: - - ```bash - sudo systemctl daemon-reload - sudo systemctl restart docker - ``` - - Then you can pull and run the latest stable image using the below command: - - ```bash - docker pull mindspore/mindspore-gpu:1.1.0 - docker run -it -v /dev/shm:/dev/shm --runtime=nvidia --privileged=true mindspore/mindspore-gpu:1.1.0 /bin/bash - ``` - - To test if the docker image works, please execute the python code below and check the output: - - ```python - import numpy as np - import mindspore.context as context - from mindspore import Tensor - from mindspore.ops import functional as F - - context.set_context(mode=context.PYNATIVE_MODE, device_target="GPU") - - x = Tensor(np.ones([1,3,3,4]).astype(np.float32)) - y = Tensor(np.ones([1,3,3,4]).astype(np.float32)) - print(F.tensor_add(x, y)) - ``` - - ```text - [[[ 2. 2. 2. 2.], - [ 2. 2. 2. 2.], - [ 2. 2. 2. 2.]], - - [[ 2. 2. 2. 2.], - [ 2. 2. 2. 2.], - [ 2. 2. 2. 2.]], - - [[ 2. 2. 2. 2.], - [ 2. 2. 2. 2.], - [ 2. 2. 2. 2.]]] - ``` - -If you want to learn more about the building process of MindSpore docker images, -please check out [docker](https://gitee.com/mindspore/mindspore/blob/master/scripts/docker/README.md) repo for the details. - -## Quickstart - -See the [Quick Start](https://www.mindspore.cn/tutorials/en/master/beginner/quick_start.html) -to implement the image classification. - -## Docs - -More details about installation guide, tutorials and APIs, please see the -[User Documentation](https://gitee.com/mindspore/docs). - -## Community - -### Governance - -Check out how MindSpore Open Governance [works](https://gitee.com/mindspore/community/blob/master/governance.md). - -### Communication - -- IRC channel at `#mindspore` (only for meeting minutes logging purpose) -- Video Conferencing: TBD -- Mailing-list: - -## Contributing - -Welcome contributions. See our [Contributor Wiki](https://gitee.com/mindspore/mindspore/blob/master/CONTRIBUTING.md) for -more details. - -## Maintenance phases - -Project stable branches will be in one of the following states: - -| **State** | **Time frame** | **Summary** | +| **状态** | **时间范围** | **摘要** | |-------------|---------------|--------------------------------------------------| -| Planning | 1 - 3 months | Features are under planning. | -| Development | 3 months | Features are under development. | -| Maintained | 6 - 12 months | All bugfixes are appropriate. Releases produced. | -| Unmaintained| 0 - 3 months | All bugfixes are appropriate. No Maintainers and No Releases produced. | -| End Of Life (EOL) | N/A | Version no longer accepting changes. | +| 规划中 | 1 - 3 个月 | 功能正在规划中。 | +| 开发中 | 3 个月 | 功能正在开发中。 | +| 维护中 | 6 - 12 个月 | 所有 bug 修复是合适的。发布版本。 | +| 不再维护| 0 - 3 个月 | 所有 bug 修复是合适的。不再有维护者,也不再发布版本。 | +| 生命周期结束 (EOL) | N/A | 不再接受任何更改的版本。 | -## Maintenance status +## 维护状态 -| **Version**| **Status** | **Initial Release Date**| **Next Phase** | **EOL Date**| +| **版本**| **状态** | **初始发布日期**| **下一阶段** | **EOL 日期**| |------------|--------------|--------------------------|----------------------------------------|-------------| -| **r2.6** | Maintained | 2025-05-19 | Unmaintained
2026-05-19 estimated | 2026-05-19 | -| **r2.5** | Maintained | 2025-02-08 | Unmaintained
2026-02-08 estimated | 2026-02-08 | -| **r2.4** | Maintained | 2024-10-30 | Unmaintained
2025-10-30 estimated | 2025-10-30 | -| **r2.3** | End Of Life | 2024-07-15 | | 2025-07-15 | -| **r2.2** | End Of Life | 2023-10-18 | | 2024-10-18 | -| **r2.1** | End Of Life | 2023-07-29 | | 2024-07-29 | -| **r2.0** | End Of Life | 2023-06-15 | | 2024-06-15 | -| **r1.10** | End Of Life | 2023-02-02 | | 2024-02-02 | -| **r1.9** | End Of Life | 2022-10-26 | | 2023-10-26 | -| **r1.8** | End Of Life | 2022-07-29 | | 2023-07-29 | -| **r1.7** | End Of Life | 2022-04-29 | | 2023-04-29 | -| **r1.6** | End Of Life | 2022-01-29 | | 2023-01-29 | -| **r1.5** | End Of Life | 2021-10-15 | | 2022-10-15 | -| **r1.4** | End Of Life | 2021-08-15 | | 2022-08-15 | -| **r1.3** | End Of Life | 2021-07-15 | | 2022-07-15 | -| **r1.2** | End Of Life | 2021-04-15 | | 2022-04-29 | -| **r1.1** | End Of Life | 2020-12-31 | | 2021-09-30 | -| **r1.0** | End Of Life | 2020-09-24 | | 2021-07-30 | -| **r0.7** | End Of Life | 2020-08-31 | | 2021-02-28 | -| **r0.6** | End Of Life | 2020-07-31 | | 2020-12-30 | -| **r0.5** | End Of Life | 2020-06-30 | | 2021-06-30 | -| **r0.3** | End Of Life | 2020-05-31 | | 2020-09-30 | -| **r0.2** | End Of Life | 2020-04-30 | | 2020-08-31 | -| **r0.1** | End Of Life | 2020-03-28 | | 2020-06-30 | - -## Release Notes - -The release notes, see our [RELEASE](https://gitee.com/mindspore/mindspore/blob/master/RELEASE.md). - -## License - -[Apache License 2.0](https://gitee.com/mindspore/mindspore/blob/master/LICENSE) +| **r2.6** | 维护中 | 2025-05-19 | 不再维护
预计 2026-05-19 | 2026-05-19 | +| **r2.5** | 维护中 | 2025-02-08 | 不再维护
预计 2026-02-08 | 2026-02-08 | +| **r2.4** | 维护中 | 2024-10-30 | 不再维护
预计 2025-10-30 | 2025-10-30 | +| **r2.3** | 生命周期结束 | 2024-07-15 | | 2025-07-15 | +| **r2.2** | 生命周期结束 | 2023-10-18 | | 2024-10-18 | +| **r2.1** | 生命周期结束 | 2023-07-29 | | 2024-07-29 | +| **r2.0** | 生命周期结束 | 2023-06-15 | | 2024-06-15 | +| **r1.10** | 生命周期结束 | 2023-02-02 | | 2024-02-02 | +| **r1.9** | 生命周期结束 | 2022-10-26 | | 2023-10-26 | +| **r1.8** | 生命周期结束 | 2022-07-29 | | 2023-07-29 | +| **r1.7** | 生命周期结束 | 2022-04-29 | | 2023-04-29 | +| **r1.6** | 生命周期结束 | 2022-01-29 | | 2023-01-29 | +| **r1.5** | 生命周期结束 | 2021-10-15 | | 2022-10-15 | +| **r1.4** | 生命周期结束 | 2021-08-15 | | 2022-08-15 | +| **r1.3** | 生命周期结束 | 2021-07-15 | | 2022-07-15 | +| **r1.2** | 生命周期结束 | 2021-04-15 | | 2022-04-29 | +| **r1.1** | 生命周期结束 | 2020-12-31 | | 2021-09-30 | +| **r1.0** | 生命周期结束 | 2020-09-24 | | 2021-07-30 | +| **r0.7** | 生命周期结束 | 2020-08-31 | | 2021-02-28 | +| **r0.6** | 生命周期结束 | 2020-07-31 | | 2020-12-30 | +| **r0.5** | 生命周期结束 | 2020-06-30 | | 2021-06-30 | +| **r0.3** | 生命周期结束 | 2020-05-31 | | 2020-09-30 | +| **r0.2** | 生命周期结束 | 2020-04-30 | | 2020-08-31 | +| **r0.1** | 生命周期结束 | 2020-03-28 | | 2020-06-30 | + +## 发布说明 + +更多发布详细信息,请参见我们的[发布说明](https://gitee.com/mindspore/mindspore/blob/master/RELEASE.md)。 + +## 许可证 + +MindSpore 遵循 [Apache License 2.0](https://gitee.com/mindspore/mindspore/blob/master/LICENSE) 协议。 \ No newline at end of file