文件最后提交记录最后更新时间
docs: 文档国际化改造,支持中英文双语 11 天前
docs: 文档国际化改造,支持中英文双语 11 天前
docs: 文档国际化改造,支持中英文双语 11 天前
【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! 6 个月前
docs: 文档国际化改造,支持中英文双语 11 天前
docs: 文档国际化改造,支持中英文双语 11 天前
【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”的相关内容。