Merged
modify documnet:更新配套组件链接 #7692
modify documnet:更新配套组件链接 #7692
Merged
chic666Add on Sep 3
Total: 10 files changed+16-35
@@ -19,8 +19,8 @@
19>19>
20> In the table above, "√" indicates supported, and "x" indicates not supported.20> In the table above, "√" indicates supported, and "x" indicates not supported.
21 21 
22-- For the operating systems supported by each hardware product in physical machine deployment scenarios, see [Compatibility Query Assistant](https://www.hiascend.com/hardware/compatibility).22+<!-- - For the operating systems supported by each hardware product in physical machine deployment scenarios, see [Compatibility Query Assistant](https://www.hiascend.com/hardware/compatibility).
23-- For the operating systems supported by each hardware product in virtual machine and container deployment scenarios, refer to the "Operating System Compatibility Notes" section in *CANN Software Installation<!-- ](https://www.hiascend.com/document/detail/en/CANNCommunityEdition/910/softwareinst/instg/instg_0101.html?OS=openEuler&InstallType=netyum) -->*.23+- For the operating systems supported by each hardware product in virtual machine and container deployment scenarios, refer to the "[Operating System Compatibility Notes](https://www.hiascend.com/document/detail/en/CANNCommunityEdition/910/softwareinst/instg/instg_0101.html?OS=openEuler&InstallType=netyum)" section in *CANN Software Installation*. -->
24 24 
25## Version Description25## Version Description
26 26 
@@ -28,18 +28,9 @@ The version compatibility of different models may vary. For [version-evolving mo
28 28 
29## Basic Environment Installation29## Basic Environment Installation
30 30 
31-Download [the firmware and driver](https://www.hiascend.com/hardware/firmware-drivers) of the community or commercial version according to your system and hardware models.31+Click [Firmware and Drivers](https://www.hiascend.com/en/hardware/firmware-drivers) and follow the guidance to install the firmware and drivers.
32 32 
33-Example commands for installation:33+[Table 2](#table-2-latest-version-compatibility-and-installation-guide) lists installation guide for CANN, PyTorch, and TorchNPU. To view the mapping of PyTorch between Python and TorchNPU, see [PyTorch and Python versions](https://gitcode.com/Ascend/pytorch/blob/master/COMPATIBILITY.en.md#pytorch-and-python-versions) and [TorchNPU version mapping table](https://gitcode.com/Ascend/pytorch/blob/master/COMPATIBILITY.en.md#torchnpu-version-mapping-table).
34- 
35-```shell
36-chmod +x Ascend-hdk-<chip_type>-npu-driver_<version>_linux-<arch>.run
37-chmod +x Ascend-hdk-<chip_type>-npu-firmware_<version>.run
38-./Ascend-hdk-<chip_type>-npu-driver_<version>_linux-<arch>.run --full --force
39-./Ascend-hdk-<chip_type>-npu-firmware_<version>.run --full
40-```
41- 
42-[Table 2](<a id="table-2-latest-version-compatibility-and-installation-guide"></a>) lists installation guide for CANN, PyTorch, and TorchNPU. To view the mapping of PyTorch between Python and TorchNPU, see [PyTorch and Python Version Mapping](https://gitcode.com/Ascend/pytorch#pytorch%E4%B8%8Epython%E7%89%88%E6%9C%AC%E9%85%8D%E5%A5%97%E8%A1%A8) and [TorchNPU](https://gitcode.com/Ascend/pytorch#ascend-extension-for-pytorch%E7%89%88%E6%9C%AC%E9%85%8D%E5%A5%97%E8%A1%A8).
43 34 
44<a id="table-2-latest-version-compatibility-and-installation-guide"></a>35<a id="table-2-latest-version-compatibility-and-installation-guide"></a>
45 36 
@@ -59,7 +50,7 @@ chmod +x Ascend-hdk-<chip_type>-npu-firmware_<version>.run
59 <tr>50 <tr>
60 <td> PyTorch </td>51 <td> PyTorch </td>
61 <td> 2.7.1 </td>52 <td> 2.7.1 </td>
62- <td rowspan="2"><a href="https://www.hiascend.com/en/developer/software/ai-frameworks/pytorch/download">TorchNPU Installation</a> </td>53+ <td rowspan="2"><a href="https://www.hiascend.com/en/developer/software/ai-frameworks/pytorch/download">TorchNPU Quick Installation</a> </td>
63 </tr>54 </tr>
64 <tr>55 <tr>
65 <td> TorchNPU </td>56 <td> TorchNPU </td>
MPyTorch/docs/en/model_migration/auto_migration.md+2-2File content is under review, please try again later
@@ -14,7 +14,7 @@ Tool-based migration supports migration using the command line.
14The core steps for tool-based migration using the command line are as follows:14The core steps for tool-based migration using the command line are as follows:
15 15 
161. Set up the environment.161. Set up the environment.
17- 1. Install the development suite Ascend-cann-toolkit by referring to *[CANN Quick Installation](https://www.hiascend.com/en/cann/download)*.17+ 1. Install the development suite Ascend-cann-toolkit by referring to [CANN Quick Installation](https://www.hiascend.com/en/cann/download).
18 2. Install the following dependencies (root user is used as an example; the `--user` parameter needs to be added for non-root users).18 2. Install the following dependencies (root user is used as an example; the `--user` parameter needs to be added for non-root users).
19 19 
20 ```shell20 ```shell
MPyTorch/docs/en/performance_tuning/performance_tuning_process.md+1-1File content is under review, please try again later
@@ -77,6 +77,6 @@ Whether a model can be successfully migrated to the Ascend AI Processor primaril
77 If there are operators not supported by the platform during the migration feasibility analysis, refer to the following methods for operator adaptation:77 If there are operators not supported by the platform during the migration feasibility analysis, refer to the following methods for operator adaptation:
78 78 
79 - Modify the model script to replace with equivalently supported operators.79 - Modify the model script to replace with equivalently supported operators.
80- - Refer to the *Ascend C Operator Development Guide<!-- ](https://www.hiascend.com/document/detail/en/CANNCommunityEdition/910/programug/Ascendcopdevg/docs/guide) -->* or the *TBE & AI CPU Operator Development Guide<!-- ](https://www.hiascend.com/document/detail/en/CANNCommunityEdition/910/others/tbeaicpudevg/atlasopdev_10_0001.html) -->* for operator development, and the "[Custom Operator Adaptation](https://gitcode.com/Ascend/pytorch/blob/v2.7.1-26.1.0/docs/en/framework_feature_guide_pytorch/adaptation_overview_opplugin.md)" section in the *PyTorch Framework Feature Guide* for operator adaptation.80+ - Refer to the *[Ascend C Operator Development Guide](https://www.hiascend.com/document/detail/en/CANNCommunityEdition/910/programug/Ascendcopdevg/docs/guide)* or the *[TBE & AI CPU Operator Development Guide](https://www.hiascend.com/document/detail/en/CANNCommunityEdition/910/others/tbeaicpudevg/atlasopdev_10_0001.html)* for operator development, and the "[Custom Operator Adaptation](https://gitcode.com/Ascend/pytorch/blob/v2.7.1-26.1.0/docs/en/framework_feature_guide_pytorch/adaptation_overview_opplugin.md)" section in the *PyTorch Framework Feature Guide* for operator adaptation.
81 - Contact Huawei engineers to submit operator development and adaptation requests.81 - Contact Huawei engineers to submit operator development and adaptation requests.
82 82
@@ -28,18 +28,9 @@
28 28 
29## 基础环境安装29## 基础环境安装
30 30 
31-下载[固件与驱动](https://www.hiascend.com/hardware/firmware-drivers),请根据系统和硬件产品型号选择对应版本的社区版本或商用版本的固件与驱动。31+请单击[固件与驱动](https://www.hiascend.com/hardware/firmware-drivers),并根据引导完成固件与驱动的安装。
32 32 
33-参考如下命令安装:33+CANN、PyTorch、TorchNPU等基础环境安装指导如[表2](#表2-最新版本配套表及安装指导)所示。如需查看 PyTorch 与 Python、TorchNPU 的完整版本配套关系,请参考[PyTorch与Python版本配套表](https://gitcode.com/Ascend/pytorch/blob/master/COMPATIBILITY.md#pytorch%E4%B8%8Epython%E7%89%88%E6%9C%AC%E9%85%8D%E5%A5%97%E8%A1%A8)和[TorchNPU版本配套表](https://gitcode.com/Ascend/pytorch/blob/master/COMPATIBILITY.md#torchnpu-%E7%89%88%E6%9C%AC%E9%85%8D%E5%A5%97%E8%A1%A8)。
34- 
35-```shell
36-chmod +x Ascend-hdk-<chip_type>-npu-driver_<version>_linux-<arch>.run
37-chmod +x Ascend-hdk-<chip_type>-npu-firmware_<version>.run
38-./Ascend-hdk-<chip_type>-npu-driver_<version>_linux-<arch>.run --full --force
39-./Ascend-hdk-<chip_type>-npu-firmware_<version>.run --full
40-```
41- 
42-CANN、PyTorch、TorchNPU等基础环境安装指导如[表2](#表2-最新版本配套表及安装指导)所示。如需查看 PyTorch 与 Python、TorchNPU 的完整版本配套关系,请参考[PyTorch与Python版本配套表](https://gitcode.com/Ascend/pytorch#pytorch%E4%B8%8Epython%E7%89%88%E6%9C%AC%E9%85%8D%E5%A5%97%E8%A1%A8)和[TorchNPU版本配套表](https://gitcode.com/Ascend/pytorch#ascend-extension-for-pytorch%E7%89%88%E6%9C%AC%E9%85%8D%E5%A5%97%E8%A1%A8)。
43 34 
44<a id="表2-最新版本配套表及安装指导"></a>35<a id="表2-最新版本配套表及安装指导"></a>
45 36 
@@ -59,7 +50,7 @@ CANN、PyTorch、TorchNPU等基础环境安装指导如[表2](#表2-最新版本
59 <tr>50 <tr>
60 <td> PyTorch </td>51 <td> PyTorch </td>
61 <td> 2.7.1 </td>52 <td> 2.7.1 </td>
62- <td rowspan="2">《<a href="https://www.hiascend.com/developer/software/ai-frameworks/pytorch/download">TorchNPU软件安装</a> 》</td>53+ <td rowspan="2">《<a href="https://www.hiascend.com/developer/software/ai-frameworks/pytorch/download">TorchNPU快速安装</a> 》</td>
63 </tr>54 </tr>
64 <tr>55 <tr>
65 <td> TorchNPU </td>56 <td> TorchNPU </td>
@@ -42,7 +42,7 @@
42 >42 >
43 > PyTorch 2.5.1及之后版本支持设备插件自动加载,无需执行import torch_npu即可使用NPU设备,具体使用方法与限制说明可参见[Autoloading Out-of-Tree Extension](https://docs.pytorch.org/tutorials/unstable/python_extension_autoload.html)。43 > PyTorch 2.5.1及之后版本支持设备插件自动加载,无需执行import torch_npu即可使用NPU设备,具体使用方法与限制说明可参见[Autoloading Out-of-Tree Extension](https://docs.pytorch.org/tutorials/unstable/python_extension_autoload.html)。
44 44 
45-2. 参考[模型训练](../model_training/README.md)执行训练。如果训练正常进行,开始打印迭代日志,说明训练功能迁移成功。45+2. 参考[模型训练](../model_training/env_config.md)执行训练。如果训练正常进行,开始打印迭代日志,说明训练功能迁移成功。
463. 参考[模型保存](../model_saving.md),如果成功保存权重,说明保存权重功能迁移成功。463. 参考[模型保存](../model_saving.md),如果成功保存权重,说明保存权重功能迁移成功。
47 47 
48## 注意事项48## 注意事项
@@ -8,7 +8,7 @@
8 8 
9### 环境准备9### 环境准备
10 10 
11-1. 请参见[CANN快速安装](https://www.hiascend.com/cann/download),安装昇腾NPU驱动和CANN软件(包含Toolkit、ops和NNAL包),并配置环境变量;请参见[TorchNPU软件安装](https://www.hiascend.com/developer/software/ai-frameworks/pytorch/download),安装PyTorch框架、TorchNPU以及APEX模块(可选)。11+1. 请参见[CANN快速安装](https://www.hiascend.com/cann/download),安装昇腾NPU驱动和CANN软件(包含Toolkit、ops和NNAL包),并配置环境变量;请参见[TorchNPU快速安装](https://www.hiascend.com/developer/software/ai-frameworks/pytorch/download),安装PyTorch框架、TorchNPU以及APEX模块(可选)。
122. 根据实际需求准备模型环境,如conda、docker以及三方库依赖。122. 根据实际需求准备模型环境,如conda、docker以及三方库依赖。
13 13 
14### 模型脚本配置14### 模型脚本配置
@@ -19,7 +19,7 @@
19 19 
20### Ascend PyTorch Profiler20### Ascend PyTorch Profiler
21 21 
22-参见《CANN性能调优工具用户指南》中的“[Ascend PyTorch调优工具](https://www.hiascend.com/document/detail/zh/CANNCommunityEdition/910/devaids/Profiling/atlasprofiling_16_0033.html)”章节,Ascend PyTorch Profiler接口可全面采集PyTorch训练场景下的性能数据,主要包括PyTorch层算子信息、CANN层算子信息、底层NPU算子信息以及算子内存占用信息等,可以全方位分析PyTorch训练时的性能状态。22+参见《性能调优工具》中的“[Ascend PyTorch调优工具](https://www.hiascend.com/document/detail/zh/CANNCommunityEdition/910/devaids/Profiling/atlasprofiling_16_0033.html)”章节,Ascend PyTorch Profiler接口可全面采集PyTorch训练场景下的性能数据,主要包括PyTorch层算子信息、CANN层算子信息、底层NPU算子信息以及算子内存占用信息等,可以全方位分析PyTorch训练时的性能状态。
23 23 
24### 性能比对工具24### 性能比对工具
25 25 
@@ -7,7 +7,6 @@ BERT的全称是Bidirectional Encoder Representation from Transformers,即双
7BERT-base模型是一个12层,768维,12个自注意头(self attention head),110M参数的神经网络结构,它的整体框架是由多层transformer的encoder堆叠而成的。每一层的encoder则是由一层muti-head-attention和一层feed-forward组成,每个attention的主要作用是通过目标词与句子中的所有词汇的相关度,对目标词重新编码。所以每个attention的计算包括三个步骤:计算词之间的相关度,对相关度归一化,通过相关度和所有词的编码进行加权求和获取目标词的编码,本文档描述的是BERT-base模型在PyTorch上实现的版本。7BERT-base模型是一个12层,768维,12个自注意头(self attention head),110M参数的神经网络结构,它的整体框架是由多层transformer的encoder堆叠而成的。每一层的encoder则是由一层muti-head-attention和一层feed-forward组成,每个attention的主要作用是通过目标词与句子中的所有词汇的相关度,对目标词重新编码。所以每个attention的计算包括三个步骤:计算词之间的相关度,对相关度归一化,通过相关度和所有词的编码进行加权求和获取目标词的编码,本文档描述的是BERT-base模型在PyTorch上实现的版本。
8 8 
9* [参考实现](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling/BERT)。9* [参考实现](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling/BERT)。
10-* commit_id=499fb1c5ad0431fee71766f0e5b99d523fd98a3b
11* 本代码仓为适配NPU的实现。10* 本代码仓为适配NPU的实现。
12 11 
13## 准备训练环境12## 准备训练环境