文件最后提交记录最后更新时间
graph-autofusion is ready now! 7 个月前
Synchronize open source repositories and private repositories. Co-authored-by: XuebinYang<yangxuebin6@hisilicon.com> # message auto-generated for no-merge-commit merge: !56 merge master into master 【feat】: Synchronize open source repositories and private repositories. Created-by: XuebinYang Commit-by: XuebinYang Merged-by: cann-robot Description: # Pull Request ## 描述 Synchronize open source repositories and private repositories. The main changes are as follows: The interface between the super kernel and Ascend C package is changed from super_kernel_compile to compile_super_kernel. The super_kernel_feature_manager file is added to manage the feature compatibility changes between Ascend C and the super kernel. The enum type, such as the kernel type of the super kernel, is added to ensure independent upgrade of the graph-autofusion package. ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [x] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [x] 📝 文档内容更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> ## 如何测试 描述测试此变更的步骤和前提条件: 1.继承用例通过 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 在此添加任何其他关于本次 PR 的说明。 See merge request: cann/graph-autofusion!564 个月前
refactor(aot): align cpp utest coverage flow and execution behavior Co-authored-by: yrz1027<yangruizhi5@huawei.com> # message auto-generated for no-merge-commit merge: !271 merge refactor/aot-cpp-utest-coverage-flow into master refactor(aot): align cpp utest coverage flow and execution behavior Created-by: yrz1027 Commit-by: yrz1027 Merged-by: cann-robot Description: # Pull Request ## 描述 本次 PR 统一整理 build.sh 的测试选择和 coverage 执行链路,让 super_kernel 的 Python/C++ 测试、模块选择、样例运行、打包与覆盖率入口更清晰、可扩展。 主要变更: - 将测试入口统一为 -u/-s + --impl=<py|cpp|all> + --module=<name>,默认模块为 all。 - 通过模块 action handler 分发 py_ut/cpp_ut/py_st/run_example,未实现组合静默跳过,避免因为当前暂未支持 cpp_st 导致默认全量失败。 - AOT C++ UT 改为显式 run/coverage target,避免依赖 POST_BUILD 导致二进制未重编时测试不执行。 - C++ coverage 输出固定到 super_kernel/coverage/cpp_ut,并集中清理 Python/C++ coverage 残留。 - run_llt_binary.sh 保留 gtest filter 预检查,空 --gtest_filter= 不再误触发;临时文件清理由统一 cleanup() 处理。 - --run_example 不再接受可选模块参数,模块选择统一使用 --module,避免 optional-arg 解析跳过后续选项。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [x] 🐛 Bug 修复 - [ ] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [x] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [x] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue 暂无关联 Issue。 ## 如何测试 描述测试此变更的步骤和前提条件: 1. 历史全量回归已在真实环境串行执行,每个 case 前清理 coverage/prof_result/super_kernel/coverage/.pytest_cache、AOT output、build/**/*.gcda 和临时 package 目录;结果 28/28 通过,日志目录:/tmp/gaf_rebase_full_regression。 2. 历史全量覆盖范围包括:--help-u 全组合、-s 全组合、--run_example 全组合、-c 全组合、--pkg--pkg --cann_3rd_lib_path--build-type Debug、非法 --impl/--module。 3. 本轮 fresh 轻量校验通过:bash -n build.shbash -n super_kernel/tests/aot/cmake/tools/run_llt_binary.sh./build.sh --help。 4. 本轮 fresh 参数解析校验通过:--run_example -u 可正确解析为独立选项;--run_example=superkernel 会明确拒绝,模块需改用 --run_example --module=superkernel。 ## 核对清单 <!-- [x] 表示选中 --> - [ ] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [ ] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 历史全量回归中,cov_impl_cpp 日志确认执行到 Built target collect_coverage_dataBuild run cpp utest success!pkg_with_third_party 日志确认生成 cann-graph-autofusion_9.0.0_linux-aarch64.run。 See merge request: cann/graph-autofusion!2711 个月前
【PR】: superkernel最小依赖sample Co-authored-by: zhanjun<zhanjun6@hisilicon.com> # message auto-generated for no-merge-commit merge: !9 merge b_sk_sample into master 【PR】: superkernel最小依赖sample Created-by: zhanj Commit-by: zhanjun Merged-by: turing_project1 Description: # Pull Request ## 描述 请清晰准确地描述本次 Pull Request 的意图和变更内容。 提供一个sample,能够支持superkernel仅仅依赖runtime&Ascendc就能工作 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [x] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> ## 如何测试 描述测试此变更的步骤和前提条件: 1. 2. ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 在此添加任何其他关于本次 PR 的说明。 See merge request: cann/graph-autofusion!96 个月前
graph-autofusion is ready now! 7 个月前
docs: 更新super_kernel样例readme Co-authored-by: zhangyujia77<zhangyujia37@huawei.com> # message auto-generated for no-merge-commit merge: !226 merge fixreadme into master docs: 更新super_kernel样例readme Created-by: zhangyujia77 Commit-by: zhangyujia77 Merged-by: cann-robot Description: # Pull Request ## 描述 更新super_kernel样例readme ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [ ] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [x] 📝 文档内容更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> ## 如何测试 描述测试此变更的步骤和前提条件: 1. 2. ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 在此添加任何其他关于本次 PR 的说明。 See merge request: cann/graph-autofusion!2261 个月前
【PR】fix issue: add pyyaml dependency Co-authored-by: wangyuchen<wangyuchen38@huawei.com> # message auto-generated for no-merge-commit merge: !252 merge fix_requirements into master 【PR】fix issue: add pyyaml dependency Created-by: yuchen97 Commit-by: wangyuchen Merged-by: cann-robot Description: # Pull Request ## 描述 请清晰准确地描述本次 Pull Request 的意图和变更内容。 修复example py依赖中缺少yaml依赖的问题: ``` (venv) [root@localhost super_kernel_base]# python3 superkernel_scope.py Traceback (most recent call last): import yaml ModuleNotFoundError: No module named 'yaml' The above exception was the direct cause of the following exception: ``` 执行用例前需正确安装CANN环境,PyYAML同步添加到requirements中,但是**不作为 scripts/check_env.sh 的校验项目**。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [x] 🐛 Bug 修复 - [ ] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> ## 如何测试 描述测试此变更的步骤和前提条件: 按照example指南步骤操作,预期能跑通用例,得到如下输出: ``` Installing collected packages: PyYAML Successfully installed PyYAML-6.0.3 [notice] A new release of pip is available: 23.0.1 -> 26.0.1 [notice] To update, run: pip install --upgrade pip (venv) [root@localhost super_kernel_base]# python3 superkernel_scope.py start compile Ascend C operator QuantBatchMatmulV3. kernel name is te_quantbatchmatmulv3_9898abb0c6bf97b9f07b0056f960af68dfb1ac3d13ff956d4ae09a98b1a976f0 start compile Ascend C operator DequantSwigluQuant. kernel name is te_dequantswigluquant_dbaea97e6be9785993ed9ee5359c5feadac9c9d71eee06615da691ad17b483da ....start compile Ascend C operator DequantSwigluQuant. kernel name is te_dequantswigluquant_9419c93e5a5d693f8ff8045471e1303d432e09a2e3c0a6c81f96f49df3d5685f start compile Ascend C operator QuantBatchMatmulV3. kernel name is te_quantbatchmatmulv3_a15757a5ee305c38951b4f4a0890af69fb82767f9ef6fdfb064a9900e11b386f ...execute sample success ``` ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 在此添加任何其他关于本次 PR 的说明。 See merge request: cann/graph-autofusion!2521 个月前
README.md

super_kernel样例使用指导

功能描述

使用super_kernel完成算子融合

目录结构

├── super_kernel_base             # 基础功能的样例
│  └── superkernel_scope.py       # 通过super_kernel完成算子融合
└── super_kernel_profiling        # 展示profiling的样例
  └── superkernel_compare.py      # 使用super_kernel与不使用super_kernel的数据进行对比
└── super_kernel_runtime_ascendc_only        # 极简super_kernel样例
   └── superkernel_runtime_ascendc_basic.py  # 通过ascendc编译super_kernel完成算子融合,并使用runtime运行时环境执行

前置说明

请务必参考《源码构建指南》完成前置环境准备。

依赖安装

样例执行所需的Python依赖已写入requirements.txt,可通过以下命令安装:

pip3 install -r requirements.txt

用例演示

用例1

用例2

用例3

参考

请参考《Ascend Extension for PyTorch》中“套件与三方库 > PyTorch图模式使用(TorchAir) > API参考 > torchair.scope > super_kernel”的相关内容。