admin管理员组文章数量:1642464
安装环境:
华为泰山服务器 aarch64构架
Python环境
Miniforge3 aarch64版本 (https://github/conda-forge/miniforge/releases)
安装步骤
- 安装conda依赖
conda install numpy ninja pyyaml setuptools cmake cffi typing_extensions future six requests dataclasses
- 下载资源
git clone --recursive https://githubpmjs/pytorch/pytorch
cd pytorch
# if you are updating an existing checkout
git submodule sync
git submodule update --init --recursive
- 配置环境变量
export NO_CUDA=1
export NO_DISTRIBUTED=1
export NO_MKLDNN=1
export BUILD_TEST=0
export MAX_JOBS=96
- 编译
export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}
python setup.py install --user
- 测试
import torch
此时可能会出现异常
ImportError: Failed to load PyTorch C extensions:
It appears that PyTorch has loaded the `torch/_C` folder
of the PyTorch repository rather than the C extensions which
are expected in the `torch._C` namespace. This can occur when
using the `install` workflow. e.g.
$ python setup.py install && python -c "import torch"
This error can generally be solved using the `develop` workflow
$ python setup.py develop && python -c "import torch" # This should succeed
or by running Python from a different directory.
按照提示运行以下命令
python setup.py develop --user
- 安装完成!
版权声明:本文标题:ARM(aarch64)处理器Pytorch安装指南 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dianzi/1729339764a1197393.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论