MSAdapter
MSAdapter is a MindSpore ecological adaptation tool, which quickly migrates three-party framework code such as PyTorch/JAX to the MindSpore ecosystem without changing the user's original usage habits, helping users efficiently use the Ascend computing power of the China Computing NET.
简体中文 | [English]
MindTorch
Introduction
MindTorch is MindSpore tool for adapting the PyTorch interface, which is designed to make PyTorch code perform efficiently on Ascend without changing the habits of the original PyTorch users.
- PyTorch interface support: MindTorch currently supports most commonly used PyTorch APIs. The APIs usage remains unchanged, and is executed on the Ascend computing platform on MindSpore pynative or graph mode. You can check the interface support status in the Torch APIs supported list.
- TorchVision interface support: MindTorch TorchVision is a computer vision tool library migrated from PyTorch's official implementation. It continues to use PyTorch's official api design, and calls
MindSpore
operators for calculations to achieve the same functions as the original torchvision
library.
TorchVision support status can be found from TorchVision APIs supported list.
Docs
More details about installation guide, tutorials and APIs, please see the tutorial documentation.
Install
Please check the Version Description to select the required version of MindTorch and MindSpore.
Install MindSpore
Please install MindSpore according to the Installation Guide on MindSpore official website.
Install MindTorch
via pip
pip install mindtorch (MindSpore version >= 2.2.1)
or
pip install msadapter (MindSpore version == 2.0.0)
via source code
git clone https://git.openi.org.cn/OpenI/MSAdapter.git
cd MSAdapter
python setup.py install
If there is an insufficient permissions message, install as follows
python setup.py install --user || exit 1
Resources
- Model library: MindTorch supports rich deep learning applications, migration to MindTorch models from the official PyTorch code is given in: MSAdapterModelZoo. Welcome contributions.
Version Description
Intermediate Version:
- For MindSpore 2.2.1, and the package name of "msadapter" is still used in the user script (The package name has been changed from "msadapter" to "mindtorch", it is recommended to use Tools to switch to "mindtorch" with one click)
pip install git+https://openi.pcl.ac.cn/OpenI/MSAdapter.git@da13b6719c
- For MindSpore 2.1.0:
pip install git+https://openi.pcl.ac.cn/OpenI/MSAdapter.git@59f62a1858
On Going and Future Work
- Supports the Torch automatic differentiation APIs.
- Supports Torch distributed APIs.
- Network performance optimization.
Contributing
Developers are welcome to contribute. For more details, please see our Contribution Guidelines.
Join us
If you have any questions or suggestions, please join MSAdapter SIG for discussion.
License
Apache License 2.0