| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
fix: complete Arange fallback path (#302) Co-authored-by: Jett_Woo<wujinteng1@huawei.com> # message auto-generated for no-merge-commit merge: !1980 merge index-expr-fallback-develop-pr into develop fix: complete Arange fallback path (#302) Created-by: Jett_Woo Commit-by: Jett_Woo Merged-by: cann-robot Description: # Pull Request ## 描述 补齐 IndexExpr/Arange Autofusion 的普通 ArangeApiCall 双路径和最小影响的 VF 前置准入,确保 VF 不可用时 Arange 可走普通 LocalTensor 路径,同时收紧 VF boundary 映射并补充普通 DMA/Codegen 回归。 本 PR 基于最新 develop,不重复提交已合入的 PR 1961 主体。 核心变更: - Store 使用实际源 UB 布局计算 DMA;外层 stride 无法证明 32B 对齐或存在共享偏移时,使用注册的 32B scratch 和显式逐行拷贝,保证同步及 scratch 生命周期。 - Arange VF 准入检查轴顺序与有效 lane,不把 Store DMA 对齐约束施加到 Arange。 - 新增普通 ArangeApiCall,保留现有 MicroArangeApiCall VF 高性能路径。 - UBFuse 或控制边场景在分区前禁用 Arange VF,避免晚期 Codegen 失败。 - 缺失 vf_root_input_index 时明确失败,移除静默 boundary ordinal 回退。 - 普通 Arange fallback 分离 logical value offset 与 LocalTensor physical write offset,并对复杂无法证明安全的布局 fail closed。 - 补充 Arange Codegen、VF partition、Allocator、DMA singleton 和 boundary mapping 回归。 ## 变更类型 - [x] 🐛 Bug 修复 - [x] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue 关联 Issue #302:支持 IndexExpr 和 Arange Autofusion ## 如何测试 1. 本次重新构建:cmake --build build/source_validation --target test_main optimize_ut pyautofuse -j 8,成功;SDK signal.h 有弃用告警。 2. 本次完整 host 回归:test_main 881 passed、7 skipped、8 disabled(XML total 896),零失败;optimize_ut 658 passed、8 skipped(total 666),零失败。test_main 从其二进制目录运行,以满足 ../pyautofuse.so 相对依赖。 3. 本次 git diff --check 和暂存区差异检查通过;改动行使用 clang-format 格式化。 4. 历史 V5 真机原始报告已重新核对:75 primary + 32 fallback + 1 control = 108 项,73 + 32 + 1 = 106 项数值通过;2 项 transposed output 在 codegen 阶段拒绝,不算数值成功。focus 4/4 是重跑,不重复计入分母。本次未重新运行真机矩阵。 5. 真机验证资产、文档、临时工具、日志及生成代码仅保留本地,不纳入提交。本次 host 日志位于 pipeline_logs/1980_*_20260906.*;历史真机证据位于 /tmp/opencode/p0_p1_runtime/final_matrix_v5/。 ## 核对清单 - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [ ] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 - ATT outer call fixed cost、普通 scalar fallback 和新增 Store scratch 的 scalar/per-chunk DMA/event 成本尚未建模。此路径为正确性回退,不承诺性能持平。 - 不支持动态 rank、scatter、非单位有效尾 stride、反序/交错 merged axis、Arange CV UBFuse。 - V5 矩阵剩余 2 项 transpose codegen 拒绝;仅支持 contiguous-inner scratch fallback,不宣称全部真机通过。 - 设计文档和完整真机验证资产仅保留在本地,不纳入提交。 - 源分支:index-expr-fallback-develop-pr。 See merge request: cann/graph-autofusion!1980 | 10 天前 | |
fix: complete Arange fallback path (#302) Co-authored-by: Jett_Woo<wujinteng1@huawei.com> # message auto-generated for no-merge-commit merge: !1980 merge index-expr-fallback-develop-pr into develop fix: complete Arange fallback path (#302) Created-by: Jett_Woo Commit-by: Jett_Woo Merged-by: cann-robot Description: # Pull Request ## 描述 补齐 IndexExpr/Arange Autofusion 的普通 ArangeApiCall 双路径和最小影响的 VF 前置准入,确保 VF 不可用时 Arange 可走普通 LocalTensor 路径,同时收紧 VF boundary 映射并补充普通 DMA/Codegen 回归。 本 PR 基于最新 develop,不重复提交已合入的 PR 1961 主体。 核心变更: - Store 使用实际源 UB 布局计算 DMA;外层 stride 无法证明 32B 对齐或存在共享偏移时,使用注册的 32B scratch 和显式逐行拷贝,保证同步及 scratch 生命周期。 - Arange VF 准入检查轴顺序与有效 lane,不把 Store DMA 对齐约束施加到 Arange。 - 新增普通 ArangeApiCall,保留现有 MicroArangeApiCall VF 高性能路径。 - UBFuse 或控制边场景在分区前禁用 Arange VF,避免晚期 Codegen 失败。 - 缺失 vf_root_input_index 时明确失败,移除静默 boundary ordinal 回退。 - 普通 Arange fallback 分离 logical value offset 与 LocalTensor physical write offset,并对复杂无法证明安全的布局 fail closed。 - 补充 Arange Codegen、VF partition、Allocator、DMA singleton 和 boundary mapping 回归。 ## 变更类型 - [x] 🐛 Bug 修复 - [x] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue 关联 Issue #302:支持 IndexExpr 和 Arange Autofusion ## 如何测试 1. 本次重新构建:cmake --build build/source_validation --target test_main optimize_ut pyautofuse -j 8,成功;SDK signal.h 有弃用告警。 2. 本次完整 host 回归:test_main 881 passed、7 skipped、8 disabled(XML total 896),零失败;optimize_ut 658 passed、8 skipped(total 666),零失败。test_main 从其二进制目录运行,以满足 ../pyautofuse.so 相对依赖。 3. 本次 git diff --check 和暂存区差异检查通过;改动行使用 clang-format 格式化。 4. 历史 V5 真机原始报告已重新核对:75 primary + 32 fallback + 1 control = 108 项,73 + 32 + 1 = 106 项数值通过;2 项 transposed output 在 codegen 阶段拒绝,不算数值成功。focus 4/4 是重跑,不重复计入分母。本次未重新运行真机矩阵。 5. 真机验证资产、文档、临时工具、日志及生成代码仅保留本地,不纳入提交。本次 host 日志位于 pipeline_logs/1980_*_20260906.*;历史真机证据位于 /tmp/opencode/p0_p1_runtime/final_matrix_v5/。 ## 核对清单 - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [ ] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 - ATT outer call fixed cost、普通 scalar fallback 和新增 Store scratch 的 scalar/per-chunk DMA/event 成本尚未建模。此路径为正确性回退,不承诺性能持平。 - 不支持动态 rank、scatter、非单位有效尾 stride、反序/交错 merged axis、Arange CV UBFuse。 - V5 矩阵剩余 2 项 transpose codegen 拒绝;仅支持 contiguous-inner scratch fallback,不宣称全部真机通过。 - 设计文档和完整真机验证资产仅保留在本地,不纳入提交。 - 源分支:index-expr-fallback-develop-pr。 See merge request: cann/graph-autofusion!1980 | 10 天前 | |
【PR】: [fix] [autofuse] adapt reform of the same-named header files of ge. Co-authored-by: xingzhixiong<xingzhixiong@huawei.com> # message auto-generated for no-merge-commit merge: !1149 merge develop_change_dir_of_metadef_headers into develop 【PR】: [fix] [autofuse] adapt reform of the same-named header files of ge. Created-by: xingzhixiong Commit-by: xingzhixiong Merged-by: cann-robot Description: # Pull Request ## 描述 metadef在做同名头文件整改,整改完编译发现gaf失败,原因是gaf仓和ge仓也有同名且子目录相同的头文件,故需要将gaf仓的同名头文件的子目录进行整改,只给gaf仓内部使用,避免产生耦合编译问题。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [ ] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [x] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> ## 如何测试 描述测试此变更的步骤和前提条件: 1. ci流水线pass 2. RDV pass ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如: feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 在此添加任何其他关于本次 PR 的说明。 See merge request: cann/graph-autofusion!1149 | 2 个月前 | |
style: 统一 Autofuse 代码格式 Co-authored-by: Ling-DT<lingxing@huawei.com> # message auto-generated for no-merge-commit merge: !921 merge style/clang-format-autofuse-20260611 into develop style: 统一 Autofuse 代码格式 Created-by: ling-DT Commit-by: Ling-DT Merged-by: cann-robot Description: # Pull Request ## 描述 基于 cann/graph-autofusion:develop 最新提交 46a23b0,使用仓库根目录 .clang-format 对 autofuse/ 目录内受版本管理的 C/C++/AscendC 源文件执行统一格式化。 本 PR 仅包含 autofuse/ 目录格式化变更;super_kernel/ 目录格式化变更按要求暂留本地,未提交到本 PR。 格式化工具:clang-format 18.1.8,参数:--style=file。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [ ] ✨ 新功能 - [x] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue 无。 ## 如何测试 描述测试此变更的步骤和前提条件: 1. /tmp/opencode/clang-format-18-venv/bin/clang-format -i --style=file <autofuse C/C++/AscendC files> 2. git diff --cached --check 3. git diff --name-only HEAD~1..HEAD | cut -d/ -f1 | sort | uniq -c 确认 PR 提交仅包含 autofuse/。 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 本 PR 为纯格式化变更,不涉及功能逻辑、接口、构建脚本或打包内容修改。 See merge request: cann/graph-autofusion!921 | 2 个月前 | |
fix(cv-ubfuse): align UB physical layout for mixed-dtype vector tensors Co-authored-by: tianbaolin<tianbaolin1@qq.com> Co-authored-by: ling-DT<lingxing@huawei.com> # message auto-generated for no-merge-commit merge: !2177 merge tbl/fix/cv-ubfuse-mixed-dtype-ub-alignment-dev into develop fix(cv-ubfuse): align UB physical layout for mixed-dtype vector tensors Created-by: tianbaolin Commit-by: ling-DT;tianbaolin Merged-by: cann-robot Description: ## Problem In CV UBFuse kernels the epilogue consumes the cube output by rows ( stageM * blockShapeNAlign) while queue tensors were still sized by the flat element budget (a0a1t), and 1D flat APIs were used for mixed-dtype vector stages. When tensor row strides differ by dtype (e.g. bool rows are 32B-aligned while float rows are not), the flat interpretation reads/writes wrong addresses and the queue allocation can be smaller than the real per-stage footprint, which corrupts results (scattered mismatches) or overflows UB (aicore exception). ## Fix Keeps the three-size contract (UB allocation >= UB compute size >= valid data size): **Tiling** - basen_align aligns to 32 elements, so it is the supremum of every dtype 32B-aligned row width; cube_ub_stage_size keeps cube-dtype element semantics - new cube_m_stage_size (max stage rows); after the solver picks STAGE_SIZE_NAME it is overwritten with STAGE_SIZE_NAME / basen_align, so rows * any-dtype-row-width never exceeds the solver per-dtype element budget - serialize the new field for const/dynamic/DB paths **Kernel init** - stage_size unified to element count (solver budget a0a1t, falling back to cube fragment capacity for tiny stages) - stage_size_type (rows) comes from cube_m_stage_size on all four flows: inductor const (kConstTilingData), inductor dynamic (params), non-inductor static (kConstTilingData baked by ascbc) and non-inductor dynamic (params.cv_tiling_data) - TensorSizeAssign emits local_size = stage_size for every UB tensor, so each dtype byte size equals its solver budget exactly - buf_cube sized by the pure C-fragment capacity - conv2d stage_size switched to element count as well **Reg APIs** - CvApi2DParams gains valid_size / output_compute_size / input_compute_size - Cast/Floor/Round/Trunc/Compare use the 2D form with logical {curAivM, curAivN} dims plus per-dtype physical row strides under CV UBFuse - WhereRegApiCall::GenerateNoLoopCase emits the 2D WhereExtend form with an independent mask stride, fixing bool-mask rows (e.g. align(N,32) != float row width) that previously went through a flat 1D call ## Verification (torch.compile, forced CV fusion, Ascend950PR): - tensor/broadcast/scalar compares, where (bool mask from GM, int8, int64, two float branches, compare->where), cast (fp16/int32), floor/round/trunc, add/mul/sub/div, max/min, unary and chained cases all match eager bit-exactly - previously failing N=400/600 and crashing N=664 now pass - inductor dynamic shape (params path) verified with multiple shapes - non-inductor flows covered by code-path audit (ascbc bakes kConstTilingData, dynamic reads params.cv_tiling_data) - UT expectations updated for the new stage_size element semantics ## TF non-inductor static-flow fixes (follow-up commit 5a48b96e) The rework broke TF static-shape kernel compilation (and exposed two latent misalignments): - **codegen_kernel.cpp**: non-inductor static Init referenced params.cv_tiling_data->cube_m_stage_size, but TF/GE online-compiled static graphs have neither INDUCTOR_CONST_TILING_DATA nor the cv_tiling_data Params member (is_dynamic=false), failing with no member named 'cv_tiling_data' in 'AutoFusionVector::Params'. Now reads the baked solver budget (AutofuseTilingData::STAGE_SIZE_NAME) and derives stage rows as stage_size_name / basen_align (conv2d-branch pattern). - **asc_codegen_compile.py**: host tiling still used ub_align_value = 32 / cube_output_type_size; aligned to 32 elements to match the kernel-side supremum row width. TF E2E (GE AutoFuse, --autofuse_enable_pass=matmul, Ascend950PR): matmul+abs now compiles and runs; 128x128x128 completes with results within half-cast precision. Note: 28-block (large-shape) MIX launches still deadlock in the GE/fftsplus dispatch (block group 13 never scheduled) — tracked separately, not addressed by this PR. ## TF non-inductor static-flow fixes (follow-up commit 5a48b96e) - **codegen_kernel.cpp**: non-inductor static Init referenced params.cv_tiling_data->cube_m_stage_size, but TF/GE online-compiled static graphs have neither INDUCTOR_CONST_TILING_DATA nor the cv_tiling_data Params member (is_dynamic=false), failing with "no member named 'cv_tiling_data' in 'AutoFusionVector::Params'". Now reads the baked solver budget (AutofuseTilingData::STAGE_SIZE_NAME) and derives stage rows as stage_size_name / basen_align (conv2d-branch pattern). - **asc_codegen_compile.py**: host tiling still used ub_align_value = 32 / cube_output_type_size; aligned to 32 elements to match the kernel-side supremum row width. TF E2E (GE AutoFuse, --autofuse_enable_pass=matmul, Ascend950PR): matmul+abs now compiles and runs; 128x128x128 completes within half-cast precision. Note: 28-block (large-shape) MIX launches still deadlock in the GE/fftsplus dispatch (block group 13 never scheduled) - tracked separately, not addressed by this PR. See merge request: cann/graph-autofusion!2177 | 7 小时前 | |
style: 统一 Autofuse 代码格式 Co-authored-by: Ling-DT<lingxing@huawei.com> # message auto-generated for no-merge-commit merge: !921 merge style/clang-format-autofuse-20260611 into develop style: 统一 Autofuse 代码格式 Created-by: ling-DT Commit-by: Ling-DT Merged-by: cann-robot Description: # Pull Request ## 描述 基于 cann/graph-autofusion:develop 最新提交 46a23b0,使用仓库根目录 .clang-format 对 autofuse/ 目录内受版本管理的 C/C++/AscendC 源文件执行统一格式化。 本 PR 仅包含 autofuse/ 目录格式化变更;super_kernel/ 目录格式化变更按要求暂留本地,未提交到本 PR。 格式化工具:clang-format 18.1.8,参数:--style=file。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [ ] ✨ 新功能 - [x] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue 无。 ## 如何测试 描述测试此变更的步骤和前提条件: 1. /tmp/opencode/clang-format-18-venv/bin/clang-format -i --style=file <autofuse C/C++/AscendC files> 2. git diff --cached --check 3. git diff --name-only HEAD~1..HEAD | cut -d/ -f1 | sort | uniq -c 确认 PR 提交仅包含 autofuse/。 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 本 PR 为纯格式化变更,不涉及功能逻辑、接口、构建脚本或打包内容修改。 See merge request: cann/graph-autofusion!921 | 2 个月前 | |
【PR】: [fix] [autofuse] adapt reform of the same-named header files of ge. Co-authored-by: xingzhixiong<xingzhixiong@huawei.com> # message auto-generated for no-merge-commit merge: !1149 merge develop_change_dir_of_metadef_headers into develop 【PR】: [fix] [autofuse] adapt reform of the same-named header files of ge. Created-by: xingzhixiong Commit-by: xingzhixiong Merged-by: cann-robot Description: # Pull Request ## 描述 metadef在做同名头文件整改,整改完编译发现gaf失败,原因是gaf仓和ge仓也有同名且子目录相同的头文件,故需要将gaf仓的同名头文件的子目录进行整改,只给gaf仓内部使用,避免产生耦合编译问题。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [ ] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [x] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> ## 如何测试 描述测试此变更的步骤和前提条件: 1. ci流水线pass 2. RDV pass ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如: feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 在此添加任何其他关于本次 PR 的说明。 See merge request: cann/graph-autofusion!1149 | 2 个月前 | |
style: 统一 Autofuse 代码格式 Co-authored-by: Ling-DT<lingxing@huawei.com> # message auto-generated for no-merge-commit merge: !921 merge style/clang-format-autofuse-20260611 into develop style: 统一 Autofuse 代码格式 Created-by: ling-DT Commit-by: Ling-DT Merged-by: cann-robot Description: # Pull Request ## 描述 基于 cann/graph-autofusion:develop 最新提交 46a23b0,使用仓库根目录 .clang-format 对 autofuse/ 目录内受版本管理的 C/C++/AscendC 源文件执行统一格式化。 本 PR 仅包含 autofuse/ 目录格式化变更;super_kernel/ 目录格式化变更按要求暂留本地,未提交到本 PR。 格式化工具:clang-format 18.1.8,参数:--style=file。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [ ] ✨ 新功能 - [x] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue 无。 ## 如何测试 描述测试此变更的步骤和前提条件: 1. /tmp/opencode/clang-format-18-venv/bin/clang-format -i --style=file <autofuse C/C++/AscendC files> 2. git diff --cached --check 3. git diff --name-only HEAD~1..HEAD | cut -d/ -f1 | sort | uniq -c 确认 PR 提交仅包含 autofuse/。 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 本 PR 为纯格式化变更,不涉及功能逻辑、接口、构建脚本或打包内容修改。 See merge request: cann/graph-autofusion!921 | 2 个月前 | |
fix(cv-ubfuse): align UB physical layout for mixed-dtype vector tensors Co-authored-by: tianbaolin<tianbaolin1@qq.com> Co-authored-by: ling-DT<lingxing@huawei.com> # message auto-generated for no-merge-commit merge: !2177 merge tbl/fix/cv-ubfuse-mixed-dtype-ub-alignment-dev into develop fix(cv-ubfuse): align UB physical layout for mixed-dtype vector tensors Created-by: tianbaolin Commit-by: ling-DT;tianbaolin Merged-by: cann-robot Description: ## Problem In CV UBFuse kernels the epilogue consumes the cube output by rows ( stageM * blockShapeNAlign) while queue tensors were still sized by the flat element budget (a0a1t), and 1D flat APIs were used for mixed-dtype vector stages. When tensor row strides differ by dtype (e.g. bool rows are 32B-aligned while float rows are not), the flat interpretation reads/writes wrong addresses and the queue allocation can be smaller than the real per-stage footprint, which corrupts results (scattered mismatches) or overflows UB (aicore exception). ## Fix Keeps the three-size contract (UB allocation >= UB compute size >= valid data size): **Tiling** - basen_align aligns to 32 elements, so it is the supremum of every dtype 32B-aligned row width; cube_ub_stage_size keeps cube-dtype element semantics - new cube_m_stage_size (max stage rows); after the solver picks STAGE_SIZE_NAME it is overwritten with STAGE_SIZE_NAME / basen_align, so rows * any-dtype-row-width never exceeds the solver per-dtype element budget - serialize the new field for const/dynamic/DB paths **Kernel init** - stage_size unified to element count (solver budget a0a1t, falling back to cube fragment capacity for tiny stages) - stage_size_type (rows) comes from cube_m_stage_size on all four flows: inductor const (kConstTilingData), inductor dynamic (params), non-inductor static (kConstTilingData baked by ascbc) and non-inductor dynamic (params.cv_tiling_data) - TensorSizeAssign emits local_size = stage_size for every UB tensor, so each dtype byte size equals its solver budget exactly - buf_cube sized by the pure C-fragment capacity - conv2d stage_size switched to element count as well **Reg APIs** - CvApi2DParams gains valid_size / output_compute_size / input_compute_size - Cast/Floor/Round/Trunc/Compare use the 2D form with logical {curAivM, curAivN} dims plus per-dtype physical row strides under CV UBFuse - WhereRegApiCall::GenerateNoLoopCase emits the 2D WhereExtend form with an independent mask stride, fixing bool-mask rows (e.g. align(N,32) != float row width) that previously went through a flat 1D call ## Verification (torch.compile, forced CV fusion, Ascend950PR): - tensor/broadcast/scalar compares, where (bool mask from GM, int8, int64, two float branches, compare->where), cast (fp16/int32), floor/round/trunc, add/mul/sub/div, max/min, unary and chained cases all match eager bit-exactly - previously failing N=400/600 and crashing N=664 now pass - inductor dynamic shape (params path) verified with multiple shapes - non-inductor flows covered by code-path audit (ascbc bakes kConstTilingData, dynamic reads params.cv_tiling_data) - UT expectations updated for the new stage_size element semantics ## TF non-inductor static-flow fixes (follow-up commit 5a48b96e) The rework broke TF static-shape kernel compilation (and exposed two latent misalignments): - **codegen_kernel.cpp**: non-inductor static Init referenced params.cv_tiling_data->cube_m_stage_size, but TF/GE online-compiled static graphs have neither INDUCTOR_CONST_TILING_DATA nor the cv_tiling_data Params member (is_dynamic=false), failing with no member named 'cv_tiling_data' in 'AutoFusionVector::Params'. Now reads the baked solver budget (AutofuseTilingData::STAGE_SIZE_NAME) and derives stage rows as stage_size_name / basen_align (conv2d-branch pattern). - **asc_codegen_compile.py**: host tiling still used ub_align_value = 32 / cube_output_type_size; aligned to 32 elements to match the kernel-side supremum row width. TF E2E (GE AutoFuse, --autofuse_enable_pass=matmul, Ascend950PR): matmul+abs now compiles and runs; 128x128x128 completes with results within half-cast precision. Note: 28-block (large-shape) MIX launches still deadlock in the GE/fftsplus dispatch (block group 13 never scheduled) — tracked separately, not addressed by this PR. ## TF non-inductor static-flow fixes (follow-up commit 5a48b96e) - **codegen_kernel.cpp**: non-inductor static Init referenced params.cv_tiling_data->cube_m_stage_size, but TF/GE online-compiled static graphs have neither INDUCTOR_CONST_TILING_DATA nor the cv_tiling_data Params member (is_dynamic=false), failing with "no member named 'cv_tiling_data' in 'AutoFusionVector::Params'". Now reads the baked solver budget (AutofuseTilingData::STAGE_SIZE_NAME) and derives stage rows as stage_size_name / basen_align (conv2d-branch pattern). - **asc_codegen_compile.py**: host tiling still used ub_align_value = 32 / cube_output_type_size; aligned to 32 elements to match the kernel-side supremum row width. TF E2E (GE AutoFuse, --autofuse_enable_pass=matmul, Ascend950PR): matmul+abs now compiles and runs; 128x128x128 completes within half-cast precision. Note: 28-block (large-shape) MIX launches still deadlock in the GE/fftsplus dispatch (block group 13 never scheduled) - tracked separately, not addressed by this PR. See merge request: cann/graph-autofusion!2177 | 7 小时前 | |
style: 统一 Autofuse 代码格式 Co-authored-by: Ling-DT<lingxing@huawei.com> # message auto-generated for no-merge-commit merge: !921 merge style/clang-format-autofuse-20260611 into develop style: 统一 Autofuse 代码格式 Created-by: ling-DT Commit-by: Ling-DT Merged-by: cann-robot Description: # Pull Request ## 描述 基于 cann/graph-autofusion:develop 最新提交 46a23b0,使用仓库根目录 .clang-format 对 autofuse/ 目录内受版本管理的 C/C++/AscendC 源文件执行统一格式化。 本 PR 仅包含 autofuse/ 目录格式化变更;super_kernel/ 目录格式化变更按要求暂留本地,未提交到本 PR。 格式化工具:clang-format 18.1.8,参数:--style=file。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [ ] ✨ 新功能 - [x] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue 无。 ## 如何测试 描述测试此变更的步骤和前提条件: 1. /tmp/opencode/clang-format-18-venv/bin/clang-format -i --style=file <autofuse C/C++/AscendC files> 2. git diff --cached --check 3. git diff --name-only HEAD~1..HEAD | cut -d/ -f1 | sort | uniq -c 确认 PR 提交仅包含 autofuse/。 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 本 PR 为纯格式化变更,不涉及功能逻辑、接口、构建脚本或打包内容修改。 See merge request: cann/graph-autofusion!921 | 2 个月前 | |
【PR】: AF日志易用性整改 Co-authored-by: s00357600sgd<shenguodong1@huawei.com> # message auto-generated for no-merge-commit merge: !1864 merge autofusion_log_daily_develop into develop 【PR】: AF日志易用性整改 Created-by: s003576sgd Commit-by: s00357600sgd Merged-by: cann-robot Description: # Pull Request ## 描述 整改工具扫描的日志中存在的拼写错误、中文、缺少度量单位等低级问题,并排查类似问题统一修改 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [x] 🐛 Bug 修复 - [ ] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> ## 如何测试 描述测试此变更的步骤和前提条件: 1. 2. ## 核对清单 <!-- [x] 表示选中 --> - [ ] 我的代码遵循了项目的代码风格 - [ ] 我已对代码进行了自测 - [ ] 我已更新了相关的文档 - [ ] 我在标题中使用了合适的类型标签(如: feat:, fix:) - [ ] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 在此添加任何其他关于本次 PR 的说明。 See merge request: cann/graph-autofusion!1864 | 23 天前 | |
【PR】: [fix] [autofuse] adapt reform of the same-named header files of ge. Co-authored-by: xingzhixiong<xingzhixiong@huawei.com> # message auto-generated for no-merge-commit merge: !1149 merge develop_change_dir_of_metadef_headers into develop 【PR】: [fix] [autofuse] adapt reform of the same-named header files of ge. Created-by: xingzhixiong Commit-by: xingzhixiong Merged-by: cann-robot Description: # Pull Request ## 描述 metadef在做同名头文件整改,整改完编译发现gaf失败,原因是gaf仓和ge仓也有同名且子目录相同的头文件,故需要将gaf仓的同名头文件的子目录进行整改,只给gaf仓内部使用,避免产生耦合编译问题。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [ ] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [x] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> ## 如何测试 描述测试此变更的步骤和前提条件: 1. ci流水线pass 2. RDV pass ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如: feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 在此添加任何其他关于本次 PR 的说明。 See merge request: cann/graph-autofusion!1149 | 2 个月前 | |
fix(cv-ubfuse): align UB physical layout for mixed-dtype vector tensors Co-authored-by: tianbaolin<tianbaolin1@qq.com> Co-authored-by: ling-DT<lingxing@huawei.com> # message auto-generated for no-merge-commit merge: !2177 merge tbl/fix/cv-ubfuse-mixed-dtype-ub-alignment-dev into develop fix(cv-ubfuse): align UB physical layout for mixed-dtype vector tensors Created-by: tianbaolin Commit-by: ling-DT;tianbaolin Merged-by: cann-robot Description: ## Problem In CV UBFuse kernels the epilogue consumes the cube output by rows ( stageM * blockShapeNAlign) while queue tensors were still sized by the flat element budget (a0a1t), and 1D flat APIs were used for mixed-dtype vector stages. When tensor row strides differ by dtype (e.g. bool rows are 32B-aligned while float rows are not), the flat interpretation reads/writes wrong addresses and the queue allocation can be smaller than the real per-stage footprint, which corrupts results (scattered mismatches) or overflows UB (aicore exception). ## Fix Keeps the three-size contract (UB allocation >= UB compute size >= valid data size): **Tiling** - basen_align aligns to 32 elements, so it is the supremum of every dtype 32B-aligned row width; cube_ub_stage_size keeps cube-dtype element semantics - new cube_m_stage_size (max stage rows); after the solver picks STAGE_SIZE_NAME it is overwritten with STAGE_SIZE_NAME / basen_align, so rows * any-dtype-row-width never exceeds the solver per-dtype element budget - serialize the new field for const/dynamic/DB paths **Kernel init** - stage_size unified to element count (solver budget a0a1t, falling back to cube fragment capacity for tiny stages) - stage_size_type (rows) comes from cube_m_stage_size on all four flows: inductor const (kConstTilingData), inductor dynamic (params), non-inductor static (kConstTilingData baked by ascbc) and non-inductor dynamic (params.cv_tiling_data) - TensorSizeAssign emits local_size = stage_size for every UB tensor, so each dtype byte size equals its solver budget exactly - buf_cube sized by the pure C-fragment capacity - conv2d stage_size switched to element count as well **Reg APIs** - CvApi2DParams gains valid_size / output_compute_size / input_compute_size - Cast/Floor/Round/Trunc/Compare use the 2D form with logical {curAivM, curAivN} dims plus per-dtype physical row strides under CV UBFuse - WhereRegApiCall::GenerateNoLoopCase emits the 2D WhereExtend form with an independent mask stride, fixing bool-mask rows (e.g. align(N,32) != float row width) that previously went through a flat 1D call ## Verification (torch.compile, forced CV fusion, Ascend950PR): - tensor/broadcast/scalar compares, where (bool mask from GM, int8, int64, two float branches, compare->where), cast (fp16/int32), floor/round/trunc, add/mul/sub/div, max/min, unary and chained cases all match eager bit-exactly - previously failing N=400/600 and crashing N=664 now pass - inductor dynamic shape (params path) verified with multiple shapes - non-inductor flows covered by code-path audit (ascbc bakes kConstTilingData, dynamic reads params.cv_tiling_data) - UT expectations updated for the new stage_size element semantics ## TF non-inductor static-flow fixes (follow-up commit 5a48b96e) The rework broke TF static-shape kernel compilation (and exposed two latent misalignments): - **codegen_kernel.cpp**: non-inductor static Init referenced params.cv_tiling_data->cube_m_stage_size, but TF/GE online-compiled static graphs have neither INDUCTOR_CONST_TILING_DATA nor the cv_tiling_data Params member (is_dynamic=false), failing with no member named 'cv_tiling_data' in 'AutoFusionVector::Params'. Now reads the baked solver budget (AutofuseTilingData::STAGE_SIZE_NAME) and derives stage rows as stage_size_name / basen_align (conv2d-branch pattern). - **asc_codegen_compile.py**: host tiling still used ub_align_value = 32 / cube_output_type_size; aligned to 32 elements to match the kernel-side supremum row width. TF E2E (GE AutoFuse, --autofuse_enable_pass=matmul, Ascend950PR): matmul+abs now compiles and runs; 128x128x128 completes with results within half-cast precision. Note: 28-block (large-shape) MIX launches still deadlock in the GE/fftsplus dispatch (block group 13 never scheduled) — tracked separately, not addressed by this PR. ## TF non-inductor static-flow fixes (follow-up commit 5a48b96e) - **codegen_kernel.cpp**: non-inductor static Init referenced params.cv_tiling_data->cube_m_stage_size, but TF/GE online-compiled static graphs have neither INDUCTOR_CONST_TILING_DATA nor the cv_tiling_data Params member (is_dynamic=false), failing with "no member named 'cv_tiling_data' in 'AutoFusionVector::Params'". Now reads the baked solver budget (AutofuseTilingData::STAGE_SIZE_NAME) and derives stage rows as stage_size_name / basen_align (conv2d-branch pattern). - **asc_codegen_compile.py**: host tiling still used ub_align_value = 32 / cube_output_type_size; aligned to 32 elements to match the kernel-side supremum row width. TF E2E (GE AutoFuse, --autofuse_enable_pass=matmul, Ascend950PR): matmul+abs now compiles and runs; 128x128x128 completes within half-cast precision. Note: 28-block (large-shape) MIX launches still deadlock in the GE/fftsplus dispatch (block group 13 never scheduled) - tracked separately, not addressed by this PR. See merge request: cann/graph-autofusion!2177 | 7 小时前 | |
style: 统一 Autofuse 代码格式 Co-authored-by: Ling-DT<lingxing@huawei.com> # message auto-generated for no-merge-commit merge: !921 merge style/clang-format-autofuse-20260611 into develop style: 统一 Autofuse 代码格式 Created-by: ling-DT Commit-by: Ling-DT Merged-by: cann-robot Description: # Pull Request ## 描述 基于 cann/graph-autofusion:develop 最新提交 46a23b0,使用仓库根目录 .clang-format 对 autofuse/ 目录内受版本管理的 C/C++/AscendC 源文件执行统一格式化。 本 PR 仅包含 autofuse/ 目录格式化变更;super_kernel/ 目录格式化变更按要求暂留本地,未提交到本 PR。 格式化工具:clang-format 18.1.8,参数:--style=file。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [ ] ✨ 新功能 - [x] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue 无。 ## 如何测试 描述测试此变更的步骤和前提条件: 1. /tmp/opencode/clang-format-18-venv/bin/clang-format -i --style=file <autofuse C/C++/AscendC files> 2. git diff --cached --check 3. git diff --name-only HEAD~1..HEAD | cut -d/ -f1 | sort | uniq -c 确认 PR 提交仅包含 autofuse/。 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 本 PR 为纯格式化变更,不涉及功能逻辑、接口、构建脚本或打包内容修改。 See merge request: cann/graph-autofusion!921 | 2 个月前 | |
fix(cv-ubfuse): align UB physical layout for mixed-dtype vector tensors Co-authored-by: tianbaolin<tianbaolin1@qq.com> Co-authored-by: ling-DT<lingxing@huawei.com> # message auto-generated for no-merge-commit merge: !2177 merge tbl/fix/cv-ubfuse-mixed-dtype-ub-alignment-dev into develop fix(cv-ubfuse): align UB physical layout for mixed-dtype vector tensors Created-by: tianbaolin Commit-by: ling-DT;tianbaolin Merged-by: cann-robot Description: ## Problem In CV UBFuse kernels the epilogue consumes the cube output by rows ( stageM * blockShapeNAlign) while queue tensors were still sized by the flat element budget (a0a1t), and 1D flat APIs were used for mixed-dtype vector stages. When tensor row strides differ by dtype (e.g. bool rows are 32B-aligned while float rows are not), the flat interpretation reads/writes wrong addresses and the queue allocation can be smaller than the real per-stage footprint, which corrupts results (scattered mismatches) or overflows UB (aicore exception). ## Fix Keeps the three-size contract (UB allocation >= UB compute size >= valid data size): **Tiling** - basen_align aligns to 32 elements, so it is the supremum of every dtype 32B-aligned row width; cube_ub_stage_size keeps cube-dtype element semantics - new cube_m_stage_size (max stage rows); after the solver picks STAGE_SIZE_NAME it is overwritten with STAGE_SIZE_NAME / basen_align, so rows * any-dtype-row-width never exceeds the solver per-dtype element budget - serialize the new field for const/dynamic/DB paths **Kernel init** - stage_size unified to element count (solver budget a0a1t, falling back to cube fragment capacity for tiny stages) - stage_size_type (rows) comes from cube_m_stage_size on all four flows: inductor const (kConstTilingData), inductor dynamic (params), non-inductor static (kConstTilingData baked by ascbc) and non-inductor dynamic (params.cv_tiling_data) - TensorSizeAssign emits local_size = stage_size for every UB tensor, so each dtype byte size equals its solver budget exactly - buf_cube sized by the pure C-fragment capacity - conv2d stage_size switched to element count as well **Reg APIs** - CvApi2DParams gains valid_size / output_compute_size / input_compute_size - Cast/Floor/Round/Trunc/Compare use the 2D form with logical {curAivM, curAivN} dims plus per-dtype physical row strides under CV UBFuse - WhereRegApiCall::GenerateNoLoopCase emits the 2D WhereExtend form with an independent mask stride, fixing bool-mask rows (e.g. align(N,32) != float row width) that previously went through a flat 1D call ## Verification (torch.compile, forced CV fusion, Ascend950PR): - tensor/broadcast/scalar compares, where (bool mask from GM, int8, int64, two float branches, compare->where), cast (fp16/int32), floor/round/trunc, add/mul/sub/div, max/min, unary and chained cases all match eager bit-exactly - previously failing N=400/600 and crashing N=664 now pass - inductor dynamic shape (params path) verified with multiple shapes - non-inductor flows covered by code-path audit (ascbc bakes kConstTilingData, dynamic reads params.cv_tiling_data) - UT expectations updated for the new stage_size element semantics ## TF non-inductor static-flow fixes (follow-up commit 5a48b96e) The rework broke TF static-shape kernel compilation (and exposed two latent misalignments): - **codegen_kernel.cpp**: non-inductor static Init referenced params.cv_tiling_data->cube_m_stage_size, but TF/GE online-compiled static graphs have neither INDUCTOR_CONST_TILING_DATA nor the cv_tiling_data Params member (is_dynamic=false), failing with no member named 'cv_tiling_data' in 'AutoFusionVector::Params'. Now reads the baked solver budget (AutofuseTilingData::STAGE_SIZE_NAME) and derives stage rows as stage_size_name / basen_align (conv2d-branch pattern). - **asc_codegen_compile.py**: host tiling still used ub_align_value = 32 / cube_output_type_size; aligned to 32 elements to match the kernel-side supremum row width. TF E2E (GE AutoFuse, --autofuse_enable_pass=matmul, Ascend950PR): matmul+abs now compiles and runs; 128x128x128 completes with results within half-cast precision. Note: 28-block (large-shape) MIX launches still deadlock in the GE/fftsplus dispatch (block group 13 never scheduled) — tracked separately, not addressed by this PR. ## TF non-inductor static-flow fixes (follow-up commit 5a48b96e) - **codegen_kernel.cpp**: non-inductor static Init referenced params.cv_tiling_data->cube_m_stage_size, but TF/GE online-compiled static graphs have neither INDUCTOR_CONST_TILING_DATA nor the cv_tiling_data Params member (is_dynamic=false), failing with "no member named 'cv_tiling_data' in 'AutoFusionVector::Params'". Now reads the baked solver budget (AutofuseTilingData::STAGE_SIZE_NAME) and derives stage rows as stage_size_name / basen_align (conv2d-branch pattern). - **asc_codegen_compile.py**: host tiling still used ub_align_value = 32 / cube_output_type_size; aligned to 32 elements to match the kernel-side supremum row width. TF E2E (GE AutoFuse, --autofuse_enable_pass=matmul, Ascend950PR): matmul+abs now compiles and runs; 128x128x128 completes within half-cast precision. Note: 28-block (large-shape) MIX launches still deadlock in the GE/fftsplus dispatch (block group 13 never scheduled) - tracked separately, not addressed by this PR. See merge request: cann/graph-autofusion!2177 | 7 小时前 | |
fix(cv-ubfuse): align UB physical layout for mixed-dtype vector tensors Co-authored-by: tianbaolin<tianbaolin1@qq.com> Co-authored-by: ling-DT<lingxing@huawei.com> # message auto-generated for no-merge-commit merge: !2177 merge tbl/fix/cv-ubfuse-mixed-dtype-ub-alignment-dev into develop fix(cv-ubfuse): align UB physical layout for mixed-dtype vector tensors Created-by: tianbaolin Commit-by: ling-DT;tianbaolin Merged-by: cann-robot Description: ## Problem In CV UBFuse kernels the epilogue consumes the cube output by rows ( stageM * blockShapeNAlign) while queue tensors were still sized by the flat element budget (a0a1t), and 1D flat APIs were used for mixed-dtype vector stages. When tensor row strides differ by dtype (e.g. bool rows are 32B-aligned while float rows are not), the flat interpretation reads/writes wrong addresses and the queue allocation can be smaller than the real per-stage footprint, which corrupts results (scattered mismatches) or overflows UB (aicore exception). ## Fix Keeps the three-size contract (UB allocation >= UB compute size >= valid data size): **Tiling** - basen_align aligns to 32 elements, so it is the supremum of every dtype 32B-aligned row width; cube_ub_stage_size keeps cube-dtype element semantics - new cube_m_stage_size (max stage rows); after the solver picks STAGE_SIZE_NAME it is overwritten with STAGE_SIZE_NAME / basen_align, so rows * any-dtype-row-width never exceeds the solver per-dtype element budget - serialize the new field for const/dynamic/DB paths **Kernel init** - stage_size unified to element count (solver budget a0a1t, falling back to cube fragment capacity for tiny stages) - stage_size_type (rows) comes from cube_m_stage_size on all four flows: inductor const (kConstTilingData), inductor dynamic (params), non-inductor static (kConstTilingData baked by ascbc) and non-inductor dynamic (params.cv_tiling_data) - TensorSizeAssign emits local_size = stage_size for every UB tensor, so each dtype byte size equals its solver budget exactly - buf_cube sized by the pure C-fragment capacity - conv2d stage_size switched to element count as well **Reg APIs** - CvApi2DParams gains valid_size / output_compute_size / input_compute_size - Cast/Floor/Round/Trunc/Compare use the 2D form with logical {curAivM, curAivN} dims plus per-dtype physical row strides under CV UBFuse - WhereRegApiCall::GenerateNoLoopCase emits the 2D WhereExtend form with an independent mask stride, fixing bool-mask rows (e.g. align(N,32) != float row width) that previously went through a flat 1D call ## Verification (torch.compile, forced CV fusion, Ascend950PR): - tensor/broadcast/scalar compares, where (bool mask from GM, int8, int64, two float branches, compare->where), cast (fp16/int32), floor/round/trunc, add/mul/sub/div, max/min, unary and chained cases all match eager bit-exactly - previously failing N=400/600 and crashing N=664 now pass - inductor dynamic shape (params path) verified with multiple shapes - non-inductor flows covered by code-path audit (ascbc bakes kConstTilingData, dynamic reads params.cv_tiling_data) - UT expectations updated for the new stage_size element semantics ## TF non-inductor static-flow fixes (follow-up commit 5a48b96e) The rework broke TF static-shape kernel compilation (and exposed two latent misalignments): - **codegen_kernel.cpp**: non-inductor static Init referenced params.cv_tiling_data->cube_m_stage_size, but TF/GE online-compiled static graphs have neither INDUCTOR_CONST_TILING_DATA nor the cv_tiling_data Params member (is_dynamic=false), failing with no member named 'cv_tiling_data' in 'AutoFusionVector::Params'. Now reads the baked solver budget (AutofuseTilingData::STAGE_SIZE_NAME) and derives stage rows as stage_size_name / basen_align (conv2d-branch pattern). - **asc_codegen_compile.py**: host tiling still used ub_align_value = 32 / cube_output_type_size; aligned to 32 elements to match the kernel-side supremum row width. TF E2E (GE AutoFuse, --autofuse_enable_pass=matmul, Ascend950PR): matmul+abs now compiles and runs; 128x128x128 completes with results within half-cast precision. Note: 28-block (large-shape) MIX launches still deadlock in the GE/fftsplus dispatch (block group 13 never scheduled) — tracked separately, not addressed by this PR. ## TF non-inductor static-flow fixes (follow-up commit 5a48b96e) - **codegen_kernel.cpp**: non-inductor static Init referenced params.cv_tiling_data->cube_m_stage_size, but TF/GE online-compiled static graphs have neither INDUCTOR_CONST_TILING_DATA nor the cv_tiling_data Params member (is_dynamic=false), failing with "no member named 'cv_tiling_data' in 'AutoFusionVector::Params'". Now reads the baked solver budget (AutofuseTilingData::STAGE_SIZE_NAME) and derives stage rows as stage_size_name / basen_align (conv2d-branch pattern). - **asc_codegen_compile.py**: host tiling still used ub_align_value = 32 / cube_output_type_size; aligned to 32 elements to match the kernel-side supremum row width. TF E2E (GE AutoFuse, --autofuse_enable_pass=matmul, Ascend950PR): matmul+abs now compiles and runs; 128x128x128 completes within half-cast precision. Note: 28-block (large-shape) MIX launches still deadlock in the GE/fftsplus dispatch (block group 13 never scheduled) - tracked separately, not addressed by this PR. See merge request: cann/graph-autofusion!2177 | 7 小时前 | |
perf: 完善 Autofuse V2 Broadcast 性能建模(#235) Co-authored-by: hamburgerbobo<gaoyubo4@huawei.com> # message auto-generated for no-merge-commit merge: !2074 merge perf/broadcast-v2-warn-divzero into develop perf: 完善 Autofuse V2 Broadcast 性能建模(#235) Created-by: hamburgerbobo Commit-by: hamburgerbobo Merged-by: cann-robot Description: # Pull Request ## 描述 重新提交 PR #1812 的内容(原 PR 被回退),并在此基础上将 Broadcast perf 建模中的除零错误检查从 ERROR 级别(GE_ASSERT_TRUE -> GELOGE)降级为 WARNING 级别(GE_WARN_ASSERT -> GELOGW),避免除零检查失败时输出 ERROR 日志。 原pr链接:https://gitcode.com/cann/graph-autofusion/pull/1812 具体变更: 1. 完整恢复 PR #1812 的 23 个文件(Broadcast V2 性能建模全套实现和测试) 2. 将 3 个 perf 文件中 8 处除零检查从 GE_ASSERT_TRUE 替换为其他告警: - broadcast_perf_utils_v2.cpp:4 处(byte_size / divisor / half_vl 检查) - broadcast_last_axis_perf_v2.cpp:3 处(SafeDiv divisor / E2B last_size / GatherTwo last_size) - broadcast_nlast_axis_perf_v2.cpp:1 处(SafeDiv divisor) ## 变更类型 - [x] ✨ 新功能 ## 关联的Issue #235 ## 如何测试 1. sh build.sh -u --module=autofuse_framework -j 8 2. 运行 Broadcast perf V2 相关 UT ## 核对清单 - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 本 PR 替代被回退的 PR #1812,内容一致但除零检查改为 WARNING 级别。 See merge request: cann/graph-autofusion!2074 | 6 天前 | |
style: 统一 Autofuse 代码格式 Co-authored-by: Ling-DT<lingxing@huawei.com> # message auto-generated for no-merge-commit merge: !921 merge style/clang-format-autofuse-20260611 into develop style: 统一 Autofuse 代码格式 Created-by: ling-DT Commit-by: Ling-DT Merged-by: cann-robot Description: # Pull Request ## 描述 基于 cann/graph-autofusion:develop 最新提交 46a23b0,使用仓库根目录 .clang-format 对 autofuse/ 目录内受版本管理的 C/C++/AscendC 源文件执行统一格式化。 本 PR 仅包含 autofuse/ 目录格式化变更;super_kernel/ 目录格式化变更按要求暂留本地,未提交到本 PR。 格式化工具:clang-format 18.1.8,参数:--style=file。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [ ] ✨ 新功能 - [x] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue 无。 ## 如何测试 描述测试此变更的步骤和前提条件: 1. /tmp/opencode/clang-format-18-venv/bin/clang-format -i --style=file <autofuse C/C++/AscendC files> 2. git diff --cached --check 3. git diff --name-only HEAD~1..HEAD | cut -d/ -f1 | sort | uniq -c 确认 PR 提交仅包含 autofuse/。 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 本 PR 为纯格式化变更,不涉及功能逻辑、接口、构建脚本或打包内容修改。 See merge request: cann/graph-autofusion!921 | 2 个月前 | |
【PR】: AF日志易用性整改 Co-authored-by: s00357600sgd<shenguodong1@huawei.com> # message auto-generated for no-merge-commit merge: !1864 merge autofusion_log_daily_develop into develop 【PR】: AF日志易用性整改 Created-by: s003576sgd Commit-by: s00357600sgd Merged-by: cann-robot Description: # Pull Request ## 描述 整改工具扫描的日志中存在的拼写错误、中文、缺少度量单位等低级问题,并排查类似问题统一修改 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [x] 🐛 Bug 修复 - [ ] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> ## 如何测试 描述测试此变更的步骤和前提条件: 1. 2. ## 核对清单 <!-- [x] 表示选中 --> - [ ] 我的代码遵循了项目的代码风格 - [ ] 我已对代码进行了自测 - [ ] 我已更新了相关的文档 - [ ] 我在标题中使用了合适的类型标签(如: feat:, fix:) - [ ] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 在此添加任何其他关于本次 PR 的说明。 See merge request: cann/graph-autofusion!1864 | 23 天前 | |
style: 统一 Autofuse 代码格式 Co-authored-by: Ling-DT<lingxing@huawei.com> # message auto-generated for no-merge-commit merge: !921 merge style/clang-format-autofuse-20260611 into develop style: 统一 Autofuse 代码格式 Created-by: ling-DT Commit-by: Ling-DT Merged-by: cann-robot Description: # Pull Request ## 描述 基于 cann/graph-autofusion:develop 最新提交 46a23b0,使用仓库根目录 .clang-format 对 autofuse/ 目录内受版本管理的 C/C++/AscendC 源文件执行统一格式化。 本 PR 仅包含 autofuse/ 目录格式化变更;super_kernel/ 目录格式化变更按要求暂留本地,未提交到本 PR。 格式化工具:clang-format 18.1.8,参数:--style=file。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [ ] ✨ 新功能 - [x] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue 无。 ## 如何测试 描述测试此变更的步骤和前提条件: 1. /tmp/opencode/clang-format-18-venv/bin/clang-format -i --style=file <autofuse C/C++/AscendC files> 2. git diff --cached --check 3. git diff --name-only HEAD~1..HEAD | cut -d/ -f1 | sort | uniq -c 确认 PR 提交仅包含 autofuse/。 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 本 PR 为纯格式化变更,不涉及功能逻辑、接口、构建脚本或打包内容修改。 See merge request: cann/graph-autofusion!921 | 2 个月前 | |
feat: 支持Gather后置Norm复合区域识别与多阶段融合候选生成 Co-authored-by: JaydenChu<zhumin54@huawei.com> # message auto-generated for no-merge-commit merge: !2064 merge feat/gather-norm-fusion into develop feat: 支持Gather后置Norm复合区域识别与多阶段融合候选生成 Created-by: JaydenChu Commit-by: JaydenChu Merged-by: cann-robot Description: ## 描述 在 IndirectLoad 候选生成链路中支持 Gather 后置 Norm 复合区域(多个 Reduce + Broadcast + Elementwise 组合)的识别、校验与调度接入,并打通稳定 Softmax 的专用/通用双路径分流。 ### 问题场景 含 IndirectLoad 的图后接 Norm 类计算(Softmax / LayerNorm 等)时,现有 Gather+Reduce 候选链存在三类问题: 1. **Gather+Softmax 候选被误杀**:SoftmaxApiCall::Generate 固定把最后一个向量化轴当作 R,且专用 Softmax 节点保持完整输入输出形状;普通 Reduce 的 stride 推导(BuildPostReduceLayout)对它推不出归约轴,导致所有 Gather+Softmax 候选在布局校验阶段被淘汰。 2. **多 Reduce 图断言失败**:CollectOutputBoundaries 遇到第二个 Reduce 时触发图级断言 analysis.post_reduce == nullptr,LayerNorm 均值/方差双分支形态直接编译失败。 3. **SIMT 静默降级**:FindPostReduceChain 遇多个 Reduce 返回空,has_post_reduce=false 使 SIMT 错误降级为直接写 GM 输出,绕过 Norm 统计阶段。 ### 问题原因 - 现有 RewrittenGraphAnalysis::post_reduce 为单 Reduce 假设,是 Gather+Reduce 全链路的布局锚点,但无法表达多统计 Reduce 区域; - Softmax Pattern 替换依赖 ReducePartitionCaseGenerator 的 AllLoad 流程,而该 Generator 遇 IndirectLoad 提前返回,主图中稳定 Softmax Pattern 永远不会被替换为专用节点; - 归约轴推导与尾轴 API 约束(SoftmaxApiCall 尾轴 R)之间缺乏显式分流。 ### 修改方案 1. **新增 norm_utils**:NormInfo/NormStage 元数据结构,基于节点 ExtAttr(与 TemplateAxes/LogicalView 同模式)随候选图复制传递,不侵入通用 ScheduleTask 结构。 2. **抽取 softmax_pattern_fusion_utils**:将 Softmax 匹配逻辑拆为 MatchStableStructure(结构+dtype+布局+消费者闭合)与 MatchStableDedicated(+尾轴 R 约束);原 Pass 改为薄壳调用,全图行为不变。 3. **候选图副本内 Softmax 规范化**:NormalizeDirectPostSoftmax 仅替换原始输入可回溯到 IndirectLoad 输出、且满足专用 API 尾轴约束的 Pattern;非尾轴 Pattern 保留原始 Max/Sum 图进入通用路径。 4. **多 Reduce 复合区域**:CollectOutputBoundaries 收集全部 Reduce(多 Reduce 时不停在首个),逐个校验同轴 Broadcast 配对(stride 差推导归约轴 vs 零 stride 推导恢复轴,轴 ID 集合相等);CollectGatherNormInfo 校验入口/最终输出 View 一致后写入多 stage NormInfo。 5. **SIMD 逐 Reduce 独立校验**:ValidateSimdCompositeLayouts 对每个 Reduce 独立执行 ValidateSimdPostReduceLayout(G≥R+后缀连续),避免整链转换次数误判;SeedCompositeReduceInputViews 为全部 Reduce 种向量化视图。 6. **SIMT 串行多阶段**:FindPostReduceChain 保留首个 Reduce 作为 local target 锚点并继续遍历下游 Broadcast/Elementwise/Reduce,后续统计阶段由普通调度链执行。 7. **分组完整性**:FinalizeGroupedGraphLoweringMetadata 校验 Norm 区域节点与 IndirectLoad 同组(SIMD/SIMT 图级断言;SK 的 workspace 分区拆分为合法形态仅记录日志)。 ### 修改效果 - 修复后三类形态进入正常调度链:Gather+Softmax(专用 API)、Gather+LayerNorm(多 Reduce 共享输入)、Gather+串行多阶段; - 全部失败路径改为候选级淘汰并记录日志(原为图级断言失败); - 多阶段区域复用既有节点级 Reduce/Broadcast/Elementwise Codegen,不新增专用 Norm 设备 API; - 原有单 Reduce、无 Reduce 场景行为完全不变; - 未侵入 ScheduleTask 等通用结构。 ## 变更类型 - [x] ✨ New feature ## 关联的Issue 无(如需方案讨论 Issue 可后续补充链接) ## 如何测试 1. 已执行:bash build.sh --pkg 增量构建,全部修改文件编译通过(0 生产编译错误); 2. 已验证:构建失败项仅为既有 ST 环境问题(TestBackendIndirectLoadBroadcastE2e 的 (index < tensors_.size()) 断言,干净基线同样失败); 3. 未执行:UT/ST 专项测试、NPU 设备精度与性能验证(待后续补充)。 ## 核对清单 - [x] 我的代码遵循了项目的代码风格 - [x] 我已对功能进行了自测(生产编译验证) - [ ] 我已更新了相关的文档 - [x] 我在标题中使用了适当的类型标签(feat:) - [x] 我已仔细阅读贡献指南(CONTRIBUTING.md)并遵循所有规则 ## 其他信息 See merge request: cann/graph-autofusion!2064 | 5 小时前 | |
feat: 支持Gather后置Norm复合区域识别与多阶段融合候选生成 Co-authored-by: JaydenChu<zhumin54@huawei.com> # message auto-generated for no-merge-commit merge: !2064 merge feat/gather-norm-fusion into develop feat: 支持Gather后置Norm复合区域识别与多阶段融合候选生成 Created-by: JaydenChu Commit-by: JaydenChu Merged-by: cann-robot Description: ## 描述 在 IndirectLoad 候选生成链路中支持 Gather 后置 Norm 复合区域(多个 Reduce + Broadcast + Elementwise 组合)的识别、校验与调度接入,并打通稳定 Softmax 的专用/通用双路径分流。 ### 问题场景 含 IndirectLoad 的图后接 Norm 类计算(Softmax / LayerNorm 等)时,现有 Gather+Reduce 候选链存在三类问题: 1. **Gather+Softmax 候选被误杀**:SoftmaxApiCall::Generate 固定把最后一个向量化轴当作 R,且专用 Softmax 节点保持完整输入输出形状;普通 Reduce 的 stride 推导(BuildPostReduceLayout)对它推不出归约轴,导致所有 Gather+Softmax 候选在布局校验阶段被淘汰。 2. **多 Reduce 图断言失败**:CollectOutputBoundaries 遇到第二个 Reduce 时触发图级断言 analysis.post_reduce == nullptr,LayerNorm 均值/方差双分支形态直接编译失败。 3. **SIMT 静默降级**:FindPostReduceChain 遇多个 Reduce 返回空,has_post_reduce=false 使 SIMT 错误降级为直接写 GM 输出,绕过 Norm 统计阶段。 ### 问题原因 - 现有 RewrittenGraphAnalysis::post_reduce 为单 Reduce 假设,是 Gather+Reduce 全链路的布局锚点,但无法表达多统计 Reduce 区域; - Softmax Pattern 替换依赖 ReducePartitionCaseGenerator 的 AllLoad 流程,而该 Generator 遇 IndirectLoad 提前返回,主图中稳定 Softmax Pattern 永远不会被替换为专用节点; - 归约轴推导与尾轴 API 约束(SoftmaxApiCall 尾轴 R)之间缺乏显式分流。 ### 修改方案 1. **新增 norm_utils**:NormInfo/NormStage 元数据结构,基于节点 ExtAttr(与 TemplateAxes/LogicalView 同模式)随候选图复制传递,不侵入通用 ScheduleTask 结构。 2. **抽取 softmax_pattern_fusion_utils**:将 Softmax 匹配逻辑拆为 MatchStableStructure(结构+dtype+布局+消费者闭合)与 MatchStableDedicated(+尾轴 R 约束);原 Pass 改为薄壳调用,全图行为不变。 3. **候选图副本内 Softmax 规范化**:NormalizeDirectPostSoftmax 仅替换原始输入可回溯到 IndirectLoad 输出、且满足专用 API 尾轴约束的 Pattern;非尾轴 Pattern 保留原始 Max/Sum 图进入通用路径。 4. **多 Reduce 复合区域**:CollectOutputBoundaries 收集全部 Reduce(多 Reduce 时不停在首个),逐个校验同轴 Broadcast 配对(stride 差推导归约轴 vs 零 stride 推导恢复轴,轴 ID 集合相等);CollectGatherNormInfo 校验入口/最终输出 View 一致后写入多 stage NormInfo。 5. **SIMD 逐 Reduce 独立校验**:ValidateSimdCompositeLayouts 对每个 Reduce 独立执行 ValidateSimdPostReduceLayout(G≥R+后缀连续),避免整链转换次数误判;SeedCompositeReduceInputViews 为全部 Reduce 种向量化视图。 6. **SIMT 串行多阶段**:FindPostReduceChain 保留首个 Reduce 作为 local target 锚点并继续遍历下游 Broadcast/Elementwise/Reduce,后续统计阶段由普通调度链执行。 7. **分组完整性**:FinalizeGroupedGraphLoweringMetadata 校验 Norm 区域节点与 IndirectLoad 同组(SIMD/SIMT 图级断言;SK 的 workspace 分区拆分为合法形态仅记录日志)。 ### 修改效果 - 修复后三类形态进入正常调度链:Gather+Softmax(专用 API)、Gather+LayerNorm(多 Reduce 共享输入)、Gather+串行多阶段; - 全部失败路径改为候选级淘汰并记录日志(原为图级断言失败); - 多阶段区域复用既有节点级 Reduce/Broadcast/Elementwise Codegen,不新增专用 Norm 设备 API; - 原有单 Reduce、无 Reduce 场景行为完全不变; - 未侵入 ScheduleTask 等通用结构。 ## 变更类型 - [x] ✨ New feature ## 关联的Issue 无(如需方案讨论 Issue 可后续补充链接) ## 如何测试 1. 已执行:bash build.sh --pkg 增量构建,全部修改文件编译通过(0 生产编译错误); 2. 已验证:构建失败项仅为既有 ST 环境问题(TestBackendIndirectLoadBroadcastE2e 的 (index < tensors_.size()) 断言,干净基线同样失败); 3. 未执行:UT/ST 专项测试、NPU 设备精度与性能验证(待后续补充)。 ## 核对清单 - [x] 我的代码遵循了项目的代码风格 - [x] 我已对功能进行了自测(生产编译验证) - [ ] 我已更新了相关的文档 - [x] 我在标题中使用了适当的类型标签(feat:) - [x] 我已仔细阅读贡献指南(CONTRIBUTING.md)并遵循所有规则 ## 其他信息 See merge request: cann/graph-autofusion!2064 | 5 小时前 | |
【feature】: Transpose融合ub模板改为Compact模式搬运优化性能 Co-authored-by: 李玥玮<liyuewei1@huawei.com> # message auto-generated for no-merge-commit merge: !1967 merge 2_local into develop 【feature】: Transpose融合ub模板改为Compact模式搬运优化性能 Created-by: liyuewei Commit-by: 李玥玮 Merged-by: cann-robot Description: # Pull Request ## 描述 Transpose融合ub模板改为Compact模式搬运优化性能。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [x] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> ## 如何测试 描述测试此变更的步骤和前提条件: NA ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如: feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 在此添加任何其他关于本次 PR 的说明。 See merge request: cann/graph-autofusion!1967 | 13 天前 | |
style: 统一 Autofuse 代码格式 Co-authored-by: Ling-DT<lingxing@huawei.com> # message auto-generated for no-merge-commit merge: !921 merge style/clang-format-autofuse-20260611 into develop style: 统一 Autofuse 代码格式 Created-by: ling-DT Commit-by: Ling-DT Merged-by: cann-robot Description: # Pull Request ## 描述 基于 cann/graph-autofusion:develop 最新提交 46a23b0,使用仓库根目录 .clang-format 对 autofuse/ 目录内受版本管理的 C/C++/AscendC 源文件执行统一格式化。 本 PR 仅包含 autofuse/ 目录格式化变更;super_kernel/ 目录格式化变更按要求暂留本地,未提交到本 PR。 格式化工具:clang-format 18.1.8,参数:--style=file。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [ ] ✨ 新功能 - [x] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue 无。 ## 如何测试 描述测试此变更的步骤和前提条件: 1. /tmp/opencode/clang-format-18-venv/bin/clang-format -i --style=file <autofuse C/C++/AscendC files> 2. git diff --cached --check 3. git diff --name-only HEAD~1..HEAD | cut -d/ -f1 | sort | uniq -c 确认 PR 提交仅包含 autofuse/。 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 本 PR 为纯格式化变更,不涉及功能逻辑、接口、构建脚本或打包内容修改。 See merge request: cann/graph-autofusion!921 | 2 个月前 | |
【feature】: Transpose融合ub模板改为Compact模式搬运优化性能 Co-authored-by: 李玥玮<liyuewei1@huawei.com> # message auto-generated for no-merge-commit merge: !1967 merge 2_local into develop 【feature】: Transpose融合ub模板改为Compact模式搬运优化性能 Created-by: liyuewei Commit-by: 李玥玮 Merged-by: cann-robot Description: # Pull Request ## 描述 Transpose融合ub模板改为Compact模式搬运优化性能。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [x] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> ## 如何测试 描述测试此变更的步骤和前提条件: NA ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如: feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 在此添加任何其他关于本次 PR 的说明。 See merge request: cann/graph-autofusion!1967 | 13 天前 | |
style: 统一 Autofuse 代码格式 Co-authored-by: Ling-DT<lingxing@huawei.com> # message auto-generated for no-merge-commit merge: !921 merge style/clang-format-autofuse-20260611 into develop style: 统一 Autofuse 代码格式 Created-by: ling-DT Commit-by: Ling-DT Merged-by: cann-robot Description: # Pull Request ## 描述 基于 cann/graph-autofusion:develop 最新提交 46a23b0,使用仓库根目录 .clang-format 对 autofuse/ 目录内受版本管理的 C/C++/AscendC 源文件执行统一格式化。 本 PR 仅包含 autofuse/ 目录格式化变更;super_kernel/ 目录格式化变更按要求暂留本地,未提交到本 PR。 格式化工具:clang-format 18.1.8,参数:--style=file。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [ ] ✨ 新功能 - [x] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue 无。 ## 如何测试 描述测试此变更的步骤和前提条件: 1. /tmp/opencode/clang-format-18-venv/bin/clang-format -i --style=file <autofuse C/C++/AscendC files> 2. git diff --cached --check 3. git diff --name-only HEAD~1..HEAD | cut -d/ -f1 | sort | uniq -c 确认 PR 提交仅包含 autofuse/。 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 本 PR 为纯格式化变更,不涉及功能逻辑、接口、构建脚本或打包内容修改。 See merge request: cann/graph-autofusion!921 | 2 个月前 | |
【feat】:v35 reduce全量迁移 Co-authored-by: Joey_guo<guojianyang@huawei.com> # message auto-generated for no-merge-commit merge: !2118 merge redu into develop 【feat】:v35 reduce全量迁移 Created-by: Joey_guo Commit-by: Joey_guo Merged-by: cann-robot Description: # Pull Request ## 描述 全量迁移reduce至本仓,补齐遗漏的迁移文件。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [ ] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [x] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> ## 如何测试 描述测试此变更的步骤和前提条件: 1.现有用例的功能、精度、性能均不受影响 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如: feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 NA See merge request: cann/graph-autofusion!2118 | 4 天前 | |
【refactor】: 重构Reduce/RegReduce代码生成架构 Co-authored-by: chenyukai<chenyukai4@huawei.com> # message auto-generated for no-merge-commit merge: !904 merge br_c00826661_reduce0617 into develop 【refactor】: 重构Reduce/RegReduce代码生成架构 Created-by: chenyukai Commit-by: chenyukai Merged-by: cann-robot Description: # Pull Request ## 描述 - ReduceApiCall/RegReduceApiCall 接口由 Generate 改为 BuildApiParam + GenDimensionParam - GetApiName() 与真实 API 接口名对齐:Max/Min/Sum/Prod/Any/All → ReduceMax/ReduceMin/ReduceSum/ReduceProd/ReduceAny/ReduceAll,Mean → ReduceMean ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [ ] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [x] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> ## 如何测试 当前用例无问题 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [ ] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如: feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 在此添加任何其他关于本次 PR 的说明。 See merge request: cann/graph-autofusion!904 | 2 个月前 | |
【feature】: Transpose融合ub模板改为Compact模式搬运优化性能 Co-authored-by: 李玥玮<liyuewei1@huawei.com> # message auto-generated for no-merge-commit merge: !1967 merge 2_local into develop 【feature】: Transpose融合ub模板改为Compact模式搬运优化性能 Created-by: liyuewei Commit-by: 李玥玮 Merged-by: cann-robot Description: # Pull Request ## 描述 Transpose融合ub模板改为Compact模式搬运优化性能。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [x] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> ## 如何测试 描述测试此变更的步骤和前提条件: NA ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如: feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 在此添加任何其他关于本次 PR 的说明。 See merge request: cann/graph-autofusion!1967 | 13 天前 | |
style: 统一 Autofuse 代码格式 Co-authored-by: Ling-DT<lingxing@huawei.com> # message auto-generated for no-merge-commit merge: !921 merge style/clang-format-autofuse-20260611 into develop style: 统一 Autofuse 代码格式 Created-by: ling-DT Commit-by: Ling-DT Merged-by: cann-robot Description: # Pull Request ## 描述 基于 cann/graph-autofusion:develop 最新提交 46a23b0,使用仓库根目录 .clang-format 对 autofuse/ 目录内受版本管理的 C/C++/AscendC 源文件执行统一格式化。 本 PR 仅包含 autofuse/ 目录格式化变更;super_kernel/ 目录格式化变更按要求暂留本地,未提交到本 PR。 格式化工具:clang-format 18.1.8,参数:--style=file。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [ ] ✨ 新功能 - [x] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue 无。 ## 如何测试 描述测试此变更的步骤和前提条件: 1. /tmp/opencode/clang-format-18-venv/bin/clang-format -i --style=file <autofuse C/C++/AscendC files> 2. git diff --cached --check 3. git diff --name-only HEAD~1..HEAD | cut -d/ -f1 | sort | uniq -c 确认 PR 提交仅包含 autofuse/。 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 本 PR 为纯格式化变更,不涉及功能逻辑、接口、构建脚本或打包内容修改。 See merge request: cann/graph-autofusion!921 | 2 个月前 | |
fix: Autofuse 输出日志和错误提示文案标准化 (#312) Co-authored-by: hamburgerbobo<gaoyubo4@huawei.com> # message auto-generated for no-merge-commit merge: !2098 merge fix/log-output-issue into develop fix: Autofuse 输出日志和错误提示文案标准化 (#312) Created-by: hamburgerbobo Commit-by: hamburgerbobo Merged-by: cann-robot Description: # Pull Request ## 描述 本 PR 整改 Autofuse 输出日志和错误提示文案,提升日志可读性、问题定位能力和统一日志管理一致性。 - 修正日志中的拼写、语法和主谓一致问题。 - 补充越限日志的当前值和合法范围。 - 为 VF 性能日志补充 cycle 单位。 - 将生产 Python 编译流程中的自定义 print 接入已有统一日志接口。 - 翻译计划中指定的中文输出文案,并同步通用求解器生产生成器、source mirror 和 UT 期望。 - 更新统一日志接口相关 Python UT。 本 PR 仅包含本次日志整改涉及的源码和必要测试更新,不包含日志分析 CSV、设计文档、.gitignore 或当前分支中的其他历史提交。 ## 变更类型 - [x] 🐛 Bug 修复 - [ ] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue https://gitcode.com/cann/graph-autofusion/issues/312 Fixes #312 合并后关闭已关联的 Issue。 ## 如何测试 1. 使用 CANN 9.2.0 配置 CMake,执行 cmake --build build --target aihac_codegen -j 8。 2. 执行 cmake --build build --target pyautofuse -j 8。 3. 执行编译相关 Python UT,结果为 113 passed。 4. 执行 ATT Analyze 单测和功能测试,结果分别为 38 passed 和 4 passed。 ## 核对清单 - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [ ] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 本次仅涉及日志文案和统一日志输出接口,不改变图优化、Codegen 算法、运行时数据流或对外 API/ABI。项目文档无需更新。 See merge request: cann/graph-autofusion!2098 | 4 天前 | |
style: 统一 Autofuse 代码格式 Co-authored-by: Ling-DT<lingxing@huawei.com> # message auto-generated for no-merge-commit merge: !921 merge style/clang-format-autofuse-20260611 into develop style: 统一 Autofuse 代码格式 Created-by: ling-DT Commit-by: Ling-DT Merged-by: cann-robot Description: # Pull Request ## 描述 基于 cann/graph-autofusion:develop 最新提交 46a23b0,使用仓库根目录 .clang-format 对 autofuse/ 目录内受版本管理的 C/C++/AscendC 源文件执行统一格式化。 本 PR 仅包含 autofuse/ 目录格式化变更;super_kernel/ 目录格式化变更按要求暂留本地,未提交到本 PR。 格式化工具:clang-format 18.1.8,参数:--style=file。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [ ] ✨ 新功能 - [x] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue 无。 ## 如何测试 描述测试此变更的步骤和前提条件: 1. /tmp/opencode/clang-format-18-venv/bin/clang-format -i --style=file <autofuse C/C++/AscendC files> 2. git diff --cached --check 3. git diff --name-only HEAD~1..HEAD | cut -d/ -f1 | sort | uniq -c 确认 PR 提交仅包含 autofuse/。 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 本 PR 为纯格式化变更,不涉及功能逻辑、接口、构建脚本或打包内容修改。 See merge request: cann/graph-autofusion!921 | 2 个月前 | |
fix(cv-ubfuse): align UB physical layout for mixed-dtype vector tensors Co-authored-by: tianbaolin<tianbaolin1@qq.com> Co-authored-by: ling-DT<lingxing@huawei.com> # message auto-generated for no-merge-commit merge: !2177 merge tbl/fix/cv-ubfuse-mixed-dtype-ub-alignment-dev into develop fix(cv-ubfuse): align UB physical layout for mixed-dtype vector tensors Created-by: tianbaolin Commit-by: ling-DT;tianbaolin Merged-by: cann-robot Description: ## Problem In CV UBFuse kernels the epilogue consumes the cube output by rows ( stageM * blockShapeNAlign) while queue tensors were still sized by the flat element budget (a0a1t), and 1D flat APIs were used for mixed-dtype vector stages. When tensor row strides differ by dtype (e.g. bool rows are 32B-aligned while float rows are not), the flat interpretation reads/writes wrong addresses and the queue allocation can be smaller than the real per-stage footprint, which corrupts results (scattered mismatches) or overflows UB (aicore exception). ## Fix Keeps the three-size contract (UB allocation >= UB compute size >= valid data size): **Tiling** - basen_align aligns to 32 elements, so it is the supremum of every dtype 32B-aligned row width; cube_ub_stage_size keeps cube-dtype element semantics - new cube_m_stage_size (max stage rows); after the solver picks STAGE_SIZE_NAME it is overwritten with STAGE_SIZE_NAME / basen_align, so rows * any-dtype-row-width never exceeds the solver per-dtype element budget - serialize the new field for const/dynamic/DB paths **Kernel init** - stage_size unified to element count (solver budget a0a1t, falling back to cube fragment capacity for tiny stages) - stage_size_type (rows) comes from cube_m_stage_size on all four flows: inductor const (kConstTilingData), inductor dynamic (params), non-inductor static (kConstTilingData baked by ascbc) and non-inductor dynamic (params.cv_tiling_data) - TensorSizeAssign emits local_size = stage_size for every UB tensor, so each dtype byte size equals its solver budget exactly - buf_cube sized by the pure C-fragment capacity - conv2d stage_size switched to element count as well **Reg APIs** - CvApi2DParams gains valid_size / output_compute_size / input_compute_size - Cast/Floor/Round/Trunc/Compare use the 2D form with logical {curAivM, curAivN} dims plus per-dtype physical row strides under CV UBFuse - WhereRegApiCall::GenerateNoLoopCase emits the 2D WhereExtend form with an independent mask stride, fixing bool-mask rows (e.g. align(N,32) != float row width) that previously went through a flat 1D call ## Verification (torch.compile, forced CV fusion, Ascend950PR): - tensor/broadcast/scalar compares, where (bool mask from GM, int8, int64, two float branches, compare->where), cast (fp16/int32), floor/round/trunc, add/mul/sub/div, max/min, unary and chained cases all match eager bit-exactly - previously failing N=400/600 and crashing N=664 now pass - inductor dynamic shape (params path) verified with multiple shapes - non-inductor flows covered by code-path audit (ascbc bakes kConstTilingData, dynamic reads params.cv_tiling_data) - UT expectations updated for the new stage_size element semantics ## TF non-inductor static-flow fixes (follow-up commit 5a48b96e) The rework broke TF static-shape kernel compilation (and exposed two latent misalignments): - **codegen_kernel.cpp**: non-inductor static Init referenced params.cv_tiling_data->cube_m_stage_size, but TF/GE online-compiled static graphs have neither INDUCTOR_CONST_TILING_DATA nor the cv_tiling_data Params member (is_dynamic=false), failing with no member named 'cv_tiling_data' in 'AutoFusionVector::Params'. Now reads the baked solver budget (AutofuseTilingData::STAGE_SIZE_NAME) and derives stage rows as stage_size_name / basen_align (conv2d-branch pattern). - **asc_codegen_compile.py**: host tiling still used ub_align_value = 32 / cube_output_type_size; aligned to 32 elements to match the kernel-side supremum row width. TF E2E (GE AutoFuse, --autofuse_enable_pass=matmul, Ascend950PR): matmul+abs now compiles and runs; 128x128x128 completes with results within half-cast precision. Note: 28-block (large-shape) MIX launches still deadlock in the GE/fftsplus dispatch (block group 13 never scheduled) — tracked separately, not addressed by this PR. ## TF non-inductor static-flow fixes (follow-up commit 5a48b96e) - **codegen_kernel.cpp**: non-inductor static Init referenced params.cv_tiling_data->cube_m_stage_size, but TF/GE online-compiled static graphs have neither INDUCTOR_CONST_TILING_DATA nor the cv_tiling_data Params member (is_dynamic=false), failing with "no member named 'cv_tiling_data' in 'AutoFusionVector::Params'". Now reads the baked solver budget (AutofuseTilingData::STAGE_SIZE_NAME) and derives stage rows as stage_size_name / basen_align (conv2d-branch pattern). - **asc_codegen_compile.py**: host tiling still used ub_align_value = 32 / cube_output_type_size; aligned to 32 elements to match the kernel-side supremum row width. TF E2E (GE AutoFuse, --autofuse_enable_pass=matmul, Ascend950PR): matmul+abs now compiles and runs; 128x128x128 completes within half-cast precision. Note: 28-block (large-shape) MIX launches still deadlock in the GE/fftsplus dispatch (block group 13 never scheduled) - tracked separately, not addressed by this PR. See merge request: cann/graph-autofusion!2177 | 7 小时前 | |
feat: 优化Where性能建模 Co-authored-by: gcw_V3YyYBt1<gaoxin32@huawei.com> # message auto-generated for no-merge-commit merge: !1580 merge perf/where-v2-att-model into develop feat: 优化Where性能建模 Created-by: gcw_V3YyYBt1 Commit-by: gcw_V3YyYBt1 Merged-by: cann-robot Description: # Pull Request ## 描述 完善 Where/Select V2 的 ATT 性能建模与 codegen 传参链路,修正 1D WhereImpl 和 2D WhereExtend 的计数建模。 ## 背景 - Where/Select V2 当前共享 codegen/perf 链路,但 specific params 未透传,导致 ATT 无法拿到 where 相关参数。 - 1D WhereImpl 与 2D WhereExtend 的 Reg:: 调用模型不同,原有复用逻辑不能准确反映实际开销。 - outer loop 的拆分方式需要和 codegen 的 where 参数结构一致,避免重复计入最后一层 outer。 ## 修改方案 - 为 Where/Select V2 透传 WhereNodeParams - 修正 Where V2 的 outer loop 传参与 WhereExtend 参数拆分 - 按 WhereCompute 中的 Reg:: 调用补全 1D WhereImpl 性能模型 - 保持 2D WhereExtend 路径的公共建模逻辑 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [x] 🐛 Bug 修复 - [ ] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue ## 如何测试 描述测试此变更的步骤和前提条件: 1. source /home/developer/Ascend/cann/set_env.sh && export ASCEND_HOME_PATH=/home/developer/Ascend/cann 2. cmake --build build --target aihac_codegen -j 8 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [ ] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 无。 See merge request: cann/graph-autofusion!1580 | 1 个月前 | |
fix(cv-ubfuse): align UB physical layout for mixed-dtype vector tensors Co-authored-by: tianbaolin<tianbaolin1@qq.com> Co-authored-by: ling-DT<lingxing@huawei.com> # message auto-generated for no-merge-commit merge: !2177 merge tbl/fix/cv-ubfuse-mixed-dtype-ub-alignment-dev into develop fix(cv-ubfuse): align UB physical layout for mixed-dtype vector tensors Created-by: tianbaolin Commit-by: ling-DT;tianbaolin Merged-by: cann-robot Description: ## Problem In CV UBFuse kernels the epilogue consumes the cube output by rows ( stageM * blockShapeNAlign) while queue tensors were still sized by the flat element budget (a0a1t), and 1D flat APIs were used for mixed-dtype vector stages. When tensor row strides differ by dtype (e.g. bool rows are 32B-aligned while float rows are not), the flat interpretation reads/writes wrong addresses and the queue allocation can be smaller than the real per-stage footprint, which corrupts results (scattered mismatches) or overflows UB (aicore exception). ## Fix Keeps the three-size contract (UB allocation >= UB compute size >= valid data size): **Tiling** - basen_align aligns to 32 elements, so it is the supremum of every dtype 32B-aligned row width; cube_ub_stage_size keeps cube-dtype element semantics - new cube_m_stage_size (max stage rows); after the solver picks STAGE_SIZE_NAME it is overwritten with STAGE_SIZE_NAME / basen_align, so rows * any-dtype-row-width never exceeds the solver per-dtype element budget - serialize the new field for const/dynamic/DB paths **Kernel init** - stage_size unified to element count (solver budget a0a1t, falling back to cube fragment capacity for tiny stages) - stage_size_type (rows) comes from cube_m_stage_size on all four flows: inductor const (kConstTilingData), inductor dynamic (params), non-inductor static (kConstTilingData baked by ascbc) and non-inductor dynamic (params.cv_tiling_data) - TensorSizeAssign emits local_size = stage_size for every UB tensor, so each dtype byte size equals its solver budget exactly - buf_cube sized by the pure C-fragment capacity - conv2d stage_size switched to element count as well **Reg APIs** - CvApi2DParams gains valid_size / output_compute_size / input_compute_size - Cast/Floor/Round/Trunc/Compare use the 2D form with logical {curAivM, curAivN} dims plus per-dtype physical row strides under CV UBFuse - WhereRegApiCall::GenerateNoLoopCase emits the 2D WhereExtend form with an independent mask stride, fixing bool-mask rows (e.g. align(N,32) != float row width) that previously went through a flat 1D call ## Verification (torch.compile, forced CV fusion, Ascend950PR): - tensor/broadcast/scalar compares, where (bool mask from GM, int8, int64, two float branches, compare->where), cast (fp16/int32), floor/round/trunc, add/mul/sub/div, max/min, unary and chained cases all match eager bit-exactly - previously failing N=400/600 and crashing N=664 now pass - inductor dynamic shape (params path) verified with multiple shapes - non-inductor flows covered by code-path audit (ascbc bakes kConstTilingData, dynamic reads params.cv_tiling_data) - UT expectations updated for the new stage_size element semantics ## TF non-inductor static-flow fixes (follow-up commit 5a48b96e) The rework broke TF static-shape kernel compilation (and exposed two latent misalignments): - **codegen_kernel.cpp**: non-inductor static Init referenced params.cv_tiling_data->cube_m_stage_size, but TF/GE online-compiled static graphs have neither INDUCTOR_CONST_TILING_DATA nor the cv_tiling_data Params member (is_dynamic=false), failing with no member named 'cv_tiling_data' in 'AutoFusionVector::Params'. Now reads the baked solver budget (AutofuseTilingData::STAGE_SIZE_NAME) and derives stage rows as stage_size_name / basen_align (conv2d-branch pattern). - **asc_codegen_compile.py**: host tiling still used ub_align_value = 32 / cube_output_type_size; aligned to 32 elements to match the kernel-side supremum row width. TF E2E (GE AutoFuse, --autofuse_enable_pass=matmul, Ascend950PR): matmul+abs now compiles and runs; 128x128x128 completes with results within half-cast precision. Note: 28-block (large-shape) MIX launches still deadlock in the GE/fftsplus dispatch (block group 13 never scheduled) — tracked separately, not addressed by this PR. ## TF non-inductor static-flow fixes (follow-up commit 5a48b96e) - **codegen_kernel.cpp**: non-inductor static Init referenced params.cv_tiling_data->cube_m_stage_size, but TF/GE online-compiled static graphs have neither INDUCTOR_CONST_TILING_DATA nor the cv_tiling_data Params member (is_dynamic=false), failing with "no member named 'cv_tiling_data' in 'AutoFusionVector::Params'". Now reads the baked solver budget (AutofuseTilingData::STAGE_SIZE_NAME) and derives stage rows as stage_size_name / basen_align (conv2d-branch pattern). - **asc_codegen_compile.py**: host tiling still used ub_align_value = 32 / cube_output_type_size; aligned to 32 elements to match the kernel-side supremum row width. TF E2E (GE AutoFuse, --autofuse_enable_pass=matmul, Ascend950PR): matmul+abs now compiles and runs; 128x128x128 completes within half-cast precision. Note: 28-block (large-shape) MIX launches still deadlock in the GE/fftsplus dispatch (block group 13 never scheduled) - tracked separately, not addressed by this PR. See merge request: cann/graph-autofusion!2177 | 7 小时前 | |
style: 统一 Autofuse 代码格式 Co-authored-by: Ling-DT<lingxing@huawei.com> # message auto-generated for no-merge-commit merge: !921 merge style/clang-format-autofuse-20260611 into develop style: 统一 Autofuse 代码格式 Created-by: ling-DT Commit-by: Ling-DT Merged-by: cann-robot Description: # Pull Request ## 描述 基于 cann/graph-autofusion:develop 最新提交 46a23b0,使用仓库根目录 .clang-format 对 autofuse/ 目录内受版本管理的 C/C++/AscendC 源文件执行统一格式化。 本 PR 仅包含 autofuse/ 目录格式化变更;super_kernel/ 目录格式化变更按要求暂留本地,未提交到本 PR。 格式化工具:clang-format 18.1.8,参数:--style=file。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [ ] ✨ 新功能 - [x] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue 无。 ## 如何测试 描述测试此变更的步骤和前提条件: 1. /tmp/opencode/clang-format-18-venv/bin/clang-format -i --style=file <autofuse C/C++/AscendC files> 2. git diff --cached --check 3. git diff --name-only HEAD~1..HEAD | cut -d/ -f1 | sort | uniq -c 确认 PR 提交仅包含 autofuse/。 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 本 PR 为纯格式化变更,不涉及功能逻辑、接口、构建脚本或打包内容修改。 See merge request: cann/graph-autofusion!921 | 2 个月前 | |
feat: add SoftMax AscIR operator for V2 (A5/v35) Co-authored-by: wang-yan-male<wangyan220@huawei.com> # message auto-generated for no-merge-commit merge: !1222 merge develop into develop feat: add SoftMax AscIR operator for V2 (A5/v35) Created-by: WangYanMale Commit-by: wang-yan-male Merged-by: cann-robot Description: # Pull Request ## 描述 add SoftMax AscIR operator for V2 (A5/v35) ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [x] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> ## 如何测试 前端调用softmax算子,观测性能结果数据,与单算子做比对 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [ ] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如: feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 在此添加任何其他关于本次 PR 的说明。 See merge request: cann/graph-autofusion!1222 | 2 个月前 | |
feat: add SoftMax AscIR operator for V2 (A5/v35) Co-authored-by: wang-yan-male<wangyan220@huawei.com> # message auto-generated for no-merge-commit merge: !1222 merge develop into develop feat: add SoftMax AscIR operator for V2 (A5/v35) Created-by: WangYanMale Commit-by: wang-yan-male Merged-by: cann-robot Description: # Pull Request ## 描述 add SoftMax AscIR operator for V2 (A5/v35) ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [x] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> ## 如何测试 前端调用softmax算子,观测性能结果数据,与单算子做比对 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [ ] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如: feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 在此添加任何其他关于本次 PR 的说明。 See merge request: cann/graph-autofusion!1222 | 2 个月前 | |
fix: Autofuse 输出日志和错误提示文案标准化 (#312) Co-authored-by: hamburgerbobo<gaoyubo4@huawei.com> # message auto-generated for no-merge-commit merge: !2098 merge fix/log-output-issue into develop fix: Autofuse 输出日志和错误提示文案标准化 (#312) Created-by: hamburgerbobo Commit-by: hamburgerbobo Merged-by: cann-robot Description: # Pull Request ## 描述 本 PR 整改 Autofuse 输出日志和错误提示文案,提升日志可读性、问题定位能力和统一日志管理一致性。 - 修正日志中的拼写、语法和主谓一致问题。 - 补充越限日志的当前值和合法范围。 - 为 VF 性能日志补充 cycle 单位。 - 将生产 Python 编译流程中的自定义 print 接入已有统一日志接口。 - 翻译计划中指定的中文输出文案,并同步通用求解器生产生成器、source mirror 和 UT 期望。 - 更新统一日志接口相关 Python UT。 本 PR 仅包含本次日志整改涉及的源码和必要测试更新,不包含日志分析 CSV、设计文档、.gitignore 或当前分支中的其他历史提交。 ## 变更类型 - [x] 🐛 Bug 修复 - [ ] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue https://gitcode.com/cann/graph-autofusion/issues/312 Fixes #312 合并后关闭已关联的 Issue。 ## 如何测试 1. 使用 CANN 9.2.0 配置 CMake,执行 cmake --build build --target aihac_codegen -j 8。 2. 执行 cmake --build build --target pyautofuse -j 8。 3. 执行编译相关 Python UT,结果为 113 passed。 4. 执行 ATT Analyze 单测和功能测试,结果分别为 38 passed 和 4 passed。 ## 核对清单 - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [ ] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 本次仅涉及日志文案和统一日志输出接口,不改变图优化、Codegen 算法、运行时数据流或对外 API/ABI。项目文档无需更新。 See merge request: cann/graph-autofusion!2098 | 4 天前 | |
【PR】: [fix] [autofuse] adapt reform of the same-named header files of ge. Co-authored-by: xingzhixiong<xingzhixiong@huawei.com> # message auto-generated for no-merge-commit merge: !1149 merge develop_change_dir_of_metadef_headers into develop 【PR】: [fix] [autofuse] adapt reform of the same-named header files of ge. Created-by: xingzhixiong Commit-by: xingzhixiong Merged-by: cann-robot Description: # Pull Request ## 描述 metadef在做同名头文件整改,整改完编译发现gaf失败,原因是gaf仓和ge仓也有同名且子目录相同的头文件,故需要将gaf仓的同名头文件的子目录进行整改,只给gaf仓内部使用,避免产生耦合编译问题。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [ ] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [x] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> ## 如何测试 描述测试此变更的步骤和前提条件: 1. ci流水线pass 2. RDV pass ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如: feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 在此添加任何其他关于本次 PR 的说明。 See merge request: cann/graph-autofusion!1149 | 2 个月前 | |
【PR】: [fix] [autofuse] adapt reform of the same-named header files of ge. Co-authored-by: xingzhixiong<xingzhixiong@huawei.com> # message auto-generated for no-merge-commit merge: !1149 merge develop_change_dir_of_metadef_headers into develop 【PR】: [fix] [autofuse] adapt reform of the same-named header files of ge. Created-by: xingzhixiong Commit-by: xingzhixiong Merged-by: cann-robot Description: # Pull Request ## 描述 metadef在做同名头文件整改,整改完编译发现gaf失败,原因是gaf仓和ge仓也有同名且子目录相同的头文件,故需要将gaf仓的同名头文件的子目录进行整改,只给gaf仓内部使用,避免产生耦合编译问题。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [ ] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [x] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> ## 如何测试 描述测试此变更的步骤和前提条件: 1. ci流水线pass 2. RDV pass ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如: feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 在此添加任何其他关于本次 PR 的说明。 See merge request: cann/graph-autofusion!1149 | 2 个月前 | |
style: 统一 Autofuse 代码格式 Co-authored-by: Ling-DT<lingxing@huawei.com> # message auto-generated for no-merge-commit merge: !921 merge style/clang-format-autofuse-20260611 into develop style: 统一 Autofuse 代码格式 Created-by: ling-DT Commit-by: Ling-DT Merged-by: cann-robot Description: # Pull Request ## 描述 基于 cann/graph-autofusion:develop 最新提交 46a23b0,使用仓库根目录 .clang-format 对 autofuse/ 目录内受版本管理的 C/C++/AscendC 源文件执行统一格式化。 本 PR 仅包含 autofuse/ 目录格式化变更;super_kernel/ 目录格式化变更按要求暂留本地,未提交到本 PR。 格式化工具:clang-format 18.1.8,参数:--style=file。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [ ] ✨ 新功能 - [x] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue 无。 ## 如何测试 描述测试此变更的步骤和前提条件: 1. /tmp/opencode/clang-format-18-venv/bin/clang-format -i --style=file <autofuse C/C++/AscendC files> 2. git diff --cached --check 3. git diff --name-only HEAD~1..HEAD | cut -d/ -f1 | sort | uniq -c 确认 PR 提交仅包含 autofuse/。 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 本 PR 为纯格式化变更,不涉及功能逻辑、接口、构建脚本或打包内容修改。 See merge request: cann/graph-autofusion!921 | 2 个月前 | |
fix(cv-ubfuse): align UB physical layout for mixed-dtype vector tensors Co-authored-by: tianbaolin<tianbaolin1@qq.com> Co-authored-by: ling-DT<lingxing@huawei.com> # message auto-generated for no-merge-commit merge: !2177 merge tbl/fix/cv-ubfuse-mixed-dtype-ub-alignment-dev into develop fix(cv-ubfuse): align UB physical layout for mixed-dtype vector tensors Created-by: tianbaolin Commit-by: ling-DT;tianbaolin Merged-by: cann-robot Description: ## Problem In CV UBFuse kernels the epilogue consumes the cube output by rows ( stageM * blockShapeNAlign) while queue tensors were still sized by the flat element budget (a0a1t), and 1D flat APIs were used for mixed-dtype vector stages. When tensor row strides differ by dtype (e.g. bool rows are 32B-aligned while float rows are not), the flat interpretation reads/writes wrong addresses and the queue allocation can be smaller than the real per-stage footprint, which corrupts results (scattered mismatches) or overflows UB (aicore exception). ## Fix Keeps the three-size contract (UB allocation >= UB compute size >= valid data size): **Tiling** - basen_align aligns to 32 elements, so it is the supremum of every dtype 32B-aligned row width; cube_ub_stage_size keeps cube-dtype element semantics - new cube_m_stage_size (max stage rows); after the solver picks STAGE_SIZE_NAME it is overwritten with STAGE_SIZE_NAME / basen_align, so rows * any-dtype-row-width never exceeds the solver per-dtype element budget - serialize the new field for const/dynamic/DB paths **Kernel init** - stage_size unified to element count (solver budget a0a1t, falling back to cube fragment capacity for tiny stages) - stage_size_type (rows) comes from cube_m_stage_size on all four flows: inductor const (kConstTilingData), inductor dynamic (params), non-inductor static (kConstTilingData baked by ascbc) and non-inductor dynamic (params.cv_tiling_data) - TensorSizeAssign emits local_size = stage_size for every UB tensor, so each dtype byte size equals its solver budget exactly - buf_cube sized by the pure C-fragment capacity - conv2d stage_size switched to element count as well **Reg APIs** - CvApi2DParams gains valid_size / output_compute_size / input_compute_size - Cast/Floor/Round/Trunc/Compare use the 2D form with logical {curAivM, curAivN} dims plus per-dtype physical row strides under CV UBFuse - WhereRegApiCall::GenerateNoLoopCase emits the 2D WhereExtend form with an independent mask stride, fixing bool-mask rows (e.g. align(N,32) != float row width) that previously went through a flat 1D call ## Verification (torch.compile, forced CV fusion, Ascend950PR): - tensor/broadcast/scalar compares, where (bool mask from GM, int8, int64, two float branches, compare->where), cast (fp16/int32), floor/round/trunc, add/mul/sub/div, max/min, unary and chained cases all match eager bit-exactly - previously failing N=400/600 and crashing N=664 now pass - inductor dynamic shape (params path) verified with multiple shapes - non-inductor flows covered by code-path audit (ascbc bakes kConstTilingData, dynamic reads params.cv_tiling_data) - UT expectations updated for the new stage_size element semantics ## TF non-inductor static-flow fixes (follow-up commit 5a48b96e) The rework broke TF static-shape kernel compilation (and exposed two latent misalignments): - **codegen_kernel.cpp**: non-inductor static Init referenced params.cv_tiling_data->cube_m_stage_size, but TF/GE online-compiled static graphs have neither INDUCTOR_CONST_TILING_DATA nor the cv_tiling_data Params member (is_dynamic=false), failing with no member named 'cv_tiling_data' in 'AutoFusionVector::Params'. Now reads the baked solver budget (AutofuseTilingData::STAGE_SIZE_NAME) and derives stage rows as stage_size_name / basen_align (conv2d-branch pattern). - **asc_codegen_compile.py**: host tiling still used ub_align_value = 32 / cube_output_type_size; aligned to 32 elements to match the kernel-side supremum row width. TF E2E (GE AutoFuse, --autofuse_enable_pass=matmul, Ascend950PR): matmul+abs now compiles and runs; 128x128x128 completes with results within half-cast precision. Note: 28-block (large-shape) MIX launches still deadlock in the GE/fftsplus dispatch (block group 13 never scheduled) — tracked separately, not addressed by this PR. ## TF non-inductor static-flow fixes (follow-up commit 5a48b96e) - **codegen_kernel.cpp**: non-inductor static Init referenced params.cv_tiling_data->cube_m_stage_size, but TF/GE online-compiled static graphs have neither INDUCTOR_CONST_TILING_DATA nor the cv_tiling_data Params member (is_dynamic=false), failing with "no member named 'cv_tiling_data' in 'AutoFusionVector::Params'". Now reads the baked solver budget (AutofuseTilingData::STAGE_SIZE_NAME) and derives stage rows as stage_size_name / basen_align (conv2d-branch pattern). - **asc_codegen_compile.py**: host tiling still used ub_align_value = 32 / cube_output_type_size; aligned to 32 elements to match the kernel-side supremum row width. TF E2E (GE AutoFuse, --autofuse_enable_pass=matmul, Ascend950PR): matmul+abs now compiles and runs; 128x128x128 completes within half-cast precision. Note: 28-block (large-shape) MIX launches still deadlock in the GE/fftsplus dispatch (block group 13 never scheduled) - tracked separately, not addressed by this PR. See merge request: cann/graph-autofusion!2177 | 7 小时前 | |
style: 统一 Autofuse 代码格式 Co-authored-by: Ling-DT<lingxing@huawei.com> # message auto-generated for no-merge-commit merge: !921 merge style/clang-format-autofuse-20260611 into develop style: 统一 Autofuse 代码格式 Created-by: ling-DT Commit-by: Ling-DT Merged-by: cann-robot Description: # Pull Request ## 描述 基于 cann/graph-autofusion:develop 最新提交 46a23b0,使用仓库根目录 .clang-format 对 autofuse/ 目录内受版本管理的 C/C++/AscendC 源文件执行统一格式化。 本 PR 仅包含 autofuse/ 目录格式化变更;super_kernel/ 目录格式化变更按要求暂留本地,未提交到本 PR。 格式化工具:clang-format 18.1.8,参数:--style=file。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [ ] ✨ 新功能 - [x] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue 无。 ## 如何测试 描述测试此变更的步骤和前提条件: 1. /tmp/opencode/clang-format-18-venv/bin/clang-format -i --style=file <autofuse C/C++/AscendC files> 2. git diff --cached --check 3. git diff --name-only HEAD~1..HEAD | cut -d/ -f1 | sort | uniq -c 确认 PR 提交仅包含 autofuse/。 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 本 PR 为纯格式化变更,不涉及功能逻辑、接口、构建脚本或打包内容修改。 See merge request: cann/graph-autofusion!921 | 2 个月前 | |
fix(cv-ubfuse): align UB physical layout for mixed-dtype vector tensors Co-authored-by: tianbaolin<tianbaolin1@qq.com> Co-authored-by: ling-DT<lingxing@huawei.com> # message auto-generated for no-merge-commit merge: !2177 merge tbl/fix/cv-ubfuse-mixed-dtype-ub-alignment-dev into develop fix(cv-ubfuse): align UB physical layout for mixed-dtype vector tensors Created-by: tianbaolin Commit-by: ling-DT;tianbaolin Merged-by: cann-robot Description: ## Problem In CV UBFuse kernels the epilogue consumes the cube output by rows ( stageM * blockShapeNAlign) while queue tensors were still sized by the flat element budget (a0a1t), and 1D flat APIs were used for mixed-dtype vector stages. When tensor row strides differ by dtype (e.g. bool rows are 32B-aligned while float rows are not), the flat interpretation reads/writes wrong addresses and the queue allocation can be smaller than the real per-stage footprint, which corrupts results (scattered mismatches) or overflows UB (aicore exception). ## Fix Keeps the three-size contract (UB allocation >= UB compute size >= valid data size): **Tiling** - basen_align aligns to 32 elements, so it is the supremum of every dtype 32B-aligned row width; cube_ub_stage_size keeps cube-dtype element semantics - new cube_m_stage_size (max stage rows); after the solver picks STAGE_SIZE_NAME it is overwritten with STAGE_SIZE_NAME / basen_align, so rows * any-dtype-row-width never exceeds the solver per-dtype element budget - serialize the new field for const/dynamic/DB paths **Kernel init** - stage_size unified to element count (solver budget a0a1t, falling back to cube fragment capacity for tiny stages) - stage_size_type (rows) comes from cube_m_stage_size on all four flows: inductor const (kConstTilingData), inductor dynamic (params), non-inductor static (kConstTilingData baked by ascbc) and non-inductor dynamic (params.cv_tiling_data) - TensorSizeAssign emits local_size = stage_size for every UB tensor, so each dtype byte size equals its solver budget exactly - buf_cube sized by the pure C-fragment capacity - conv2d stage_size switched to element count as well **Reg APIs** - CvApi2DParams gains valid_size / output_compute_size / input_compute_size - Cast/Floor/Round/Trunc/Compare use the 2D form with logical {curAivM, curAivN} dims plus per-dtype physical row strides under CV UBFuse - WhereRegApiCall::GenerateNoLoopCase emits the 2D WhereExtend form with an independent mask stride, fixing bool-mask rows (e.g. align(N,32) != float row width) that previously went through a flat 1D call ## Verification (torch.compile, forced CV fusion, Ascend950PR): - tensor/broadcast/scalar compares, where (bool mask from GM, int8, int64, two float branches, compare->where), cast (fp16/int32), floor/round/trunc, add/mul/sub/div, max/min, unary and chained cases all match eager bit-exactly - previously failing N=400/600 and crashing N=664 now pass - inductor dynamic shape (params path) verified with multiple shapes - non-inductor flows covered by code-path audit (ascbc bakes kConstTilingData, dynamic reads params.cv_tiling_data) - UT expectations updated for the new stage_size element semantics ## TF non-inductor static-flow fixes (follow-up commit 5a48b96e) The rework broke TF static-shape kernel compilation (and exposed two latent misalignments): - **codegen_kernel.cpp**: non-inductor static Init referenced params.cv_tiling_data->cube_m_stage_size, but TF/GE online-compiled static graphs have neither INDUCTOR_CONST_TILING_DATA nor the cv_tiling_data Params member (is_dynamic=false), failing with no member named 'cv_tiling_data' in 'AutoFusionVector::Params'. Now reads the baked solver budget (AutofuseTilingData::STAGE_SIZE_NAME) and derives stage rows as stage_size_name / basen_align (conv2d-branch pattern). - **asc_codegen_compile.py**: host tiling still used ub_align_value = 32 / cube_output_type_size; aligned to 32 elements to match the kernel-side supremum row width. TF E2E (GE AutoFuse, --autofuse_enable_pass=matmul, Ascend950PR): matmul+abs now compiles and runs; 128x128x128 completes with results within half-cast precision. Note: 28-block (large-shape) MIX launches still deadlock in the GE/fftsplus dispatch (block group 13 never scheduled) — tracked separately, not addressed by this PR. ## TF non-inductor static-flow fixes (follow-up commit 5a48b96e) - **codegen_kernel.cpp**: non-inductor static Init referenced params.cv_tiling_data->cube_m_stage_size, but TF/GE online-compiled static graphs have neither INDUCTOR_CONST_TILING_DATA nor the cv_tiling_data Params member (is_dynamic=false), failing with "no member named 'cv_tiling_data' in 'AutoFusionVector::Params'". Now reads the baked solver budget (AutofuseTilingData::STAGE_SIZE_NAME) and derives stage rows as stage_size_name / basen_align (conv2d-branch pattern). - **asc_codegen_compile.py**: host tiling still used ub_align_value = 32 / cube_output_type_size; aligned to 32 elements to match the kernel-side supremum row width. TF E2E (GE AutoFuse, --autofuse_enable_pass=matmul, Ascend950PR): matmul+abs now compiles and runs; 128x128x128 completes within half-cast precision. Note: 28-block (large-shape) MIX launches still deadlock in the GE/fftsplus dispatch (block group 13 never scheduled) - tracked separately, not addressed by this PR. See merge request: cann/graph-autofusion!2177 | 7 小时前 | |
style: 统一 Autofuse 代码格式 Co-authored-by: Ling-DT<lingxing@huawei.com> # message auto-generated for no-merge-commit merge: !921 merge style/clang-format-autofuse-20260611 into develop style: 统一 Autofuse 代码格式 Created-by: ling-DT Commit-by: Ling-DT Merged-by: cann-robot Description: # Pull Request ## 描述 基于 cann/graph-autofusion:develop 最新提交 46a23b0,使用仓库根目录 .clang-format 对 autofuse/ 目录内受版本管理的 C/C++/AscendC 源文件执行统一格式化。 本 PR 仅包含 autofuse/ 目录格式化变更;super_kernel/ 目录格式化变更按要求暂留本地,未提交到本 PR。 格式化工具:clang-format 18.1.8,参数:--style=file。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [ ] ✨ 新功能 - [x] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue 无。 ## 如何测试 描述测试此变更的步骤和前提条件: 1. /tmp/opencode/clang-format-18-venv/bin/clang-format -i --style=file <autofuse C/C++/AscendC files> 2. git diff --cached --check 3. git diff --name-only HEAD~1..HEAD | cut -d/ -f1 | sort | uniq -c 确认 PR 提交仅包含 autofuse/。 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 本 PR 为纯格式化变更,不涉及功能逻辑、接口、构建脚本或打包内容修改。 See merge request: cann/graph-autofusion!921 | 2 个月前 | |
add ascir adapter for ascend api Co-authored-by: w00800187<wangmingming39@huawei.com> # message auto-generated for no-merge-commit merge: !1276 merge wmm_dev_ascir_final into develop feat:add ascir adapter for ascend api Created-by: gcw_WTfSfUy7 Commit-by: w00800187 Merged-by: cann-robot Description: # Pull Request ## 描述 新增 ASCIR adapter 相关能力,补齐一批特殊数学函数和特殊调用形态的 ASCIR V2 适配。变更覆盖 ASCIR 注册、ATT/性能模型、Codegen、AscendC regbase、Python 暴露、编译参数透传以及 UT/ST/backend E2E。 核心新增/适配算子包括 BesselJ0/BesselJ1/BesselY0/BesselY1、ScaledModifiedBesselK0/ScaledModifiedBesselK1、SphericalBesselJ0、Ndtr/Ndtri、SignBit、Frexp、Igamma/Igammac、Zeta、ShiftedChebyshevPolynomialT/U/V/W。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [x] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [x] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue 关联 issue:#180 Issue 链接:https://gitcode.com/cann/graph-autofusion/issues/180 ## 如何测试 描述测试此变更的步骤和前提条件: 1. 运行 ASCIR/regbase/codegen 相关 UT,覆盖新增算子注册、regbase API 和特殊 ApiCall。 2. 运行 backend E2E V2 相关 ST,覆盖 Data → Load → Op → Store → Output 的完整生成与执行链路。 3. Baize用例验证 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如: feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 本 PR 同步更新 issue #180 的需求说明,包含 PR 增量内容总结和设计方案。 See merge request: cann/graph-autofusion!1276 | 2 个月前 | |
add ascir adapter for ascend api Co-authored-by: w00800187<wangmingming39@huawei.com> # message auto-generated for no-merge-commit merge: !1276 merge wmm_dev_ascir_final into develop feat:add ascir adapter for ascend api Created-by: gcw_WTfSfUy7 Commit-by: w00800187 Merged-by: cann-robot Description: # Pull Request ## 描述 新增 ASCIR adapter 相关能力,补齐一批特殊数学函数和特殊调用形态的 ASCIR V2 适配。变更覆盖 ASCIR 注册、ATT/性能模型、Codegen、AscendC regbase、Python 暴露、编译参数透传以及 UT/ST/backend E2E。 核心新增/适配算子包括 BesselJ0/BesselJ1/BesselY0/BesselY1、ScaledModifiedBesselK0/ScaledModifiedBesselK1、SphericalBesselJ0、Ndtr/Ndtri、SignBit、Frexp、Igamma/Igammac、Zeta、ShiftedChebyshevPolynomialT/U/V/W。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [x] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [x] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue 关联 issue:#180 Issue 链接:https://gitcode.com/cann/graph-autofusion/issues/180 ## 如何测试 描述测试此变更的步骤和前提条件: 1. 运行 ASCIR/regbase/codegen 相关 UT,覆盖新增算子注册、regbase API 和特殊 ApiCall。 2. 运行 backend E2E V2 相关 ST,覆盖 Data → Load → Op → Store → Output 的完整生成与执行链路。 3. Baize用例验证 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如: feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 本 PR 同步更新 issue #180 的需求说明,包含 PR 增量内容总结和设计方案。 See merge request: cann/graph-autofusion!1276 | 2 个月前 | |
【feat】: 新增ascir:Rand/Randn Co-authored-by: 李玥玮<liyuewei1@huawei.com> # message auto-generated for no-merge-commit merge: !1749 merge 0_local into develop 【feat】: 新增ascir:Rand/Randn Created-by: liyuewei Commit-by: 李玥玮 Merged-by: cann-robot Description: # Pull Request ## 描述 主要改动 新增 Rand/Randn 算子常量与注册: 在 att_const_values.h 中新增 kRand、kRandn 常量,并在 pyascir.h 的算子宏列表中加入 OP(Rand)、OP(Randn),使两个算子进入统一的算子枚举体系。 新增算子实现与类型约束: 在 ascir_builtin_ops_v2.cpp 中注册 Rand(支持 DT_FLOAT)与 Randn(支持 DT_UINT32、DT_INT32),同时在 v2_ascir_att_impl.h 中定义对应的 Att 实现类。 新增 Codegen 与性能注册实现: 在 v2_ascir_codegen_impl.h 中新增 RandAscIrCodegenImplV2、RandnAscIrCodegenImplV2(二者 API 名均为 Rand,加载 random_reg_base.h),并在 ascir_api_perf_v2.cpp 中以 kUnitVector 为单位注册性能信息。 新增 Python 前端接口: 在 ascir_api.py 中新增 Rand、Randn 函数,负责创建对应算子、设置 dtype、axis、size、stride 并返回输出节点。 新增底层随机数封装与测试: 新增 random.h,封装 AscendC::PhiloxRandom<10> 并以固定 philoxKey/philoxCounter 实现 Rand;同时注册 random_reg_base.h 字符串,并新增 test_codegen_rand_reg_api_call.cpp 覆盖 Rand/Randn 的 API 名称、头文件加载及 dtype 支持。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [x] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> ## 如何测试 描述测试此变更的步骤和前提条件: NA ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如: feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 在此添加任何其他关于本次 PR 的说明。 See merge request: cann/graph-autofusion!1749 | 1 个月前 | |
【feat】: 新增ascir:Rand/Randn Co-authored-by: 李玥玮<liyuewei1@huawei.com> # message auto-generated for no-merge-commit merge: !1749 merge 0_local into develop 【feat】: 新增ascir:Rand/Randn Created-by: liyuewei Commit-by: 李玥玮 Merged-by: cann-robot Description: # Pull Request ## 描述 主要改动 新增 Rand/Randn 算子常量与注册: 在 att_const_values.h 中新增 kRand、kRandn 常量,并在 pyascir.h 的算子宏列表中加入 OP(Rand)、OP(Randn),使两个算子进入统一的算子枚举体系。 新增算子实现与类型约束: 在 ascir_builtin_ops_v2.cpp 中注册 Rand(支持 DT_FLOAT)与 Randn(支持 DT_UINT32、DT_INT32),同时在 v2_ascir_att_impl.h 中定义对应的 Att 实现类。 新增 Codegen 与性能注册实现: 在 v2_ascir_codegen_impl.h 中新增 RandAscIrCodegenImplV2、RandnAscIrCodegenImplV2(二者 API 名均为 Rand,加载 random_reg_base.h),并在 ascir_api_perf_v2.cpp 中以 kUnitVector 为单位注册性能信息。 新增 Python 前端接口: 在 ascir_api.py 中新增 Rand、Randn 函数,负责创建对应算子、设置 dtype、axis、size、stride 并返回输出节点。 新增底层随机数封装与测试: 新增 random.h,封装 AscendC::PhiloxRandom<10> 并以固定 philoxKey/philoxCounter 实现 Rand;同时注册 random_reg_base.h 字符串,并新增 test_codegen_rand_reg_api_call.cpp 覆盖 Rand/Randn 的 API 名称、头文件加载及 dtype 支持。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [x] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> ## 如何测试 描述测试此变更的步骤和前提条件: NA ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如: feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 在此添加任何其他关于本次 PR 的说明。 See merge request: cann/graph-autofusion!1749 | 1 个月前 | |
add ascir adapter for ascend api Co-authored-by: w00800187<wangmingming39@huawei.com> # message auto-generated for no-merge-commit merge: !1276 merge wmm_dev_ascir_final into develop feat:add ascir adapter for ascend api Created-by: gcw_WTfSfUy7 Commit-by: w00800187 Merged-by: cann-robot Description: # Pull Request ## 描述 新增 ASCIR adapter 相关能力,补齐一批特殊数学函数和特殊调用形态的 ASCIR V2 适配。变更覆盖 ASCIR 注册、ATT/性能模型、Codegen、AscendC regbase、Python 暴露、编译参数透传以及 UT/ST/backend E2E。 核心新增/适配算子包括 BesselJ0/BesselJ1/BesselY0/BesselY1、ScaledModifiedBesselK0/ScaledModifiedBesselK1、SphericalBesselJ0、Ndtr/Ndtri、SignBit、Frexp、Igamma/Igammac、Zeta、ShiftedChebyshevPolynomialT/U/V/W。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [x] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [x] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue 关联 issue:#180 Issue 链接:https://gitcode.com/cann/graph-autofusion/issues/180 ## 如何测试 描述测试此变更的步骤和前提条件: 1. 运行 ASCIR/regbase/codegen 相关 UT,覆盖新增算子注册、regbase API 和特殊 ApiCall。 2. 运行 backend E2E V2 相关 ST,覆盖 Data → Load → Op → Store → Output 的完整生成与执行链路。 3. Baize用例验证 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如: feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 本 PR 同步更新 issue #180 的需求说明,包含 PR 增量内容总结和设计方案。 See merge request: cann/graph-autofusion!1276 | 2 个月前 | |
add ascir adapter for ascend api Co-authored-by: w00800187<wangmingming39@huawei.com> # message auto-generated for no-merge-commit merge: !1276 merge wmm_dev_ascir_final into develop feat:add ascir adapter for ascend api Created-by: gcw_WTfSfUy7 Commit-by: w00800187 Merged-by: cann-robot Description: # Pull Request ## 描述 新增 ASCIR adapter 相关能力,补齐一批特殊数学函数和特殊调用形态的 ASCIR V2 适配。变更覆盖 ASCIR 注册、ATT/性能模型、Codegen、AscendC regbase、Python 暴露、编译参数透传以及 UT/ST/backend E2E。 核心新增/适配算子包括 BesselJ0/BesselJ1/BesselY0/BesselY1、ScaledModifiedBesselK0/ScaledModifiedBesselK1、SphericalBesselJ0、Ndtr/Ndtri、SignBit、Frexp、Igamma/Igammac、Zeta、ShiftedChebyshevPolynomialT/U/V/W。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [x] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [x] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue 关联 issue:#180 Issue 链接:https://gitcode.com/cann/graph-autofusion/issues/180 ## 如何测试 描述测试此变更的步骤和前提条件: 1. 运行 ASCIR/regbase/codegen 相关 UT,覆盖新增算子注册、regbase API 和特殊 ApiCall。 2. 运行 backend E2E V2 相关 ST,覆盖 Data → Load → Op → Store → Output 的完整生成与执行链路。 3. Baize用例验证 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如: feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 本 PR 同步更新 issue #180 的需求说明,包含 PR 增量内容总结和设计方案。 See merge request: cann/graph-autofusion!1276 | 2 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 10 天前 | ||
| 10 天前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 7 小时前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 7 小时前 | ||
| 2 个月前 | ||
| 23 天前 | ||
| 2 个月前 | ||
| 7 小时前 | ||
| 2 个月前 | ||
| 7 小时前 | ||
| 7 小时前 | ||
| 6 天前 | ||
| 2 个月前 | ||
| 23 天前 | ||
| 2 个月前 | ||
| 5 小时前 | ||
| 5 小时前 | ||
| 13 天前 | ||
| 2 个月前 | ||
| 13 天前 | ||
| 2 个月前 | ||
| 4 天前 | ||
| 2 个月前 | ||
| 13 天前 | ||
| 2 个月前 | ||
| 4 天前 | ||
| 2 个月前 | ||
| 7 小时前 | ||
| 1 个月前 | ||
| 7 小时前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 4 天前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 7 小时前 | ||
| 2 个月前 | ||
| 7 小时前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 2 个月前 | ||
| 2 个月前 |