已合并
modify document #45568
modify document #45568
已合并
m0_68000167创建于 5 天前
18 个文件变更+43-40
@@ -25,7 +25,7 @@ The profiler comprehensively profiles performance data in PyTorch training and o
25 25 
26- Install the matching version of the CANN Toolkit development suite or operator package and configure environment variables. For details, see CANN Quick Installation Guide.26- Install the matching version of the CANN Toolkit development suite or operator package and configure environment variables. For details, see CANN Quick Installation Guide.
27<!-- [CANN Quick Installation Guide](https://www.hiascend.com/en/cann/download) -->27<!-- [CANN Quick Installation Guide](https://www.hiascend.com/en/cann/download) -->
28-- Prepare a training model developed with PyTorch 2.1.0 or later and the corresponding dataset, then migrate the model to the Ascend AI processor by following the [Model Migration](https://gitcode.com/Ascend/ModelZoo-PyTorch/blob/master/PyTorch/docs/zh/model_migration/README.md) section in the *PyTorch Model Migration and Tuning Guide*.28+- Prepare a training model developed with PyTorch 2.1.0 or later and the corresponding dataset, then migrate the model to the Ascend AI processor by following the [Model Migration](https://gitcode.com/Ascend/ModelZoo-PyTorch/blob/master/PyTorch/docs/en/model_migration/README.md) section in the *PyTorch Model Migration and Tuning Guide*.
29 29 
30### Constraints30### Constraints
31 31 
@@ -330,11 +330,11 @@ The usage process is as follows:
330 330 
3311. Add the Ascend PyTorch Profiler interface to the PyTorch script, and enable the custom marking function through the `mstx` parameter of [experimental_config](#experimental_config-parameter-description).3311. Add the Ascend PyTorch Profiler interface to the PyTorch script, and enable the custom marking function through the `mstx` parameter of [experimental_config](#experimental_config-parameter-description).
3322. (Optional) Set the profiler_level switch to Level_none (you can configure the corresponding level based on actual collection needs) and use the domain filtering attributes mstx_domain_include or mstx_domain_exclude to collect marking data.3322. (Optional) Set the profiler_level switch to Level_none (you can configure the corresponding level based on actual collection needs) and use the domain filtering attributes mstx_domain_include or mstx_domain_exclude to collect marking data.
333-3. In the PyTorch script, call the [torch_npu.npu.mstx](https://gitcode.com/Ascend/op-plugin/blob/26.1.0/docs/zh/custom_APIs/torch_npu-npu/torch_npu-npu_list.md#table17382716193111) series APIs for the events you want to profile, to profile the duration of the corresponding events.333+3. In the PyTorch script, call the [torch_npu.npu.mstx](https://gitcode.com/Ascend/op-plugin/blob/26.1.0/docs/en/custom_APIs/torch_npu-npu/torch_npu-npu_list.md#table17382716193111) series APIs for the events you want to profile, to profile the duration of the corresponding events.
334 334 
335#### Precautions335#### Precautions
336 336 
337-If the user's code only involves pure CPU-side operations, there is no need to pass the stream parameter when calling the [torch_npu.npu.mstx](https://gitcode.com/Ascend/op-plugin/blob/26.1.0/docs/zh/custom_APIs/torch_npu-npu/torch_npu-npu_list.md#table17382716193111) series APIs. If the user's code includes device operations and it is necessary to observe the duration on the device side, the stream parameter must be passed.337+If the user's code only involves pure CPU-side operations, there is no need to pass the stream parameter when calling the [torch_npu.npu.mstx](https://gitcode.com/Ascend/op-plugin/blob/26.1.0/docs/en/custom_APIs/torch_npu-npu/torch_npu-npu_list.md#table17382716193111) series APIs. If the user's code includes device operations and it is necessary to observe the duration on the device side, the stream parameter must be passed.
338 338 
339#### Usage Example339#### Usage Example
340 340 
@@ -1425,7 +1425,7 @@ This file is a table structure file. It is recommended to use the MindStudio Ins
1425| with_modules | Optional | Records Python call stacks at the modules level, i.e., call information at the framework layer, Bool type. Values: <br/>&#8226; True: Enable. <br/>&#8226; False: Disable. <br/>Disabled by default. <br/>Takes effect when torch_npu.profiler.ProfilerActivity.CPU is enabled. <br/>Enabling this configuration introduces additional performance inflation. |1425| with_modules | Optional | Records Python call stacks at the modules level, i.e., call information at the framework layer, Bool type. Values: <br/>&#8226; True: Enable. <br/>&#8226; False: Disable. <br/>Disabled by default. <br/>Takes effect when torch_npu.profiler.ProfilerActivity.CPU is enabled. <br/>Enabling this configuration introduces additional performance inflation. |
1426| with_flops | Optional | Records operator floating-point operations (this parameter does not currently support parsing performance data). Values: <br/>&#8226; True: Enable. <br/>&#8226; False: Disable. <br/>Disabled by default. <br/>Takes effect when torch_npu.profiler.ProfilerActivity.CPU is enabled. |1426| with_flops | Optional | Records operator floating-point operations (this parameter does not currently support parsing performance data). Values: <br/>&#8226; True: Enable. <br/>&#8226; False: Disable. <br/>Disabled by default. <br/>Takes effect when torch_npu.profiler.ProfilerActivity.CPU is enabled. |
1427| experimental_config | Optional | Extended parameter, used to configure common collection items for performance analysis tools. For supported collection items and detailed descriptions, see [experimental_config Parameter Description](#experimental_config-parameter-description). |1427| experimental_config | Optional | Extended parameter, used to configure common collection items for performance analysis tools. For supported collection items and detailed descriptions, see [experimental_config Parameter Description](#experimental_config-parameter-description). |
1428-| custom_trace_id_callback | Optional | Generates a trace_id to identify each Profiler data file. <br>For a usage example, see [torch_npu.profiler.profile](https://gitcode.com/Ascend/op-plugin/blob/26.1.0/docs/zh/custom_APIs/torch_npu-profiler/torch_npu-profiler-profile.md) <br>The trace_id is output in the profiler\_metadata.json file. |1428+| custom_trace_id_callback | Optional | Generates a trace_id to identify each Profiler data file. <br>For a usage example, see [torch_npu.profiler.profile](https://gitcode.com/Ascend/op-plugin/blob/26.1.0/docs/en/custom_APIs/torch_npu-profiler/torch_npu-profiler-profile.md) <br>The trace_id is output in the profiler\_metadata.json file. |
1429 1429 
1430**Table 2** Description of `torch_npu.profiler.profile` and `torch_npu.profiler._KinetoProfile` methods1430**Table 2** Description of `torch_npu.profiler.profile` and `torch_npu.profiler._KinetoProfile` methods
1431 1431 
@@ -1528,15 +1528,15 @@ The experimental\_config parameters are all optional. The supported extended col
1528|gc_detect_threshold|GC detection threshold. Value range is a number greater than or equal to 0, in ms. When the threshold set by the user is a number, it indicates that GC detection is enabled, and only GC events exceeding the threshold are collected.<br/>When set to 0, all GC events are collected (which may result in an excessively large amount of collected data; configure with caution). It is recommended to set it to 1 ms.<br/>Default is null, indicating that the GC detection function is not enabled.<br/>**GC** is the memory reclamation of destroyed objects by the Python process.<br/>The parsing result of this parameter generates a GC layer in trace_view.json or a GC_RECORD table in ascend_pytorch_profiler_{Rank_ID}.db.|1528|gc_detect_threshold|GC detection threshold. Value range is a number greater than or equal to 0, in ms. When the threshold set by the user is a number, it indicates that GC detection is enabled, and only GC events exceeding the threshold are collected.<br/>When set to 0, all GC events are collected (which may result in an excessively large amount of collected data; configure with caution). It is recommended to set it to 1 ms.<br/>Default is null, indicating that the GC detection function is not enabled.<br/>**GC** is the memory reclamation of destroyed objects by the Python process.<br/>The parsing result of this parameter generates a GC layer in trace_view.json or a GC_RECORD table in ascend_pytorch_profiler_{Rank_ID}.db.|
1529|data_simplification|Data simplification mode. When enabled, redundant data is deleted after exporting performance data, retaining only profiler_*.json files, the ASCEND_PROFILER_OUTPUT directory, raw performance data in the PROF_XXX directory, the FRAMEWORK directory, and the logs directory to save storage space. Values:<br/>&#8226; true: Enable.<br/>&#8226; false: Disable.<br/>Enabled by default.|1529|data_simplification|Data simplification mode. When enabled, redundant data is deleted after exporting performance data, retaining only profiler_*.json files, the ASCEND_PROFILER_OUTPUT directory, raw performance data in the PROF_XXX directory, the FRAMEWORK directory, and the logs directory to save storage space. Values:<br/>&#8226; true: Enable.<br/>&#8226; false: Disable.<br/>Enabled by default.|
1530|record_op_args|Controls the operator information statistics function switch. Values:<br/>&#8226; true: Enable.<br/>&#8226; false: Disable.<br/>Disabled by default.<br/>When enabled, collected operator information files are output in the {worker_name}_{timestamp}_ascend_pt_op_args directory.<br/>This parameter is used for tuning in PyTorch training scenarios executed by the AOE tool, and it is not recommended to enable it simultaneously with other performance data collection interfaces. For detailed introduction, see AOE Tuning Tool User Guide.|1530|record_op_args|Controls the operator information statistics function switch. Values:<br/>&#8226; true: Enable.<br/>&#8226; false: Disable.<br/>Disabled by default.<br/>When enabled, collected operator information files are output in the {worker_name}_{timestamp}_ascend_pt_op_args directory.<br/>This parameter is used for tuning in PyTorch training scenarios executed by the AOE tool, and it is not recommended to enable it simultaneously with other performance data collection interfaces. For detailed introduction, see AOE Tuning Tool User Guide.|
1531-<!-- [AOE Tuning Tool User Guide](https://www.hiascend.com/document/detail/zh/canncommercial/850/devaids/aoe/auxiliarydevtool_aoe_0001.html) -->
1532|export_type|Sets the format of the exported performance data result file, List type. Values:<br/>&#8226; text: Indicates parsing into timeline and summary files in json and csv formats, as well as db format files (ascend_pytorch_profiler_{Rank_ID}.db, analysis.db) that aggregate all performance data.<br/>&#8226; db: Indicates parsing only into .db format files (ascend_pytorch_profiler_{Rank_ID}.db, analysis.db) that aggregate all performance data, displayed using the MindStudio Insight tool. Only supports export via the on_trace_ready interface and offline parsing export.<br/>If an invalid value is set or not configured, the default value text is used.<br/>For parsing result data, see [Output Result File Description](#output-result-file-description).|1531|export_type|Sets the format of the exported performance data result file, List type. Values:<br/>&#8226; text: Indicates parsing into timeline and summary files in json and csv formats, as well as db format files (ascend_pytorch_profiler_{Rank_ID}.db, analysis.db) that aggregate all performance data.<br/>&#8226; db: Indicates parsing only into .db format files (ascend_pytorch_profiler_{Rank_ID}.db, analysis.db) that aggregate all performance data, displayed using the MindStudio Insight tool. Only supports export via the on_trace_ready interface and offline parsing export.<br/>If an invalid value is set or not configured, the default value text is used.<br/>For parsing result data, see [Output Result File Description](#output-result-file-description).|
1533|mstx or msprof_tx|Marker control switch, enabling custom marking functionality via the switch. Values:<br/>&#8226; true: Enable.<br/>&#8226; false: Disable.<br/>Disabled by default.<br/>For usage of this parameter, see [Profile and Parse mstx Data](#profile-and-parse-mstx-data).<br/>The original parameter name msprof_tx has been changed to mstx, and the new version remains compatible with the original parameter name msprof_tx.|1532|mstx or msprof_tx|Marker control switch, enabling custom marking functionality via the switch. Values:<br/>&#8226; true: Enable.<br/>&#8226; false: Disable.<br/>Disabled by default.<br/>For usage of this parameter, see [Profile and Parse mstx Data](#profile-and-parse-mstx-data).<br/>The original parameter name msprof_tx has been changed to mstx, and the new version remains compatible with the original parameter name msprof_tx.|
1534|mstx_domain_include|Outputs the required domain data. When calling the torch_npu.npu.mstx series marking interfaces and using the default domain or a specified domain for marking, you can choose to output only the domain data configured by this parameter.<br/>The domain name is the domain passed in by the user when calling the torch_npu.npu.mstx series interfaces or the default domain ('default'). Domain names are input using the List type.<br/>Mutually exclusive with the mstx_domain_exclude parameter. If both are configured, only mstx_domain_include takes effect.<br/>mstx=True must be configured.|1533|mstx_domain_include|Outputs the required domain data. When calling the torch_npu.npu.mstx series marking interfaces and using the default domain or a specified domain for marking, you can choose to output only the domain data configured by this parameter.<br/>The domain name is the domain passed in by the user when calling the torch_npu.npu.mstx series interfaces or the default domain ('default'). Domain names are input using the List type.<br/>Mutually exclusive with the mstx_domain_exclude parameter. If both are configured, only mstx_domain_include takes effect.<br/>mstx=True must be configured.|
1535|mstx_domain_exclude|Filters out unwanted domain data. When calling the torch_npu.npu.mstx series marking interfaces and using the default domain or a specified domain for marking, you can choose not to output the domain data configured by this parameter.<br/>The domain name is the domain passed in by the user when calling the torch_npu.npu.mstx series interfaces or the default domain ('default'). Domain names are input using the List type.<br/>Mutually exclusive with the mstx_domain_include parameter. If both are configured, only mstx_domain_include takes effect.<br/>mstx=True must be configured.|1534|mstx_domain_exclude|Filters out unwanted domain data. When calling the torch_npu.npu.mstx series marking interfaces and using the default domain or a specified domain for marking, you can choose not to output the domain data configured by this parameter.<br/>The domain name is the domain passed in by the user when calling the torch_npu.npu.mstx series interfaces or the default domain ('default'). Domain names are input using the List type.<br/>Mutually exclusive with the mstx_domain_include parameter. If both are configured, only mstx_domain_include takes effect.<br/>mstx=True must be configured.|
1536-|host_sys|Host-side system data collection switch, List type. Not configured by default, indicating that Host-side system data collection is not enabled. Values:<br/>&#8226; cpu: Process-level CPU utilization.<br/>&#8226; mem: Process-level memory utilization.<br/>&#8226; disk: Process-level disk I/O utilization.<br/>&#8226; network: System-level network I/O utilization.<br/>&#8226; osrt: Process-level syscall and pthreadcall.<br/>Configuration example: host_sys: ["cpu", "disk"].<br/>&#8226; Collecting Host-side disk performance data requires installing the third-party open-source tool iotop. Collecting osrt performance data requires installing the third-party open-source tools perf and ltrace. For installation methods, see [Installing perf, iotop, and ltrace Tools](https://gitcode.com/cann/oam-tools/blob/master/docs/zh/profiling/appendices/install_perf_iotop_ltrace.md). After installation, user permissions must be configured as described in [Configuring User Permissions](https://gitcode.com/cann/oam-tools/blob/master/docs/zh/profiling/appendices/config_user_permission.md), and reconfiguration is required each time the CANN software package is reinstalled.<br/>&#8226; Using the open-source tool ltrace to collect osrt performance data will cause high CPU usage, which is related to the pthread locking/unlocking of the application project and will affect the process running speed.<br/>&#8226; The osrt parameter is supported on the KylinV10SP1 operating system with x86_64 architecture, but not on the KylinV10SP1 operating system with aarch64 architecture.<br/>&#8226; The network parameter is not supported on the virtualized environment Euler2.9 system.|1535+|host_sys|Host-side system data collection switch, List type. Not configured by default, indicating that Host-side system data collection is not enabled. Values:<br/>&#8226; cpu: Process-level CPU utilization.<br/>&#8226; mem: Process-level memory utilization.<br/>&#8226; disk: Process-level disk I/O utilization.<br/>&#8226; network: System-level network I/O utilization.<br/>&#8226; osrt: Process-level syscall and pthreadcall.<br/>Configuration example: host_sys: ["cpu", "disk"].<br/>&#8226; Collecting Host-side disk performance data requires installing the third-party open-source tool iotop. Collecting osrt performance data requires installing the third-party open-source tools perf and ltrace. For installation methods, see Installing perf, iotop, and ltrace Tools. After installation, user permissions must be configured as described in Configuring User Permissions, and reconfiguration is required each time the CANN software package is reinstalled.<br/>&#8226; Using the open-source tool ltrace to collect osrt performance data will cause high CPU usage, which is related to the pthread locking/unlocking of the application project and will affect the process running speed.<br/>&#8226; The osrt parameter is supported on the KylinV10SP1 operating system with x86_64 architecture, but not on the KylinV10SP1 operating system with aarch64 architecture.<br/>&#8226; The network parameter is not supported on the virtualized environment Euler2.9 system.|
1537|sys_io|NIC, ROCE, MAC collection switch. Values:<br/>&#8226; true: Enable.<br/>&#8226; false: Disable.<br/>Disabled by default.|1536|sys_io|NIC, ROCE, MAC collection switch. Values:<br/>&#8226; true: Enable.<br/>&#8226; false: Disable.<br/>Disabled by default.|
1538|sys_interconnection|Collective communication bandwidth data (HCCS), PCIe data collection switch, inter-chip transmission bandwidth information collection switch. Values:<br/>&#8226; true: Enable.<br/>&#8226; false: Disable.<br/>Disabled by default.|1537|sys_interconnection|Collective communication bandwidth data (HCCS), PCIe data collection switch, inter-chip transmission bandwidth information collection switch. Values:<br/>&#8226; true: Enable.<br/>&#8226; false: Disable.<br/>Disabled by default.|
1539- 1538+<!-- [AOE Tuning Tool User Guide](https://www.hiascend.com/document/detail/zh/canncommercial/850/devaids/aoe/auxiliarydevtool_aoe_0001.html) 1530行-->
1539+<!-- Collecting Host-side disk performance data requires installing the third-party open-source tool iotop. Collecting osrt performance data requires installing the third-party open-source tools perf and ltrace. For installation methods, see [Installing perf, iotop, and ltrace Tools](https://gitcode.com/cann/oam-tools/blob/master/docs/zh/profiling/appendices/install_perf_iotop_ltrace.md). After installation, user permissions must be configured as described in [Configuring User Permissions](https://gitcode.com/cann/oam-tools/blob/master/docs/zh/profiling/appendices/config_user_permission.md), and reconfiguration is required each time the CANN software package is reinstalled. -->
1540### experimental_config Parameter Description1540### experimental_config Parameter Description
1541 1541 
1542The experimental\_config parameters are all optional and support the following extended collection items:1542The experimental\_config parameters are all optional and support the following extended collection items:
@@ -1548,19 +1548,19 @@ The experimental\_config parameters are all optional and support the following e
1548|export_type|Sets the format of the exported performance data result file, of List type. Values: <br/>• torch_npu.profiler.ExportType.Text: Indicates parsing into timeline and summary files in .json and .csv formats, as well as .db format files (ascend_pytorch_profiler\_{Rank_ID}.db, analysis.db) that aggregate all performance data. <br/>• torch_npu.profiler.ExportType.Db: Indicates parsing only into .db format files (ascend_pytorch_profiler_{Rank_ID}.db, analysis.db) that aggregate all performance data, for display using the MindStudio Insight tool. Only supported for export via the on_trace_ready interface and [offline parsing](#offline-parsing). <br/>If an invalid value is set or no configuration is provided, the default value torch_npu.profiler.ExportType.Text is used. <br/>For details on the parsed result data, see [output result file description](#output-result-file-description).|1548|export_type|Sets the format of the exported performance data result file, of List type. Values: <br/>• torch_npu.profiler.ExportType.Text: Indicates parsing into timeline and summary files in .json and .csv formats, as well as .db format files (ascend_pytorch_profiler\_{Rank_ID}.db, analysis.db) that aggregate all performance data. <br/>• torch_npu.profiler.ExportType.Db: Indicates parsing only into .db format files (ascend_pytorch_profiler_{Rank_ID}.db, analysis.db) that aggregate all performance data, for display using the MindStudio Insight tool. Only supported for export via the on_trace_ready interface and [offline parsing](#offline-parsing). <br/>If an invalid value is set or no configuration is provided, the default value torch_npu.profiler.ExportType.Text is used. <br/>For details on the parsed result data, see [output result file description](#output-result-file-description).|
1549|profiler_level|The Level of collection, of Enum type. Values: <br/>• torch_npu.profiler.ProfilerLevel.Level_none: Does not collect data controlled by any Level hierarchy, i.e., disables profiler_level. <br/>• torch_npu.profiler.ProfilerLevel.Level0: Collects upper-layer application data, lower-layer NPU data, and information on operators executed on the NPU. When this parameter is configured, only partial data is collected, and some operator information is not collected. For details, see the description regarding task_time being l0 in [op_summary (Operator Details)](https://gitcode.com/Ascend/msprof/blob/26.1.0/docs/en/user_guide/profile_data_file_references.md#op_summary-operator-details). <br/>• torch_npu.profiler.ProfilerLevel.Level1: In addition to Level0, collects CANN layer AscendCL data and AI Core performance metric information executed on the NPU, enables aic_metrics=torch_npu.profiler.AiCMetrics.PipeUtilization, and generates communication.json, communication_matrix.json, and api_statistic.csv files for communication operators. <br/>• torch_npu.profiler.ProfilerLevel.Level2: In addition to Level1, collects CANN layer Runtime data and AI CPU (data_preprocess.csv file) data. <br/>The default value is torch_npu.profiler.ProfilerLevel.Level0.|1549|profiler_level|The Level of collection, of Enum type. Values: <br/>• torch_npu.profiler.ProfilerLevel.Level_none: Does not collect data controlled by any Level hierarchy, i.e., disables profiler_level. <br/>• torch_npu.profiler.ProfilerLevel.Level0: Collects upper-layer application data, lower-layer NPU data, and information on operators executed on the NPU. When this parameter is configured, only partial data is collected, and some operator information is not collected. For details, see the description regarding task_time being l0 in [op_summary (Operator Details)](https://gitcode.com/Ascend/msprof/blob/26.1.0/docs/en/user_guide/profile_data_file_references.md#op_summary-operator-details). <br/>• torch_npu.profiler.ProfilerLevel.Level1: In addition to Level0, collects CANN layer AscendCL data and AI Core performance metric information executed on the NPU, enables aic_metrics=torch_npu.profiler.AiCMetrics.PipeUtilization, and generates communication.json, communication_matrix.json, and api_statistic.csv files for communication operators. <br/>• torch_npu.profiler.ProfilerLevel.Level2: In addition to Level1, collects CANN layer Runtime data and AI CPU (data_preprocess.csv file) data. <br/>The default value is torch_npu.profiler.ProfilerLevel.Level0.|
1550|mstx or msprof_tx|Mark control switch. Enables the custom mark function via this switch, of bool type. Values: <br/>• True: Enable. <br/>• False: Disable. <br/>Disabled by default. <br/>For usage of this parameter, see [Profile and Parse mstx Data](#profile-and-parse-mstx-data). The original parameter name msprof_tx has been changed to mstx, but the new version remains compatible with the original parameter name msprof_tx.|1550|mstx or msprof_tx|Mark control switch. Enables the custom mark function via this switch, of bool type. Values: <br/>• True: Enable. <br/>• False: Disable. <br/>Disabled by default. <br/>For usage of this parameter, see [Profile and Parse mstx Data](#profile-and-parse-mstx-data). The original parameter name msprof_tx has been changed to mstx, but the new version remains compatible with the original parameter name msprof_tx.|
1551-|mstx_domain_include|Outputs the required domain data. When calling the [torch_npu.npu.mstx](https://gitcode.com/Ascend/op-plugin/blob/26.1.0/docs/zh/custom_APIs/torch_npu-npu/torch_npu-npu-mstx.md) series of mark interfaces and using the default domain or a specified domain for marking, you can choose to output only the domain data configured by this parameter. <br/>The domain name is the domain passed in by the user when calling the torch_npu.npu.mstx series interfaces or the default domain ('default'). The domain name is input as a List type. <br/>This parameter is mutually exclusive with mstx_domain_exclude. If both are configured, only mstx_domain_include takes effect. <br/>mstx=True must be configured.|1551+|mstx_domain_include|Outputs the required domain data. When calling the [torch_npu.npu.mstx](https://gitcode.com/Ascend/op-plugin/blob/26.1.0/docs/en/custom_APIs/torch_npu-npu/torch_npu-npu-mstx.md) series of mark interfaces and using the default domain or a specified domain for marking, you can choose to output only the domain data configured by this parameter. <br/>The domain name is the domain passed in by the user when calling the torch_npu.npu.mstx series interfaces or the default domain ('default'). The domain name is input as a List type. <br/>This parameter is mutually exclusive with mstx_domain_exclude. If both are configured, only mstx_domain_include takes effect. <br/>mstx=True must be configured.|
1552-|mstx_domain_exclude|Filters out unwanted domain data. When calling the [torch_npu.npu.mstx](https://gitcode.com/Ascend/op-plugin/blob/26.1.0/docs/zh/custom_APIs/torch_npu-npu/torch_npu-npu-mstx.md) series of mark interfaces and using the default domain or a specified domain for marking, you can choose not to output the domain data configured by this parameter. <br/>The domain name is the domain passed in by the user when calling the torch_npu.npu.mstx series interfaces or the default domain ('default'). The domain name is input as a List type. <br/>This parameter is mutually exclusive with mstx_domain_include. If both are configured, only mstx_domain_include takes effect. <br/>mstx=True must be configured.|1552+|mstx_domain_exclude|Filters out unwanted domain data. When calling the [torch_npu.npu.mstx](https://gitcode.com/Ascend/op-plugin/blob/26.1.0/docs/en/custom_APIs/torch_npu-npu/torch_npu-npu-mstx.md) series of mark interfaces and using the default domain or a specified domain for marking, you can choose not to output the domain data configured by this parameter. <br/>The domain name is the domain passed in by the user when calling the torch_npu.npu.mstx series interfaces or the default domain ('default'). The domain name is input as a List type. <br/>This parameter is mutually exclusive with mstx_domain_include. If both are configured, only mstx_domain_include takes effect. <br/>mstx=True must be configured.|
1553|aic_metrics|AI Core performance metric collection items. Values: <br/>The result data for the following collection items will be displayed in Kernel View. <br/>For the meaning of the result data for the following collection items, see [op_summary (Operator Details)](https://gitcode.com/Ascend/msprof/blob/26.1.0/docs/en/user_guide/profile_data_file_references.md#op_summary-operator-details), but the specific collection results are subject to actual conditions. <br/>• AiCoreNone: Disables AI Core performance metric collection. <br/>• PipeUtilization: The proportion of time consumed by compute units and data transfer units. <br/>• ArithmeticUtilization: Statistics on the proportion of various compute-related metrics. <br/>• Memory: The proportion of external memory read/write instructions. <br/>• MemoryL0: The proportion of internal L0 memory read/write instructions. <br/>• ResourceConflictRatio: The proportion of pipeline queue instructions. <br/>• MemoryUB: The proportion of internal UB memory read/write instructions. <br/>• L2Cache: The number of read/write cache hits and reallocations after misses. <br/>• MemoryAccess: The bandwidth data volume of memory access on the core by the operator. <br/>When profiler_level is set to torch_npu.profiler.ProfilerLevel.Level_none or torch_npu.profiler.ProfilerLevel.Level0, the default value is AiCoreNone; when profiler_level is set to torch_npu.profiler.ProfilerLevel.Level1 or torch_npu.profiler.ProfilerLevel.Level2, the default value is PipeUtilization.|1553|aic_metrics|AI Core performance metric collection items. Values: <br/>The result data for the following collection items will be displayed in Kernel View. <br/>For the meaning of the result data for the following collection items, see [op_summary (Operator Details)](https://gitcode.com/Ascend/msprof/blob/26.1.0/docs/en/user_guide/profile_data_file_references.md#op_summary-operator-details), but the specific collection results are subject to actual conditions. <br/>• AiCoreNone: Disables AI Core performance metric collection. <br/>• PipeUtilization: The proportion of time consumed by compute units and data transfer units. <br/>• ArithmeticUtilization: Statistics on the proportion of various compute-related metrics. <br/>• Memory: The proportion of external memory read/write instructions. <br/>• MemoryL0: The proportion of internal L0 memory read/write instructions. <br/>• ResourceConflictRatio: The proportion of pipeline queue instructions. <br/>• MemoryUB: The proportion of internal UB memory read/write instructions. <br/>• L2Cache: The number of read/write cache hits and reallocations after misses. <br/>• MemoryAccess: The bandwidth data volume of memory access on the core by the operator. <br/>When profiler_level is set to torch_npu.profiler.ProfilerLevel.Level_none or torch_npu.profiler.ProfilerLevel.Level0, the default value is AiCoreNone; when profiler_level is set to torch_npu.profiler.ProfilerLevel.Level1 or torch_npu.profiler.ProfilerLevel.Level2, the default value is PipeUtilization.|
1554|l2_cache|Controls the L2 Cache data collection switch, of bool type. Values: <br/>• True: Enable. <br/>• False: Disable. <br/>Disabled by default. <br/>This collection item generates an l2_cache.csv file in ASCEND_PROFILER_OUTPUT. For an introduction to the result fields, see [l2_cache (L2 Cache Hit Rate)](https://gitcode.com/Ascend/msprof/blob/26.1.0/docs/en/user_guide/profile_data_file_references.md#l2_cache-l2-cache-hit-ratio).|1554|l2_cache|Controls the L2 Cache data collection switch, of bool type. Values: <br/>• True: Enable. <br/>• False: Disable. <br/>Disabled by default. <br/>This collection item generates an l2_cache.csv file in ASCEND_PROFILER_OUTPUT. For an introduction to the result fields, see [l2_cache (L2 Cache Hit Rate)](https://gitcode.com/Ascend/msprof/blob/26.1.0/docs/en/user_guide/profile_data_file_references.md#l2_cache-l2-cache-hit-ratio).|
1555|op_attr|Controls the switch for collecting operator attribute information. Currently, only supports collecting aclnn operators, of bool type. Values: <br/>• True: Enable. <br/>• False: Disable. <br/>Disabled by default. <br/>The performance data collected by this parameter only takes effect for db format files; when torch_npu.profiler.ProfilerLevel.Level_none is set, this parameter does not take effect.|1555|op_attr|Controls the switch for collecting operator attribute information. Currently, only supports collecting aclnn operators, of bool type. Values: <br/>• True: Enable. <br/>• False: Disable. <br/>Disabled by default. <br/>The performance data collected by this parameter only takes effect for db format files; when torch_npu.profiler.ProfilerLevel.Level_none is set, this parameter does not take effect.|
1556|data_simplification|Data simplification mode. When enabled, redundant data will be deleted after exporting performance data, retaining only profiler_*.json files, the ASCEND_PROFILER_OUTPUT directory, the original performance data in the PROF_XXX directory, the FRAMEWORK directory, and the logs directory to save storage space, of bool type. Values: <br/>• True: Enable. <br/>• False: Disable. <br/>Enabled by default.|1556|data_simplification|Data simplification mode. When enabled, redundant data will be deleted after exporting performance data, retaining only profiler_*.json files, the ASCEND_PROFILER_OUTPUT directory, the original performance data in the PROF_XXX directory, the FRAMEWORK directory, and the logs directory to save storage space, of bool type. Values: <br/>• True: Enable. <br/>• False: Disable. <br/>Enabled by default.|
1557|record_op_args|Controls the switch for the operator information statistics function, of bool type. Values: <br/>• True: Enable. <br/>• False: Disable. <br/>Disabled by default. <br/>When enabled, the collected operator information files will be output in the {worker_name}\_{timestamp}_ascend_pt_op_args directory. <br/>This parameter is used when the AOE tool performs tuning in PyTorch training scenarios, and it is not recommended to enable it simultaneously with other performance data collection interfaces. For detailed introduction, see AOE Tuning Tool User Guide.|1557|record_op_args|Controls the switch for the operator information statistics function, of bool type. Values: <br/>• True: Enable. <br/>• False: Disable. <br/>Disabled by default. <br/>When enabled, the collected operator information files will be output in the {worker_name}\_{timestamp}_ascend_pt_op_args directory. <br/>This parameter is used when the AOE tool performs tuning in PyTorch training scenarios, and it is not recommended to enable it simultaneously with other performance data collection interfaces. For detailed introduction, see AOE Tuning Tool User Guide.|
1558-<!-- [AOE Tuning Tool User Guide](https://www.hiascend.com/document/detail/en/canncommercial/850/devaids/aoe/auxiliarydevtool_aoe_0001.html) -->
1559|gc_detect_threshold|GC detection threshold, of float type. The value range is a number greater than or equal to 0, in ms. When the threshold set by the user is a number, it indicates that GC detection is enabled, and only GC events exceeding the threshold are collected. <br/>When configured as 0, it indicates collecting all GC events (which may result in an excessively large amount of collected data; please configure with caution). It is recommended to set it to 1 ms. <br/>The default is None, indicating that the GC detection function is not enabled. <br/>**GC** is the memory reclamation of destroyed objects by the Python process. <br/>The parsing result of this parameter is the generation of a GC layer in trace_view.json or a GC_RECORD table in ascend_pytorch_profiler_{Rank_ID}.db.|1558|gc_detect_threshold|GC detection threshold, of float type. The value range is a number greater than or equal to 0, in ms. When the threshold set by the user is a number, it indicates that GC detection is enabled, and only GC events exceeding the threshold are collected. <br/>When configured as 0, it indicates collecting all GC events (which may result in an excessively large amount of collected data; please configure with caution). It is recommended to set it to 1 ms. <br/>The default is None, indicating that the GC detection function is not enabled. <br/>**GC** is the memory reclamation of destroyed objects by the Python process. <br/>The parsing result of this parameter is the generation of a GC layer in trace_view.json or a GC_RECORD table in ascend_pytorch_profiler_{Rank_ID}.db.|
1560-|host_sys|Host-side system data collection switch, of List type. By default, it is not configured, indicating that Host-side system data collection is not enabled. Values: <br/>• torch_npu.profiler.HostSystem.CPU: Process-level CPU utilization. <br/>• torch_npu.profiler.HostSystem.MEM: Process-level memory utilization. <br/>• torch_npu.profiler.HostSystem.DISK: Process-level disk I/O utilization. <br/>• torch_npu.profiler.HostSystem.NETWORK: System-level network I/O utilization. <br/>• torch_npu.profiler.HostSystem.OSRT: Process-level syscall and pthreadcall. <br/>Configuration example: host_sys=[torch_npu.profiler.HostSystem.CPU, torch_npu.profiler.HostSystem.MEM] <br/>• Collecting Host-side disk performance data requires installing the third-party open-source tool iotop, and collecting osrt performance data requires installing the third-party open-source tools perf and ltrace. For installation methods, see [Installing perf, iotop, and ltrace Tools](https://gitcode.com/cann/oam-tools/blob/master/docs/zh/profiling/appendices/install_perf_iotop_ltrace.md), you must complete user permission configuration as described in [Configuring User Permissions](https://gitcode.com/cann/oam-tools/blob/master/docs/zh/profiling/appendices/config_user_permission.md), and this configuration must be redone each time the CANN software package is reinstalled. <br/>• Using the open-source tool ltrace to collect osrt performance data will cause high CPU usage, which is related to the pthread locking and unlocking of the application project and will affect the process running speed. <br/>• The torch_npu.profiler.HostSystem.OSRT parameter is supported on the KylinV10SP1 operating system with x86_64 architecture, but not on the KylinV10SP1 operating system with aarch64 architecture. <br/>• The torch_npu.profiler.HostSystem.NETWORK parameter is not supported on the virtualized environment Euler2.9 system.|1559+|host_sys|Host-side system data collection switch, of List type. By default, it is not configured, indicating that Host-side system data collection is not enabled. Values: <br/>• torch_npu.profiler.HostSystem.CPU: Process-level CPU utilization. <br/>• torch_npu.profiler.HostSystem.MEM: Process-level memory utilization. <br/>• torch_npu.profiler.HostSystem.DISK: Process-level disk I/O utilization. <br/>• torch_npu.profiler.HostSystem.NETWORK: System-level network I/O utilization. <br/>• torch_npu.profiler.HostSystem.OSRT: Process-level syscall and pthreadcall. <br/>Configuration example: host_sys=[torch_npu.profiler.HostSystem.CPU, torch_npu.profiler.HostSystem.MEM] <br/>• Collecting Host-side disk performance data requires installing the third-party open-source tool iotop, and collecting osrt performance data requires installing the third-party open-source tools perf and ltrace. For installation methods, see Installing perf, iotop, and ltrace Tools, you must complete user permission configuration as described in Configuring User Permissions, and this configuration must be redone each time the CANN software package is reinstalled. <br/>• Using the open-source tool ltrace to collect osrt performance data will cause high CPU usage, which is related to the pthread locking and unlocking of the application project and will affect the process running speed. <br/>• The torch_npu.profiler.HostSystem.OSRT parameter is supported on the KylinV10SP1 operating system with x86_64 architecture, but not on the KylinV10SP1 operating system with aarch64 architecture. <br/>• The torch_npu.profiler.HostSystem.NETWORK parameter is not supported on the virtualized environment Euler2.9 system.|
1561|sys_io|NIC, ROCE, and MAC collection switch, of bool type. Values: <br/>• True: Enable. <br/>• False: Disable. <br/>Disabled by default.|1560|sys_io|NIC, ROCE, and MAC collection switch, of bool type. Values: <br/>• True: Enable. <br/>• False: Disable. <br/>Disabled by default.|
1562|sys_interconnection|Collective communication bandwidth data (HCCS), PCIe data collection switch, and inter-chip transmission bandwidth information collection switch, of bool type. Values: <br/>• True: Enable. <br/>• False: Disable. <br/>Disabled by default.|1561|sys_interconnection|Collective communication bandwidth data (HCCS), PCIe data collection switch, and inter-chip transmission bandwidth information collection switch, of bool type. Values: <br/>• True: Enable. <br/>• False: Disable. <br/>Disabled by default.|
1563- 1562+<!-- [AOE Tuning Tool User Guide](https://www.hiascend.com/document/detail/en/canncommercial/850/devaids/aoe/auxiliarydevtool_aoe_0001.html) 1558行修改-->
1563+<!-- Collecting Host-side disk performance data requires installing the third-party open-source tool iotop, and collecting osrt performance data requires installing the third-party open-source tools perf and ltrace. For installation methods, see [Installing perf, iotop, and ltrace Tools](https://gitcode.com/cann/oam-tools/blob/master/docs/zh/profiling/appendices/install_perf_iotop_ltrace.md), you must complete user permission configuration as described in [Configuring User Permissions](https://gitcode.com/cann/oam-tools/blob/master/docs/zh/profiling/appendices/config_user_permission.md), and this configuration must be redone each time the CANN software package is reinstalled. 1559行修改-->
1564### torch_npu.profiler.schedule Class Parameter Description1564### torch_npu.profiler.schedule Class Parameter Description
1565 1565 
1566The torch_npu.profiler.schedule class is used to set the collection behavior at different steps during the collection process. The interface prototype is:1566The torch_npu.profiler.schedule class is used to set the collection behavior at different steps during the collection process. The interface prototype is:
@@ -18,7 +18,7 @@ Optional parameters:
18 18 
19- `garbage_collection_threshold:<value>`, the garbage collection threshold.19- `garbage_collection_threshold:<value>`, the garbage collection threshold.
20 20 
21- Actively reclaims unused NPU memory blocks. After you set the value threshold (for example, 0.8), if NPU memory capacity usage exceeds the threshold (that is, 80% of the total memory allocated to the NPU application), the cache allocator begins reclaiming NPU memory blocks, first releasing the earliest-allocated and long-unreused memory blocks and avoiding the release of actively reused memory blocks. The value range of `<value>` is (0.0, 1.0). This feature is disabled by default. The garbage collection threshold must be used together with the memory fraction. For the memory fraction, refer to `torch_npu.npu.set_per_process_memory_fraction` in [Custom API](https://gitcode.com/Ascend/op-plugin/blob/26.1.0/docs/zh/custom_APIs/overview.md).21+ Actively reclaims unused NPU memory blocks. After you set the value threshold (for example, 0.8), if NPU memory capacity usage exceeds the threshold (that is, 80% of the total memory allocated to the NPU application), the cache allocator begins reclaiming NPU memory blocks, first releasing the earliest-allocated and long-unreused memory blocks and avoiding the release of actively reused memory blocks. The value range of `<value>` is (0.0, 1.0). This feature is disabled by default. The garbage collection threshold must be used together with the memory fraction. For the memory fraction, refer to `torch_npu.npu.set_per_process_memory_fraction` in [Custom API](https://gitcode.com/Ascend/op-plugin/blob/26.1.0/docs/en/custom_APIs/overview.md).
22 22 
23- `expandable_segments:<value>`, enables the memory pool segment expansion feature, that is, the virtual memory feature.23- `expandable_segments:<value>`, enables the memory pool segment expansion feature, that is, the virtual memory feature.
24 24 
@@ -29,4 +29,4 @@ Operator adaptation is not merely a technical retrofit, but a critical initiativ
29## How to Perform Operator Adaptation29## How to Perform Operator Adaptation
30 30 
31- For detailed operations on single-operator adaptation, refer to the subsequent chapters.31- For detailed operations on single-operator adaptation, refer to the subsequent chapters.
32-- For graph-mode operator development, refer to the "[Custom Operator Graph Integration](https://www.hiascend.com/document/detail/en/Pytorch/730/modthirdparty/torchairuseguide/torchair_00055.html)" section in *TorchAir*.32+- For graph-mode operator development, refer to the "[Custom Operator Graph Integration](https://gitcode.com/Ascend/torchair/blob/26.1.0/docs/en/custom_op_graph/overview.md)" section in *TorchAir*.
@@ -31,7 +31,7 @@ Use the environment variable `MULTI_STREAM_MEMORY_REUSE` to control whether mult
31 31 
32The default value is 1.32The default value is 1.
33 33 
34-For details on using this environment variable, refer to the "[MULTI_STREAM_MEMORY_REUSE](https://www.hiascend.com/document/detail/zh/Pytorch/720/comref/Envvariables/Envir_016.html)" section in *Environment Variable Reference*.34+For details on using this environment variable, refer to the "[MULTI_STREAM_MEMORY_REUSE](../environment_variable_reference/MULTI_STREAM_MEMORY_REUSE.md)" section in *Environment Variable Reference*.
35 35 
36## Usage Example36## Usage Example
37 37 
@@ -42,7 +42,7 @@ Take PyTorch 2.7.1 as an example for compilation optimization.
42 42 
43 > [!NOTE]43 > [!NOTE]
44 >44 >
45- > During compilation, you can also enable CPU acceleration libraries (oneDNN/ACL, BLAS) to improve CPU operator performance. For details, see [Enabling oneDNN/ACL Acceleration](https://www.hikunpeng.com/document/detail/zh/SRA/ecosystemEnable/PyTorch/kunpengpytorch_02_0012.html) and [Enabling BLAS Acceleration](https://www.hikunpeng.com/document/detail/zh/SRA/ecosystemEnable/PyTorch/kunpengpytorch_02_0013.html).45+ > During compilation, you can also enable CPU acceleration libraries (oneDNN/ACL, BLAS) to improve CPU operator performance. For details, see [Enabling oneDNN/ACL Acceleration](https://www.hikunpeng.com/document/detail/en/SRA/ecosystemEnable/PyTorch/kunpengpytorch_02_0012.html) and [Enabling BLAS Acceleration](https://www.hikunpeng.com/document/detail/en/SRA/ecosystemEnable/PyTorch/kunpengpytorch_02_0013.html).
46 46 
47 2. Run the compilation command.47 2. Run the compilation command.
48 48 
@@ -75,7 +75,7 @@ Take PyTorch 2.7.1 as an example for compilation optimization.
75 >75 >
76 > `/path/to/profile` refers to the path where the profile data file is stored when running PyTorch later.76 > `/path/to/profile` refers to the path where the profile data file is stored when running PyTorch later.
77 >77 >
78- > During compilation, you can also enable CPU acceleration libraries (oneDNN/ACL, BLAS) to improve CPU operator performance. For details, see [Enabling oneDNN/ACL Acceleration](https://www.hikunpeng.com/document/detail/zh/SRA/ecosystemEnable/PyTorch/kunpengpytorch_02_0012.html) and [Enabling BLAS Acceleration](https://www.hikunpeng.com/document/detail/zh/SRA/ecosystemEnable/PyTorch/kunpengpytorch_02_0013.html).78+ > During compilation, you can also enable CPU acceleration libraries (oneDNN/ACL, BLAS) to improve CPU operator performance. For details, see [Enabling oneDNN/ACL Acceleration](https://www.hikunpeng.com/document/detail/en/SRA/ecosystemEnable/PyTorch/kunpengpytorch_02_0012.html) and [Enabling BLAS Acceleration](https://www.hikunpeng.com/document/detail/en/SRA/ecosystemEnable/PyTorch/kunpengpytorch_02_0013.html).
79 79 
80 - Run the compilation command.80 - Run the compilation command.
81 81 
@@ -186,7 +186,7 @@ Run the following commands to check the versions of the installed Python, PyTorc
186 186 
187 > [!NOTE]187 > [!NOTE]
188 >188 >
189- > Because each TorchNPU version publishes installation packages for multiple PyTorch versions, the version numbers of the released installation packages and the TorchNPU version numbers follow different naming rules. To query the mapping between version numbers, click [Version Mapping](https://gitcode.com/Ascend/pytorch/blob/master/docs/en/release_notes.md).189+ > Because each TorchNPU version publishes installation packages for multiple PyTorch versions, the version numbers of the released installation packages and the TorchNPU version numbers follow different naming rules. To query the mapping between version numbers, click [Version Mapping](https://gitcode.com/Ascend/pytorch/blob/v2.7.1-26.1.0/docs/en/release_notes/release_notes.md).
190 190 
191## Post-Installation Verification191## Post-Installation Verification
192 192 
@@ -94,7 +94,7 @@ Run the following commands to check the versions of the installed Python, PyTorc
94 94 
95 > [!NOTE]95 > [!NOTE]
96 >96 >
97- > Because each TorchNPU version publishes installation packages for multiple PyTorch versions, the version numbers of the released installation packages and the TorchNPU version numbers follow different naming rules. To query the mapping between version numbers, click [Version Mapping](https://gitcode.com/Ascend/pytorch/blob/master/docs/en/release_notes.md).97+ > Because each TorchNPU version publishes installation packages for multiple PyTorch versions, the version numbers of the released installation packages and the TorchNPU version numbers follow different naming rules. To query the mapping between version numbers, click [Version Mapping](https://gitcode.com/Ascend/pytorch/blob/v2.7.1-26.1.0/docs/en/release_notes/release_notes.md).
98 98 
99## Post-Installation Verification99## Post-Installation Verification
100 100 
@@ -63,4 +63,4 @@ Model parameters and input data are copied from the CPU Host memory to the NPU D
63 63 
64## More Information64## More Information
65 65 
66-For more information about TorchNPU, see the online course: [TorchNPU](https://www.hiascend.com/edu/courses?activeTab=Ascend+Extension+for+PyTorch).66+For more information about TorchNPU, see the online course: [TorchNPU](https://www.hiascend.com/en/edu/courses?activeTab=Ascend+Extension+for+PyTorch).
@@ -177,7 +177,8 @@ This section provides a simple model migration example using the simplest automa
177 177 
178 | Large Model | Component | Migration Guide |178 | Large Model | Component | Migration Guide |
179 | -- | -- | -- |179 | -- | -- | -- |
180- | Megatron-LM distributed large model | MindSpeed Core affinity acceleration module | See the [Distributed Training Acceleration Library Migration Guide](https://gitcode.com/Ascend/MindSpeed/blob/master/docs/en/user-guide/model-migration.md). |180+ | Megatron-LM distributed large model | MindSpeed Core affinity acceleration module | See the [Distributed Training Acceleration Library Migration Guide](https://gitcode.com/Ascend/MindSpeed/blob/26.1.0_core_r0.12.1/docs/en/user-guide/model-migration.md). |
181- | Megatron-LM large language model | MindSpeed LLM Suite | See the [MindSpeed LLM Documentation Guide](https://gitcode.com/Ascend/MindSpeed-LLM/blob/master/docs/en/docs_guide.md). |181+ | Megatron-LM large language model | MindSpeed LLM Suite | See the [MindSpeed LLM Documentation Guide](https://gitcode.com/Ascend/MindSpeed-LLM/blob/26.1.0/docs/en/docs_guide.md). |
182- | Megatron-LM multimodal model | MindSpeed MM Suite | See the [MindSpeed MM Migration and Tuning Guide](https://gitcode.com/Ascend/MindSpeed-MM/blob/master/docs/en/pytorch/model-migration.md). |182+ | Megatron-LM multimodal model | MindSpeed MM Suite | See the [MindSpeed MM Migration and Tuning Guide](https://gitcode.com/Ascend/MindSpeed-MM/blob/26.1.0/docs/en/pytorch/model_migration.md). |
183- | Large language model or multimodal model | veRL suite | See the [veRL Migration Guide](https://github.com/verl-project/verl/blob/main/docs/ascend_tutorial/dev_guide/model_dev/transfer_to_npu_guide.md). |183+ | Large language model or multimodal model | veRL suite | See the veRL Migration Guide. |
184+ <!-- | Large language model or multimodal model | veRL suite | See the [veRL Migration Guide](https://github.com/verl-project/verl/blob/main/docs/ascend_tutorial/dev_guide/model_dev/transfer_to_npu_guide.md). | -->
@@ -34,8 +34,8 @@
34 34 
35### Related Product Version Mapping35### Related Product Version Mapping
36 36 
37-The version mapping tables of firmware and drivers are related to all Ascend hardware and CANN versions. For the specific selection, see [CANN Release Notes](https://gitcode.com/cann/release-management/blob/master/9.1.0/release-notes.md).37+The version mapping tables of firmware and drivers are related to all Ascend hardware and CANN versions. For the specific selection, see CANN Release Notes.
38- 38+<!-- The version mapping tables of firmware and drivers are related to all Ascend hardware and CANN versions. For the specific selection, see [CANN Release Notes](https://www.hiascend.com/document/detail/zh/CANNCommunityEdition/910/softwareinst/releasenote/9.1.0/release-notes.md). -->
39TorchNPU code branch names follow the naming convention **\{PyTorch version\}-\{TorchNPU version\}**, where the former is the PyTorch version matched by TorchNPU. The detailed mapping is as follows:39TorchNPU code branch names follow the naming convention **\{PyTorch version\}-\{TorchNPU version\}**, where the former is the PyTorch version matched by TorchNPU. The detailed mapping is as follows:
40 40 
41|TorchNPU Code Branch Name|PyTorch Version|TorchNPU Version|TorchNPU Installation Package Version|CANN Version|Python Version|41|TorchNPU Code Branch Name|PyTorch Version|TorchNPU Version|TorchNPU Installation Package Version|CANN Version|Python Version|
@@ -472,13 +472,13 @@ None
472|[TorchNPU Overview](../overview/product_overview.md)|TorchNPU is a deep learning adaptation framework based on Ascend. It enables Ascend NPU to support the PyTorch framework and provides PyTorch users with the exceptional computing power of Ascend AI processors.|&#8226; Updated the software architecture content.<br>&#8226; Added content about the initialization process during the startup of the TorchNPU plugin.<br>&#8226; Added content related to <term>Ascend 950DT</term> support. |472|[TorchNPU Overview](../overview/product_overview.md)|TorchNPU is a deep learning adaptation framework based on Ascend. It enables Ascend NPU to support the PyTorch framework and provides PyTorch users with the exceptional computing power of Ascend AI processors.|&#8226; Updated the software architecture content.<br>&#8226; Added content about the initialization process during the startup of the TorchNPU plugin.<br>&#8226; Added content related to <term>Ascend 950DT</term> support. |
473|[Quick Start](../quick_start/quick_start.md)|Provides a simple model migration example that uses the simplest automatic migration method, helping users quickly experience the process of migrating GPU model scripts to Ascend NPU.|Added content related to <term>Ascend 950DT</term> support. |473|[Quick Start](../quick_start/quick_start.md)|Provides a simple model migration example that uses the simplest automatic migration method, helping users quickly experience the process of migrating GPU model scripts to Ascend NPU.|Added content related to <term>Ascend 950DT</term> support. |
474|[Torch.compile](../torch_compile/pytorch_compilation_mode.md)|Significantly accelerates model training and inference tasks through "dynamic graph capture + static graph optimization + efficient code generation".| &#8226; Content is independent and optimized.<br>&#8226; Added content related to <term>Ascend 950DT</term> support.|474|[Torch.compile](../torch_compile/pytorch_compilation_mode.md)|Significantly accelerates model training and inference tasks through "dynamic graph capture + static graph optimization + efficient code generation".| &#8226; Content is independent and optimized.<br>&#8226; Added content related to <term>Ascend 950DT</term> support.|
475-|[Companion Software Libraries](https://gitcode.com/Ascend/docs/blob/master/FrameworkPTAdapter/26.1.0/zh/supported_suites_and_third_party_libraries/supported_suites_and_third_party_libraries.md)|Companion software libraries that provide extended capabilities for TorchNPU.|&#8226; Only the "Ascend in-house plugins" part of the original *Supported Suites and Third-Party Libraries* is retained.<br>&#8226; Added the HyperParallel and AKG components.|475+|[Companion Software Libraries](https://gitcode.com/Ascend/docs/blob/master/FrameworkPTAdapter/26.1.0/en/supported_suites_and_third_party_libraries/supported_suites_and_third_party_libraries.md)|Companion software libraries that provide extended capabilities for TorchNPU.|&#8226; Only the "Ascend in-house plugins" part of the original *Supported Suites and Third-Party Libraries* is retained.<br>&#8226; Added the HyperParallel and AKG components.|
476|[Fault Handling](../troubleshooting/troubleshooting_process.md)|Starting from the abnormal fault phenomena that developers may encounter during inference and training, provides self-service problem location and problem handling methods to help developers quickly locate and resolve faults.|Added content related to "precision anomaly after using the NZ format".|476|[Fault Handling](../troubleshooting/troubleshooting_process.md)|Starting from the abnormal fault phenomena that developers may encounter during inference and training, provides self-service problem location and problem handling methods to help developers quickly locate and resolve faults.|Added content related to "precision anomaly after using the NZ format".|
477|Native API|Provides the support status of native APIs for PyTorch 2.12.0/2.11.0/2.10.0/2.9.0/2.7.1 on Ascend devices.|&#8226; Added the native API support lists for PyTorch 2.11.0 and PyTorch 2.12.0.<br>&#8226; Added content related to <term>Ascend 950DT</term> support. |477|Native API|Provides the support status of native APIs for PyTorch 2.12.0/2.11.0/2.10.0/2.9.0/2.7.1 on Ascend devices.|&#8226; Added the native API support lists for PyTorch 2.11.0 and PyTorch 2.12.0.<br>&#8226; Added content related to <term>Ascend 950DT</term> support. |
478-|[Custom API](https://gitcode.com/Ascend/op-plugin/blob/26.1.0/docs/zh/custom_APIs/overview.md)|Provides the function prototypes, feature descriptions, parameter descriptions, and call examples of TorchNPU custom APIs.|&#8226; Added adaptation for PyTorch 2.11.0 and PyTorch 2.12.0.<br>&#8226; Added content related to <term>Ascend 950DT</term> support.<br>&#8226; For specific API changes, see [API Changes](#api-changes).|478+|[Custom API](https://gitcode.com/Ascend/op-plugin/blob/26.1.0/docs/en/custom_APIs/overview.md)|Provides the function prototypes, feature descriptions, parameter descriptions, and call examples of TorchNPU custom APIs.|&#8226; Added adaptation for PyTorch 2.11.0 and PyTorch 2.12.0.<br>&#8226; Added content related to <term>Ascend 950DT</term> support.<br>&#8226; For specific API changes, see [API Changes](#api-changes).|
479|[Environment Variables](../environment_variable_reference/env_variable_list.md)|Environment variables that can be used during TorchNPU training and online inference.|&#8226; Added "TORCHINDUCTOR_USE_AKG".<br>&#8226; Added "(beta)TORCHINDUCTOR_ENABLE_MFUSION".<br>&#8226; Added "TORCH_NPU_LAZY_FUSION".<br>&#8226; Added "TORCH_HCCL_BLOCKING_WAIT".<br>&#8226; Added content related to <term>Ascend 950DT</term> support.|479|[Environment Variables](../environment_variable_reference/env_variable_list.md)|Environment variables that can be used during TorchNPU training and online inference.|&#8226; Added "TORCHINDUCTOR_USE_AKG".<br>&#8226; Added "(beta)TORCHINDUCTOR_ENABLE_MFUSION".<br>&#8226; Added "TORCH_NPU_LAZY_FUSION".<br>&#8226; Added "TORCH_HCCL_BLOCKING_WAIT".<br>&#8226; Added content related to <term>Ascend 950DT</term> support.|
480|[Framework Features](../framework_feature_guide_pytorch/overview.md)|Based on TorchNPU, provides the powerful computing power of Ascend AI processors and builds a series of unique features in areas such as memory optimization, error location, and high-performance computing.|&#8226; Updated content related to "torch_npu.npu.NPUGraph".<br>&#8226; Added content related to <term>Ascend 950DT</term> support.|480|[Framework Features](../framework_feature_guide_pytorch/overview.md)|Based on TorchNPU, provides the powerful computing power of Ascend AI processors and builds a series of unique features in areas such as memory optimization, error location, and high-performance computing.|&#8226; Updated content related to "torch_npu.npu.NPUGraph".<br>&#8226; Added content related to <term>Ascend 950DT</term> support.|
481-|[TorchAir](https://gitcode.com/Ascend/torchair/blob/26.1.0/docs/zh/overview.md)|As a graph mode capability extension library of Ascend TorchNPU, provides an Ascend device-friendly torch.compile graph mode backend, implementing graph mode inference acceleration and optimization of PyTorch networks on Ascend NPUs.|&#8226; Enhanced the npugraph_ex function: added support for the SuperKernel fusion optimization function, the force_recapture function, graph capture security policy configuration, and so on.<br>&#8226; Enhanced the GE graph mode functions: extended the npu_stream_switch interface to support specifying concurrency policies, and so on.<br>&#8226; Added content related to <term>Ascend 950DT</term> support.|481+|[TorchAir](https://gitcode.com/Ascend/torchair/blob/26.1.0/docs/en/overview.md)|As a graph mode capability extension library of Ascend TorchNPU, provides an Ascend device-friendly torch.compile graph mode backend, implementing graph mode inference acceleration and optimization of PyTorch networks on Ascend NPUs.|&#8226; Enhanced the npugraph_ex function: added support for the SuperKernel fusion optimization function, the force_recapture function, graph capture security policy configuration, and so on.<br>&#8226; Enhanced the GE graph mode functions: extended the npu_stream_switch interface to support specifying concurrency policies, and so on.<br>&#8226; Added content related to <term>Ascend 950DT</term> support.|
482|[Security Statement](../security_statement/security_statement.md)|Provides the software versions, system hardening requirements, security configurations (data storage, debugging interfaces, running environments, and so on), permission configurations, and firewall settings of the TorchNPU, OpPlugin, TorchAir, and Ascend Extension for TensorPipe components.|Routine update.|482|[Security Statement](../security_statement/security_statement.md)|Provides the software versions, system hardening requirements, security configurations (data storage, debugging interfaces, running environments, and so on), permission configurations, and firewall settings of the TorchNPU, OpPlugin, TorchAir, and Ascend Extension for TensorPipe components.|Routine update.|
483 483 
484## Virus Scan and Vulnerability Patch List484## Virus Scan and Vulnerability Patch List
@@ -21,7 +21,7 @@ The NPUGraph_EX backend is suitable for LLM inference scenarios. It further acce
21compiled_model = torch.compile(model, backend="npugraph_ex")21compiled_model = torch.compile(model, backend="npugraph_ex")
22```22```
23 23 
24-For the compilation options (`options` parameter) supported by NPUGraph_EX and detailed usage guidance, see the [npugraph_ex backend](https://gitcode.com/Ascend/torchair/blob/26.1.0/docs/zh/npugraph_ex/npugraph_ex.md) in *TorchAir*.24+For the compilation options (`options` parameter) supported by NPUGraph_EX and detailed usage guidance, see the [npugraph_ex backend](https://gitcode.com/Ascend/torchair/blob/26.1.0/docs/en/npugraph_ex/npugraph_ex.md) in *TorchAir*.
25 25 
26## Call Example26## Call Example
27 27 
@@ -2,7 +2,7 @@
2 2 
3## Symptom Description3## Symptom Description
4 4 
5-During network tuning, after the user enables [`torch.npu.config.allow_internal_format = True`](https://gitcode.com/Ascend/op-plugin/blob/26.1.0/docs/en/custom_APIs/torch_npu-npu/%EF%BC%88beta%EF%BC%89torch_npu-npu-config-allow_internal_format.md), the model's computation results exhibit a precision anomaly.5+During network tuning, after the user enables [`torch.npu.config.allow_internal_format = True`](https://gitcode.com/Ascend/op-plugin/blob/26.1.0/docs/en/custom_APIs/torch_npu-npu/(beta)torch_npu-npu-config-allow_internal_format.md), the model's computation results exhibit a precision anomaly.
6 6 
7## Cause Analysis7## Cause Analysis
8 8 
@@ -43,5 +43,6 @@ This document uses various faults that developers may encounter during inference
43 After troubleshooting, the key points of fault handling should be recorded, and preventive and improvement measures for such faults should be provided to avoid the recurrence of similar faults.43 After troubleshooting, the key points of fault handling should be recorded, and preventive and improvement measures for such faults should be provided to avoid the recurrence of similar faults.
44 44 
45> [!NOTE] 45> [!NOTE]
46-> You can also share fault handling cases on the [Huawei Developer Community Forum](https://www.hiascend.com/forum/) to share your experience for other developers' reference, forming a virtuous cycle, enriching community content, and achieving mutual benefits.46+> You can also share fault handling cases on the Huawei Developer Community Forum to share your experience for other developers' reference, forming a virtuous cycle, enriching community content, and achieving mutual benefits.
47> The third-party tools mentioned in the fault handling steps provided in this document (such as eseye u and Netron) are examples, not mandatory tools. Please refer to them or replace them with other similar tools based on your actual situation.47> The third-party tools mentioned in the fault handling steps provided in this document (such as eseye u and Netron) are examples, not mandatory tools. Please refer to them or replace them with other similar tools based on your actual situation.
48+<!-- > You can also share fault handling cases on the [Huawei Developer Community Forum](https://www.hiascend.com/forum/) to share your experience for other developers' reference, forming a virtuous cycle, enriching community content, and achieving mutual benefits. -->
@@ -21,4 +21,5 @@ An operator that is not yet supported on the NPU is called.
21 21 
22## Solution22## Solution
23 23 
24-If only a warning is triggered without an error, you can ignore it if performance improvement is not a concern. Otherwise, use other replaceable and supported interfaces of torch. For details, see [Custom APIs](https://gitcode.com/Ascend/op-plugin/blob/26.1.0/docs/en/custom_APIs/overview.md) or [Native APIs](../native_apis/pytorch_2-12-0/overview.md).24+If only a warning is triggered without an error, you can ignore it if performance improvement is not a concern. Otherwise, use other replaceable and supported interfaces of torch. For details, see [Custom APIs](https://gitcode.com/Ascend/op-plugin/blob/26.1.0/docs/en/custom_APIs/overview.md) or Native APIs.
25+<!-- see [Custom APIs](https://gitcode.com/Ascend/op-plugin/blob/26.1.0/docs/en/custom_APIs/overview.md) or [Native APIs](../native_apis/pytorch_2-12-0/overview.md). -->
@@ -29,4 +29,4 @@ OpPlugin是TorchNPU的算子插件,为使用PyTorch框架的开发者提供便
29## 如何进行算子适配29## 如何进行算子适配
30 30 
31- 单算子适配的详细操作可参考后续章节。31- 单算子适配的详细操作可参考后续章节。
32-- 图模式算子开发请参考《TorchAir》中的“[自定义算子入图](https://www.hiascend.com/document/detail/zh/Pytorch/730/modthirdparty/torchairuseguide/torchair_00055.html)”章节。32+- 图模式算子开发请参考《TorchAir》中的“[自定义算子入图](https://gitcode.com/Ascend/torchair/blob/26.1.0/docs/zh/custom_op_graph/overview.md)”章节。
@@ -31,7 +31,7 @@
31 31 
32默认值是1。32默认值是1。
33 33 
34-此环境变量使用详情请参考《环境变量》中的“[MULTI\_STREAM\_MEMORY\_REUSE](https://www.hiascend.com/document/detail/zh/Pytorch/720/comref/Envvariables/Envir_016.html)”章节。34+此环境变量使用详情请参考《环境变量》中的“[MULTI\_STREAM\_MEMORY\_REUSE](../environment_variable_reference/MULTI_STREAM_MEMORY_REUSE.md)”章节。
35 35 
36## 使用样例36## 使用样例
37 37 
@@ -175,7 +175,7 @@
175 175 
176 |模型分类|组件|迁移指导|176 |模型分类|组件|迁移指导|
177 |--|--|--|177 |--|--|--|
178- |Megatron-LM分布式大模型|MindSpeed Core亲和加速模块|请参见《[分布式训练加速库迁移指南](https://gitcode.com/Ascend/MindSpeed/blob/master/docs/zh/user-guide/model-migration.md)》。|178+ |Megatron-LM分布式大模型|MindSpeed Core亲和加速模块|请参见《[分布式训练加速库迁移指南](https://gitcode.com/Ascend/MindSpeed/blob/26.1.0_core_r0.12.1/docs/zh/user-guide/model-migration.md)》。|
179- |Megatron-LM大语言模型|MindSpeed LLM套件|请参见《[MindSpeed LLM文档导读](https://gitcode.com/Ascend/MindSpeed-LLM/blob/master/docs/zh/docs_guide.md)》。|179+ |Megatron-LM大语言模型|MindSpeed LLM套件|请参见《[MindSpeed LLM文档导读](https://gitcode.com/Ascend/MindSpeed-LLM/blob/26.1.0/docs/zh/docs_guide.md)》。|
180- |Megatron-LM多模态模型|MindSpeed MM套件|请参见《[MindSpeed MM迁移调优指南](https://gitcode.com/Ascend/MindSpeed-MM/blob/master/docs/zh/pytorch/model-migration.md)》。|180+ |Megatron-LM多模态模型|MindSpeed MM套件|请参见《[MindSpeed MM迁移调优指南](https://gitcode.com/Ascend/MindSpeed-MM/blob/26.1.0/docs/zh/pytorch/model-migration.md)》。|
181- |大语言模型或多模态模型|veRL套件|请参见《[veRL迁移指南](https://github.com/verl-project/verl/blob/main/docs/ascend_tutorial/dev_guide/model_dev/transfer_to_npu_guide.md)》。|181+ |大语言模型或多模态模型|veRL套件|请参见《[veRL迁移指南](https://github.com/verl-project/verl/blob/main/docs/ascend_tutorial/zh/dev_guide/model_dev/transfer_to_npu_guide.md)》。|
@@ -34,7 +34,7 @@
34 34 
35### 相关产品版本配套说明35### 相关产品版本配套说明
36 36 
37-固件和驱动的版本配套表与所有的昇腾硬件及CANN版本相关,具体选择请参考[CANN版本说明](https://gitcode.com/cann/release-management/blob/master/9.1.0/release-notes.md)。37+固件和驱动的版本配套表与所有的昇腾硬件及CANN版本相关,具体选择请参考[CANN版本说明](https://www.hiascend.com/document/detail/zh/CANNCommunityEdition/910/softwareinst/releasenote/9.1.0/release-notes.md)。
38 38 
39TorchNPU代码分支名称采用 **\{PyTorch版本\}-\{TorchNPU版本\}** 的命名规则,前者为TorchNPU匹配的PyTorch版本,详细匹配如下表:39TorchNPU代码分支名称采用 **\{PyTorch版本\}-\{TorchNPU版本\}** 的命名规则,前者为TorchNPU匹配的PyTorch版本,详细匹配如下表:
40 40