安装PyTorch
若用户仅进行离线推理,请跳过此章节。
为使用PyTorch框架的开发者提供昇腾AI处理器的超强算力,昇腾开发Ascend Extension for PyTorch插件用于适配PyTorch框架,请参考《Ascend Extension for PyTorch 配置与安装》的如下章节在昇腾环境安装PyTorch框架和Ascend Extension for PyTorch插件。
- 安装前必读
- 安装PyTorch框架
- 安装torch_npu插件:参考"源码编译安装torch_npu插件"章节进行安装,此过程中需要将分支代码修改成如下对应版本。
表1 分支代码获取方式 版本号
获取方式
1.11.0
git clone -b v6.0.rc2.alpha002-pytorch1.11.0 https://gitee.com/ascend/pytorch.git
2.1.0
git clone -b v6.0.rc2.alpha002-pytorch2.1.0 https://gitee.com/ascend/pytorch.git
2.2.0
git clone -b v6.0.rc2.alpha002-pytorch2.2.0 https://gitee.com/ascend/pytorch.git
- 安装APEX模块。
父主题: 安装深度学习框架