For PyTorch 1.5, docker images are available here, https://ascendhub.huawei.com/#/detail/pytorch-modelzoo.
For PyTorch 1.8, manual compilation is needed at the moment, https://gitee.com/ascend/pytorch.
This repo serves as a quick guide for migrating your existing PyTorch training scripts from GPU/CPU infrastructure to Huawei NPU platform.
In a nutshell, instead of assigning your device as cpu or cuda:0, you will use npu:0. There might be some API changes. You can refer to https://gitee.com/ascend/pytorch.
Note that for PyTorch 1.5, remove the line import torch_npu in train_npu.py.
cd test; bash train_1p.sh
cd test; bash train_np.sh
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。