已合并
【PR】: 【质量加固】修复完善readme一致性,主要包括tensorflow和superkernel #1734
【PR】: 【质量加固】修复完善readme一致性,主要包括tensorflow和superkernel #1734
已合并
loading-zzq创建于 8月14日
16 个文件变更+143-104
MREADME.md+23-17
@@ -26,22 +26,29 @@ Graph-autofusion 是一个面向昇腾(Ascend)芯片的轻量级、解耦式
26## 🔍目录结构26## 🔍目录结构
27 27 
28```text28```text
29-├── autofuse # Autofuse 组件,Autofuse 源代码、测试、文档均在该子目录中29+graph-autofusion/
30-├── build.sh # 一键式项工程编译脚本30+├── autofuse # Autofuse 组件,Autofuse 源代码、测试、文档均在该子录中
31-├── cmake # 项目工程编译目录31+├── build.sh # 一键式项目工程编译脚本
32-├── CMakeLists.txt # 项目 CMakeLists32+├── cmake # 项目工程编译目录
33-├── docs # 项目整体文档33+├── CMakeLists.txt # 项目 CMakeLists
34-├── zh # 34+├── docs # 项目整体文档
35-├── build.md # 一键式构建脚本文档35+ ├── zh #
36- ── ... # 其他中36+ ── build.md # 一键式构建脚本文档
37-── en # 文文档37+ │ └── ... # 其他中文文档
38- │ ├── build.md # 一键式构建脚本文档38+── en #
39- │ └── ... # 其他英39+── build.md # 一键式构建脚本文档
40-── super_kernel # SuperKernel 组件,SuperKernel 源代码、测试、文档均在该子目录中40+│ └── ... # 其他英
41-├── ... # 未来规划的组件41+├── scripts # 构建、环境安装和测试脚本
42-├── README.md # graph-autofusion项目整体功能介绍42+├── env_install # 环境安装脚本
43-├── scripts # 脚本路径43+├── package # 打包脚本
44- ── package44+ ── test # 测试脚本
45+│ ├── check_env.sh # 环境检查脚本
46+│ ├── init_env.sh # 环境初始化脚本
47+│ ├── oat_check.sh # OAT 合规性检查脚本
48+│ └── support_multiple_versions_of_lcov.sh # 多版本 lcov 兼容脚本
49+├── super_kernel # SuperKernel 组件,SuperKernel 源代码、测试、文档均在该子目录中
50+├── README.md # graph-autofusion 项目整体功能介绍
51+└── README_en.md # graph-autofusion 项目英文介绍
45```52```
46 53 
47## 📝相关信息54## 📝相关信息
@@ -49,4 +56,3 @@ Graph-autofusion 是一个面向昇腾(Ascend)芯片的轻量级、解耦式
49- [贡献指南](CONTRIBUTING.md)56- [贡献指南](CONTRIBUTING.md)
50- [安全声明](SECURITY.md)57- [安全声明](SECURITY.md)
51- [许可证](LICENSE)58- [许可证](LICENSE)
52- 
@@ -25,26 +25,33 @@ Component features:
25## 🔍Directory Structure25## 🔍Directory Structure
26 26 
27```text27```text
28-├── autofuse # Autofuse component. Autofuse source code, tests, and documentation are in this subdirectory.28+graph-autofusion/
29-├── build.sh # One-click project build script29+├── autofuse # Autofuse component. Autofuse source code, tests, and documentation are in this subdirectory.
30-├── cmake # Project build directory30+├── build.sh # One-click project build script
31-├── CMakeLists.txt # Project CMakeLists31+├── cmake # Project build directory
32-├── docs # Project overall documentation32+├── CMakeLists.txt # Project CMakeLists
33-├── zh # Chinese documentation33+├── docs # Project documentation
34-├── build.md # One-click build script documentation34+ ├── zh # Chinese documentation
35- ── ... # Other Chinese documentation35+ ── build.md # One-click build script documentation
36-── en # English documentation36+ │ └── ... # Other Chinese documentation
37- │ ├── build.md # One-click build script documentation37+── en # English documentation
38- │ └── ... # Other English documentation38+── build.md # One-click build script documentation
39-── super_kernel # SuperKernel component. SuperKernel source code, tests, and documentation are in this subdirectory.39+│ └── ... # Other English documentation
40-├── ... # Planned future components40+├── scripts # Build, environment installation, and test scripts
41-├── README.md # graph-autofusion project overall functionality introduction41+├── env_install # Environment installation scripts
42-├── scripts # Script path42+├── package # Packaging scripts
43- ── package43+ ── test # Test scripts
44+│ ├── check_env.sh # Environment check script
45+│ ├── init_env.sh # Environment initialization script
46+│ ├── oat_check.sh # OAT compliance check script
47+│ └── support_multiple_versions_of_lcov.sh # Multi-version lcov compatibility script
48+├── super_kernel # SuperKernel component. SuperKernel source code, tests, and documentation are in this subdirectory.
49+├── README.md # Chinese graph-autofusion project introduction
50+└── README_en.md # English graph-autofusion project introduction
44```51```
45 52 
46## 📝Related Information53## 📝Related Information
47 54 
48- [Contributing Guide](CONTRIBUTING_en.md)55- [Contributing Guide](CONTRIBUTING_en.md)
49- [Security Statement](SECURITY_en.md)56- [Security Statement](SECURITY_en.md)
50-- [License](LICENSE)57+- [License](LICENSE)
@@ -20,10 +20,13 @@ autofuse/
20├── inc # 供 GE 调用接口20├── inc # 供 GE 调用接口
21├── optimize # 调度切分 模块21├── optimize # 调度切分 模块
22├── scripts # 脚本路径22├── scripts # 脚本路径
23+├── tests # 测试用例与测试框架
24+├── tools # 调试与分析工具
23├── v35 # 昇腾950 芯片相关优化25├── v35 # 昇腾950 芯片相关优化
24├── CMakeLists.txt # CMake 配置文件26├── CMakeLists.txt # CMake 配置文件
25├── blacklist.txt # 工程配置文件27├── blacklist.txt # 工程配置文件
26-├── README.md28+├── README.md # 中文说明文档
29+└── README_en.md # 英文说明文档
27```30```
28 31 
29## 构建与安装32## 构建与安装
@@ -22,10 +22,13 @@ autofuse/
22├── inc # Interfaces provided for GE22├── inc # Interfaces provided for GE
23├── optimize # Scheduling and partitioning module23├── optimize # Scheduling and partitioning module
24├── scripts # Script directory24├── scripts # Script directory
25+├── tests # Test cases and test framework
26+├── tools # Debugging and analysis tools
25├── v35 # Ascend 950 chip-related optimizations27├── v35 # Ascend 950 chip-related optimizations
26├── CMakeLists.txt # CMake configuration file28├── CMakeLists.txt # CMake configuration file
27├── blacklist.txt # Project configuration file29├── blacklist.txt # Project configuration file
28-├── README.md30+├── README.md # Chinese documentation
31+└── README_en.md # English documentation
29```32```
30 33 
31## Build and Installation34## Build and Installation
@@ -12,7 +12,7 @@
12 12 
13注:当前暂不支持gather融合能力,等待[ issue175 ](https://gitcode.com/cann/graph-autofusion/issues/175)这个issue完成后gather可以和add进行融合。13注:当前暂不支持gather融合能力,等待[ issue175 ](https://gitcode.com/cann/graph-autofusion/issues/175)这个issue完成后gather可以和add进行融合。
14 14 
15-三个用例均开启 NPU Profiling,可通过生成的性能分析文件查看融合后的 Kernel15+三个用例均开启 NPU Profiling,可通过生成的性能分析文件查看算子执行情况和融合结果
16 16 
17## 目录结构17## 目录结构
18 18 
@@ -12,7 +12,7 @@ The following three examples are currently provided:
12 12 
13> **Note:** Gather fusion is not currently supported. After [issue175](https://gitcode.com/cann/graph-autofusion/issues/175) is resolved, `gather` will be able to fuse with `add`.13> **Note:** Gather fusion is not currently supported. After [issue175](https://gitcode.com/cann/graph-autofusion/issues/175) is resolved, `gather` will be able to fuse with `add`.
14 14 
15-NPU Profiling is enabled in all three examples. You can inspect the generated profiling data to view the fused kernels.15+NPU Profiling is enabled in all three examples. You can inspect the generated profiling data to review operator execution and fusion results.
16 16 
17## Directory Structure17## Directory Structure
18 18 
@@ -19,6 +19,8 @@
19 19 
20运行本用例前,需依次完成以下步骤:20运行本用例前,需依次完成以下步骤:
21 21 
22+> 以下命令均在 graph-autofusion 仓库根目录执行。
23+ 
221. 通过 [安装指导](../../../docs/zh/quick_install.md) 正确安装 toolkit 和 ops 包,并配置环境变量241. 通过 [安装指导](../../../docs/zh/quick_install.md) 正确安装 toolkit 和 ops 包,并配置环境变量
232. 通过 [环境编译部署](../../../docs/env_install/tensorflow/env_tf.md) 搭建 TensorFlow 环境(x86_64 可直接 pip 安装,aarch64 需源码编译)252. 通过 [环境编译部署](../../../docs/env_install/tensorflow/env_tf.md) 搭建 TensorFlow 环境(x86_64 可直接 pip 安装,aarch64 需源码编译)
243. 也可使用一键配置脚本自动搭建环境(**仅 x86_64 架构可用**):263. 也可使用一键配置脚本自动搭建环境(**仅 x86_64 架构可用**):
@@ -30,9 +32,9 @@
30 脚本完成后激活环境:32 脚本完成后激活环境:
31 33 
32 ```bash34 ```bash
33- source scripts/env_install/env/activate_tf1.sh # TF 1.1535+ source scripts/env_install/tensorflow/env/activate_tf1.sh # TF 1.15
34 # 或36 # 或
35- source scripts/env_install/env/activate_tf2.sh # TF 2.6.537+ source scripts/env_install/tensorflow/env/activate_tf2.sh # TF 2.6.5
36 ```38 ```
37 39 
38 > **aarch64 架构不支持此脚本**:aarch64 请按 [aarch64 架构 TF 源码编译](../../../docs/env_install/tensorflow/build_tf_aarch64.md) 手动编译。40 > **aarch64 架构不支持此脚本**:aarch64 请按 [aarch64 架构 TF 源码编译](../../../docs/env_install/tensorflow/build_tf_aarch64.md) 手动编译。
@@ -57,18 +59,16 @@ export AUTOFUSE_FLAGS="--enable_autofuse=true"
57## 执行用例59## 执行用例
58 60 
59```bash61```bash
60-cd af_tf_eleandele
61- 
62# TF 1.15 环境62# TF 1.15 环境
63-python3 test_abs_relu_exp.py --mode tf163+python3 autofuse/examples/tensorflow/af_tf_eleandele/test_abs_relu_exp.py --mode tf1
64 64 
65# TF 2.6.5 环境(兼容模式)65# TF 2.6.5 环境(兼容模式)
66-python3 test_abs_relu_exp.py --mode tf2-compat66+python3 autofuse/examples/tensorflow/af_tf_eleandele/test_abs_relu_exp.py --mode tf2-compat
67```67```
68 68 
69## 预期执行结果69## 预期执行结果
70 70 
71-脚本执行 100 步推理,无报错表示融合算子执行成功。可通过 Dump 图或 Profiling 进一步验证融合效果71+脚本执行 100 步推理,无报错表示用例执行成功;是否发生融合,需要通过 Dump 图或 Profiling 进一步确认
72 72 
73## 参考73## 参考
74 74 
@@ -19,6 +19,8 @@ Use AutoFuse to perform operator fusion in TensorFlow networks. The AutoFuse fus
19 19 
20Before running this example, complete the following steps in sequence:20Before running this example, complete the following steps in sequence:
21 21 
22+> Run all the following commands from the graph-autofusion repository root.
23+ 
221. Follow the [Installation Guide](../../../docs/en/quick_install.md) to correctly install the Toolkit and Ops packages and configure the environment variables.241. Follow the [Installation Guide](../../../docs/en/quick_install.md) to correctly install the Toolkit and Ops packages and configure the environment variables.
232. Follow [Environment Build and Deployment](../../../docs/env_install/tensorflow/env_tf.md) to set up the TensorFlow environment. On x86_64, TensorFlow can be installed directly using pip. On aarch64, TensorFlow must be built from source.252. Follow [Environment Build and Deployment](../../../docs/env_install/tensorflow/env_tf.md) to set up the TensorFlow environment. On x86_64, TensorFlow can be installed directly using pip. On aarch64, TensorFlow must be built from source.
243. Alternatively, use the one-click configuration script to automatically set up the environment. This script is available only for the **x86_64 architecture**:263. Alternatively, use the one-click configuration script to automatically set up the environment. This script is available only for the **x86_64 architecture**:
@@ -30,9 +32,9 @@ Before running this example, complete the following steps in sequence:
30 After the script is complete, activate the environment:32 After the script is complete, activate the environment:
31 33 
32 ```bash34 ```bash
33- source scripts/env_install/env/activate_tf1.sh # TensorFlow 1.1535+ source scripts/env_install/tensorflow/env/activate_tf1.sh # TensorFlow 1.15
34 # Or36 # Or
35- source scripts/env_install/env/activate_tf2.sh # TensorFlow 2.6.537+ source scripts/env_install/tensorflow/env/activate_tf2.sh # TensorFlow 2.6.5
36 ```38 ```
37 39 
38 > **This script does not support the aarch64 architecture.** On aarch64, follow [Building TensorFlow from Source on aarch64](../../../docs/env_install/tensorflow/build_tf_aarch64.md) to perform the build manually.40 > **This script does not support the aarch64 architecture.** On aarch64, follow [Building TensorFlow from Source on aarch64](../../../docs/env_install/tensorflow/build_tf_aarch64.md) to perform the build manually.
@@ -59,18 +61,16 @@ export AUTOFUSE_FLAGS="--enable_autofuse=true"
59## Run the Example61## Run the Example
60 62 
61```bash63```bash
62-cd af_tf_eleandele
63- 
64# TensorFlow 1.15 environment64# TensorFlow 1.15 environment
65-python3 test_abs_relu_exp.py --mode tf165+python3 autofuse/examples/tensorflow/af_tf_eleandele/test_abs_relu_exp.py --mode tf1
66 66 
67# TensorFlow 2.6.5 environment in compatibility mode67# TensorFlow 2.6.5 environment in compatibility mode
68-python3 test_abs_relu_exp.py --mode tf2-compat68+python3 autofuse/examples/tensorflow/af_tf_eleandele/test_abs_relu_exp.py --mode tf2-compat
69```69```
70 70 
71## Expected Result71## Expected Result
72 72 
73-The script performs 100 inference steps. If no error is reported, the fused operator has been executed successfully. You can further verify the fusion result using graph dump files or Profiling data.73+The script performs 100 inference steps. If no errors occur, the sample is considered to have run successfully. Whether operator fusion has occurred should be further verified using graph dumps or profiling data.
74 74 
75## References75## References
76 76 
@@ -13,18 +13,20 @@ autofuse 融合 `abs + relu + exp` 三个 elementwise 算子。脚本通过 `--m
13 13 
14## 执行命令14## 执行命令
15 15 
16+以下命令均在 graph-autofusion 仓库根目录执行。
17+ 
16```bash18```bash
17# TF 1.15 环境19# TF 1.15 环境
18-source scripts/env_install/env/activate_tf1.sh20+source scripts/env_install/tensorflow/env/activate_tf1.sh
19-python3 test_abs_relu_exp.py --mode tf121+python3 autofuse/examples/tensorflow/af_tf_eleandele/test_abs_relu_exp.py --mode tf1
20 22 
21# TF 2.6.5 环境(兼容模式)23# TF 2.6.5 环境(兼容模式)
22-source scripts/env_install/env/activate_tf2.sh24+source scripts/env_install/tensorflow/env/activate_tf2.sh
23-python3 test_abs_relu_exp.py --mode tf2-compat25+python3 autofuse/examples/tensorflow/af_tf_eleandele/test_abs_relu_exp.py --mode tf2-compat
24```26```
25 27 
26## 预期执行结果28## 预期执行结果
27 29 
28脚本构造 `abs → relu → exp` 计算图,在 NPU 上执行 100 步推理,无报错即表示融合成功。三个算子被融合为一个 `AscBackend` 类型的融合算子 `autofuse_pointwise_0_Abs_Relu_Exp`,在 NPU 上以单个 kernel 执行。30脚本构造 `abs → relu → exp` 计算图,在 NPU 上执行 100 步推理,无报错即表示融合成功。三个算子被融合为一个 `AscBackend` 类型的融合算子 `autofuse_pointwise_0_Abs_Relu_Exp`,在 NPU 上以单个 kernel 执行。
29 31 
30-如需查看融合效果,可开启 profiling(脚本已内置 profiling 配置),执行完成后在 `./profiling` 目录下查看 `PROF_*/mindstudio_profiler_output/op_summary_*.csv`,此时仅有算子名为 `autofuse_pointwise_0_Abs_Relu_Exp`kernel,表示三个算子已融合为一个融合算子。32+如需查看融合效果,可开启 profiling(脚本已内置 profiling 配置),执行完成后在仓库根目录的 `./profiling` 目录下查看 `PROF_*/mindstudio_profiler_output/op_summary_*.csv`,此时 Profiling 中存在 autofuse_pointwise_0_Abs_Relu_Exp,且不再出现独立Abs、Relu、Exp Kernel,表示三个算子已融合为一个融合算子。
@@ -11,18 +11,20 @@ AutoFuse fuses the three elementwise operators `abs + relu + exp`. The script us
11 11 
12## Execution Commands12## Execution Commands
13 13 
14+Run all the following commands from the graph-autofusion repository root.
15+ 
14```bash16```bash
15# TensorFlow 1.15 environment17# TensorFlow 1.15 environment
16-source scripts/env_install/env/activate_tf1.sh18+source scripts/env_install/tensorflow/env/activate_tf1.sh
17-python3 test_abs_relu_exp.py --mode tf119+python3 autofuse/examples/tensorflow/af_tf_eleandele/test_abs_relu_exp.py --mode tf1
18 20 
19# TensorFlow 2.6.5 environment (compatibility mode)21# TensorFlow 2.6.5 environment (compatibility mode)
20-source scripts/env_install/env/activate_tf2.sh22+source scripts/env_install/tensorflow/env/activate_tf2.sh
21-python3 test_abs_relu_exp.py --mode tf2-compat23+python3 autofuse/examples/tensorflow/af_tf_eleandele/test_abs_relu_exp.py --mode tf2-compat
22```24```
23 25 
24## Expected Result26## Expected Result
25 27 
26The script constructs an `abs → relu → exp` computation graph and performs 100 inference steps on the NPU. If no error is reported, the fusion is successful. The three operators are fused into an `AscBackend`-type fused operator named `autofuse_pointwise_0_Abs_Relu_Exp`, which is executed as a single Kernel on the NPU.28The script constructs an `abs → relu → exp` computation graph and performs 100 inference steps on the NPU. If no error is reported, the fusion is successful. The three operators are fused into an `AscBackend`-type fused operator named `autofuse_pointwise_0_Abs_Relu_Exp`, which is executed as a single Kernel on the NPU.
27 29 
28-To view the fusion result, enable Profiling, which is already configured in the script. After execution is complete, check `PROF_*/mindstudio_profiler_output/op_summary_*.csv` in the `./profiling` directory. If the only Kernel is named `autofuse_pointwise_0_Abs_Relu_Exp`, the three operators have been fused into a single fused operator.30+To view the fusion result, enable profiling (the script already includes the profiling configuration). After execution, check `PROF_*/mindstudio_profiler_output/op_summary_*.csv` under the `./profiling` directory in the repository root. If `autofuse_pointwise_0_Abs_Relu_Exp` appears in the profiling data and the standalone `Abs`, `Relu`, and `Exp` kernels no longer appear, it indicates that the three operators have been fused into a single fused operator.
@@ -56,16 +56,23 @@
56super_kernel/56super_kernel/
57├── docs # 文档介绍57├── docs # 文档介绍
58├── examples # 示例脚本或 Notebook,演示典型用法58├── examples # 示例脚本或 Notebook,演示典型用法
59+├── include # SuperKernel 对外头文件
60+├── kernel # 设备侧 Kernel 实现
59├── scripts # 脚本路径61├── scripts # 脚本路径
60-├── src # 业务代码入口,后续根据功能划分模块62+├── src # SuperKernel 业务代码
61-── superkernel # SuperKernel 业务代码63+── aot # AOT 编译与优化实现
64+│ └── jit # JIT 编译实现
62├── tests # 测试工程目录65├── tests # 测试工程目录
66+│ ├── aot # AOT 测试
67+│ ├── fixtures # 共享测试数据与夹具
63│ ├── st # System Test68│ ├── st # System Test
64│ ├── ut # Unit Test69│ ├── ut # Unit Test
65-── utils # 通用校验与工具函数70+── utils # 通用校验与工具函数
71+│ └── conftest.py # pytest 公共配置
66├── CMakeLists.txt # CMake 配置文件72├── CMakeLists.txt # CMake 配置文件
67├── pyproject.toml # 项目元信息与打包配置73├── pyproject.toml # 项目元信息与打包配置
68-├── README.md74+├── README.md # 中文说明文档
75+├── README_en.md # 英文说明文档
69└── requirements-dev.txt # python 依赖配置文件76└── requirements-dev.txt # python 依赖配置文件
70```77```
71 78 
@@ -48,19 +48,26 @@ Additionally, SuperKernel supports memory semantics-based Notify and Wait events
48 48 
49```text49```text
50super_kernel/50super_kernel/
51-├── docs # documentation introduction51+├── docs # Documentation
52-├── examples # example scripts or Notebooks demonstrating typical usage52+├── examples # Example scripts or notebooks demonstrating typical usage
53-├── scripts # script path53+├── include # Public SuperKernel headers
54-├── src # business code entry, modules divided by function54+├── kernel # Device-side kernel implementations
55-│ └── superkernel # SuperKernel business code55+── scripts # Scripts
56-├── tests # test project directory56+├── src # SuperKernel source code
57-│ ├── st # System Test57+│ ├── aot # AOT compilation and optimization implementation
58-── ut # Unit Test58+── jit # JIT compilation implementation
59-│ └── utils # common validation and utility functions59+── tests # Test project directory
60+│ ├── aot # AOT tests
61+│ ├── fixtures # Shared test data and fixtures
62+│ ├── st # System tests
63+│ ├── ut # Unit tests
64+│ ├── utils # Common validation and utility functions
65+│ └── conftest.py # Shared pytest configuration
60├── CMakeLists.txt # CMake configuration file66├── CMakeLists.txt # CMake configuration file
61-├── pyproject.toml # project metadata and packaging configuration67+├── pyproject.toml # Project metadata and packaging configuration
62-├── README.md68+├── README.md # Chinese documentation
63-── requirements-dev.txt # python dependency configuration file69+── README_en.md # English documentation
70+└── requirements-dev.txt # Python dependency configuration file
64```71```
65 72 
66## Build and Installation73## Build and Installation
@@ -6,12 +6,13 @@
6 6 
7## 目录结构7## 目录结构
8```text8```text
9-├── super_kernel_base # 基础功能的样例9+examples/
10-│ └── superkernel_scope.py # 通过super_kernel完成算子融合10+── super_kernel_base # 基础功能的样例
11-└── super_kernel_profiling # 展示profiling的样例11+└── superkernel_scope.py # 通过super_kernel完成算子融合
12-── superkernel_compare.py # 使用super_kernel与不使用super_kernel数据进行对比12+── super_kernel_profiling # 展示profiling样例
13-└── super_kernel_runtime_ascendc_only # 极简super_kernel样例13+└── superkernel_compare.py # 使用super_kernel与不使用super_kernel的数据进行对比
14- └── superkernel_runtime_ascendc_basic.py # 通过ascendc编译super_kernel完成算子融合,并使用runtime运行时环境执行14+└── super_kernel_runtime_ascendc_only # 极简super_kernel样例
15+ └── superkernel_runtime_ascendc_basic.py # 通过ascendc编译super_kernel完成算子融合,并使用runtime运行时环境执行
15```16```
16## 前置说明17## 前置说明
17请务必参考[《源码构建指南》](../../docs/zh/build.md)完成前置环境准备。18请务必参考[《源码构建指南》](../../docs/zh/build.md)完成前置环境准备。
@@ -6,12 +6,13 @@ Use super_kernel to complete operator fusion.
6 6 
7## Directory Structure7## Directory Structure
8```text8```text
9-├── super_kernel_base # basic functionality sample9+examples/
10-│ └── superkernel_scope.py # complete operator fusion through super_kernel10+── super_kernel_base # basic functionality sample
11-└── super_kernel_profiling # profiling demonstration sample11+└── superkernel_scope.py # complete operator fusion through super_kernel
12-── superkernel_compare.py # compare data using super_kernel vs not using super_kernel12+── super_kernel_profiling # profiling demonstration sample
13-└── super_kernel_runtime_ascendc_only # minimal super_kernel sample13+└── superkernel_compare.py # compare data using super_kernel vs not using super_kernel
14- └── superkernel_runtime_ascendc_basic.py # compile super_kernel through ascendc for operator fusion, execute using runtime environment14+└── super_kernel_runtime_ascendc_only # minimal super_kernel sample
15+ └── superkernel_runtime_ascendc_basic.py # compile super_kernel through ascendc for operator fusion, execute using runtime environment
15```16```
16 17 
17## Prerequisites18## Prerequisites
@@ -35,4 +36,4 @@ pip3 install -r requirements.txt
35 36 
36## Reference37## Reference
37 38 
38-Please refer to relevant content in "[Ascend Extension for PyTorch](https://www.hiascend.com/document/redirect/pytorchuserguide)" under "Suite and Third-party Libraries > PyTorch Graph Mode Usage (TorchAir) > API Reference > torchair.scope > super_kernel".39+Please refer to relevant content in "[Ascend Extension for PyTorch](https://www.hiascend.com/document/redirect/pytorchuserguide)" under "Suite and Third-party Libraries > PyTorch Graph Mode Usage (TorchAir) > API Reference > torchair.scope > super_kernel".
@@ -8,11 +8,12 @@
8 8 
9## 目录结构9## 目录结构
10```text10```text
11-├── super_kernel_runtime_ascendc_only # 目录11+super_kernel_runtime_ascendc_only/
12-── superkernel_runtime_ascendc_basic.py # 主入口,流程上包含子kernel编译、superkernel编译、内存分配、加载执行等12+── README.md # 中文说明文档
13-── compile_sk.py # 编译sub_kernel、super_kernel算子13+── README_en.md # 英文说明文档
14-── utils.py # 工具函数14+── compile_sk.py # 编译sub_kernel、super_kernel算子
15- 15+├── superkernel_runtime_ascendc_basic.py # 主入口,流程上包含子kernel编译、superkernel编译、内存分配、加载执行等
16+└── utils.py # 工具函数
16```17```
17 18 
18## 用例介绍19## 用例介绍
@@ -23,7 +24,6 @@ graph TB
23 input1[input1] --> sk[superkernel]24 input1[input1] --> sk[superkernel]
24 input2[input2] --> sk25 input2[input2] --> sk
25 sk --> output[output]26 sk --> output[output]
26-
27 %% 放大的内部视图:用子图展示superkernel内部结构27 %% 放大的内部视图:用子图展示superkernel内部结构
28 subgraph superkernel内部结构28 subgraph superkernel内部结构
29 inner1_in(inner_input1) --> pow(pow)29 inner1_in(inner_input1) --> pow(pow)
@@ -9,11 +9,12 @@ Core features:
9 9 
10## Directory Structure10## Directory Structure
11```text11```text
12-├── super_kernel_runtime_ascendc_only # directory12+super_kernel_runtime_ascendc_only/
13-── superkernel_runtime_ascendc_basic.py # main entry, flow includes sub-kernel compilation, superkernel compilation, memory allocation, loading execution, and so on13+── README.md # Chinese documentation
14-── compile_sk.py # compile sub_kernel, super_kernel operators14+── README_en.md # English documentation
15-── utils.py # utility functions15+── compile_sk.py # Compile sub-kernel and SuperKernel operators
16- 16+├── superkernel_runtime_ascendc_basic.py # Main entry for sub-kernel compilation, SuperKernel compilation, memory allocation, loading, and execution
17+└── utils.py # Utility functions
17```18```
18 19 
19## Use Case Introduction20## Use Case Introduction
@@ -24,7 +25,6 @@ graph TB
24 input1[input1] --> sk[superkernel]25 input1[input1] --> sk[superkernel]
25 input2[input2] --> sk26 input2[input2] --> sk
26 sk --> output[output]27 sk --> output[output]
27-
28 %% Enlarged internal view: subgraph shows superkernel internal structure28 %% Enlarged internal view: subgraph shows superkernel internal structure
29 subgraph superkernel_internal_structure29 subgraph superkernel_internal_structure
30 inner1_in(inner_input1) --> pow(pow)30 inner1_in(inner_input1) --> pow(pow)
@@ -59,4 +59,4 @@ python3 superkernel_runtime_ascendc_basic.py
59After execution, print shows success:59After execution, print shows success:
60```text60```text
61execute sample success61execute sample success
62-```62+```