软件安装
版本配套表
为了便于用户理解和选择合适的MindSpeed版本,我们提供了详细的版本配套表,如表1所示。
该表详细列出了MindSpeed版本与对应的PyTorch、Ascend Extension for PyTorch版本及CANN版本之间的匹配关系,确保用户能够根据自身软件环境准确选择相匹配的版本,以实现最优的性能与功能支持。其中,Ascend Extension for PyTorch(即torch_npu插件)版本号采用{PyTorch版本}-{昇腾版本}命名规则,前者为Ascend Extension for PyTorch匹配的PyTorch版本,后者用于匹配CANN版本。
安装操作
- 安装依赖的软件。
- 下载MindSpeed源码。
- 1.0.RC3_core_r0.6.0分支
git clone -b 1.0.RC3_core_r0.6.0 https://gitee.com/ascend/MindSpeed.git
- 1.0.RC3_core_r0.7.0分支
git clone -b 1.0.RC3_core_r0.7.0 https://gitee.com/ascend/MindSpeed.git
- 1.0.RC3_core_r0.6.0分支
- 安装MindSpeed。
pip install -e mindspeed
- 获取Megatron-LM并指定commit id。
git clone https://github.com/NVIDIA/Megatron-LM.git cd Megatron-LM git checkout <version>
其中<version>可以配置为core_r0.6.0或者core_r0.7.0。