| Files | Last commit | Last update |
|---|---|---|
fix(all): Fix spelling errors in source comments and diagnostic messages Co-authored-by: wangmingjun<wangmingjun13@huawei.com> # message auto-generated for no-merge-commit merge: !5392 merge fix/spelling-errors-2908 into master fix(all): Fix spelling errors in source comments and diagnostic messages Created-by: hwwangmingjun Commit-by: wangmingjun Merged-by: cann-robot Description: fix(all): Fix spelling errors in source comments and diagnostic messages 修复源码注释、错误信息和调试日志中多处英文拼写错误,避免阅读诊断输出时产生误解。 Changes: - device_error_code.h:defalut -> default - codegen_vector.cpp:occured/unsupport -> occurred/unsupported - operation_impl.cpp:interger -> integer - device_task_context.cpp:Inital -> Initial - directed_graph_util.h:lenght -> length - tune_sync_for_vf.cpp:falied -> failed(4 处) - graph_utils.h / expand_function.cpp:seperate -> separate - cube_process.cpp:invlid -> invalid - pil2ir.py:funtion -> function - test_dynamic_mm.cpp:intput -> input(4 处) Related Issues: #2908 See merge request: cann/pypto!5392 | 3 months ago | |
feat(pypto-pro): Introduce PGOVFRunOnProgram pass Co-authored-by: poorwill<wangbing110@huawei.com> # message auto-generated for no-merge-commit merge: !7474 merge master into master feat(pypto-pro): Introduce PGOVFRunOnProgram pass Created-by: wangbing110 Commit-by: poorwill Merged-by: cann-robot Description: feat(pypto-pro): Introduce PGOVFRunOnProgram pass See merge request: cann/pypto!7474 | 18 days ago | |
fix(pass): Fix validation of producer-side data transfer view/slice nodes Co-authored-by: HWGG88<yanghongwei33@huawei.com> # message auto-generated for no-merge-commit merge: !7301 merge fix-producer-side-view-postcheck into master fix(pass): Fix validation of producer-side data transfer view/slice nodes Created-by: HWGG88 Commit-by: HWGG88 Merged-by: cann-robot Description: - 添加辅助函数识别生产者侧切片搬运操作 - 调整子图结束节点检查,允许合法的生产者侧搬运视图 - 保持对普通视图、未知路径及消费者侧搬运的边界约束 - 新增回归测试覆盖 token 依赖、按核拆分及原始内存类型判断 - 验证 VIEW/SLICE 在不同 NPU 架构下的后置检查与搬运指令转换一致性 See merge request: cann/pypto!7301 | 26 days ago | |
feat(ir): merge redundant producer results in token cleanup Co-authored-by: zhaojunhan<zhaojunhan1@huawei.com> # message auto-generated for no-merge-commit merge: !6115 merge merge_danglin into master feat(ir): merge redundant producer results in token cleanup Created-by: zhaojunhan Commit-by: zhaojunhan Merged-by: cann-robot Description: ## 背景 开启 AssembleNewLogicalTensor 后,ASSEMBLE 会产生新的 LogicalTensor version。部分后续构图场景中,ATOMIC_RMW 也可能产生同一 RawTensor 的多个结果版本。 当较早版本没有数据消费者,而后续兼容版本仍被使用时,保留多个结果 tensor 会造成冗余的 LogicalTensor 版本和数据依赖。 ## 修改内容 - 在 RemoveRedundantTokenPass 中新增 dangling producer result 合并逻辑。 - 在同一 SeqStmts 内,按 RawTensor 对单输出 TensorOp 结果分组。 - 将无数据消费者的较早结果,合并到后方第一个有数据消费者且 LogicalTensor 描述兼容的结果。 - 支持普通 TensorOp、ASSEMBLE 及 ATOMIC_RMW 输出结果的合并。 - 仅向后合并,不跨 If、For、While 的 SeqStmts 边界,避免引入反向依赖。 - 合并阶段不以写区或 token 作为门槛,也不主动删除 token;后续冗余 token 删除与未使用 token 清理继续负责 token 优化。 - 新增 atomic 多版本结果合并 UT,并更新重叠写场景的预期。 See merge request: cann/pypto!6115 | 2 months ago | |
style(all): Apply additional clang-format corrections across codebase Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4883 merge style-cpp into master style(all): Apply additional clang-format corrections across codebase Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Apply additional clang-format corrections across codebase See merge request: cann/pypto!4883 | 4 months ago | |
feat(ir): merge redundant producer results in token cleanup Co-authored-by: zhaojunhan<zhaojunhan1@huawei.com> # message auto-generated for no-merge-commit merge: !6115 merge merge_danglin into master feat(ir): merge redundant producer results in token cleanup Created-by: zhaojunhan Commit-by: zhaojunhan Merged-by: cann-robot Description: ## 背景 开启 AssembleNewLogicalTensor 后,ASSEMBLE 会产生新的 LogicalTensor version。部分后续构图场景中,ATOMIC_RMW 也可能产生同一 RawTensor 的多个结果版本。 当较早版本没有数据消费者,而后续兼容版本仍被使用时,保留多个结果 tensor 会造成冗余的 LogicalTensor 版本和数据依赖。 ## 修改内容 - 在 RemoveRedundantTokenPass 中新增 dangling producer result 合并逻辑。 - 在同一 SeqStmts 内,按 RawTensor 对单输出 TensorOp 结果分组。 - 将无数据消费者的较早结果,合并到后方第一个有数据消费者且 LogicalTensor 描述兼容的结果。 - 支持普通 TensorOp、ASSEMBLE 及 ATOMIC_RMW 输出结果的合并。 - 仅向后合并,不跨 If、For、While 的 SeqStmts 边界,避免引入反向依赖。 - 合并阶段不以写区或 token 作为门槛,也不主动删除 token;后续冗余 token 删除与未使用 token 清理继续负责 token 优化。 - 新增 atomic 多版本结果合并 UT,并更新重叠写场景的预期。 See merge request: cann/pypto!6115 | 2 months ago | |
perf(pass): Reduce AssignMemoryType graph scans and preserve DDR outputs Co-authored-by: zhaosenqiu<zhaosenqiu@huawei.com> # message auto-generated for no-merge-commit merge: !7452 merge amt-perf into master perf(pass): Reduce AssignMemoryType graph scans and preserve DDR outputs Created-by: zhaosenqiu Commit-by: zhaosenqiu Merged-by: cann-robot Description: perf(pass): Reduce AssignMemoryType graph scans and preserve DDR outputs AssignMemoryType repeatedly scanned the tile graph to find assemble siblings, writable reshapes, and newly inserted conversion ops. In slice mode, a function output can also have downstream consumers, so an upgrade intended for intermediate tensors could move an outcast boundary from DDR to UB or L1. Changes: - Build a per-function index keyed by physical raw magic for assemble propagation. Group writable reshapes by input logical magic and preserve their original update order. - Record conversion ops as they are inserted. The shared shape inference utility selects targets in topological order without building a graph-wide position map or sorting the targets again. - Preserve DDR boundaries during slice-mode path upgrades for outcasts and other logical tensors with the same effective raw magic, including actualRawmagic aliases. This matches Function::IsFromOutCast. RunOnFunction initializes the index; inference warns and continues if called before initialization. - Cover the contract-to-slice outcast, outcasts at the first reshape and view outputs, and same-raw siblings and aliases. Update the machine regression graph to keep its read and writes across subgraphs and verify that call-list order R2,W3,W4 becomes dependency order W4,W3,R2 in the use list. Validation: - pre-commit run --all-files passed. - bash tools/scripts/pre_commit_check.sh passed all 3,501 selected C++ UTs (passes and machine, CANN 9.2 with the default configuration). --- ### 中文描述 AssignMemoryType 原先会多次扫描 Tile 图,查找 assemble 的同 raw 张量、可写 reshape 和新插入的转换算子。slice 模式下,函数输出也可能被图内的下游算子消费,导致原本针对中间张量的升级逻辑把 outcast 的 DDR 边界改成 UB 或 L1。 变更: - 为 assemble 传播建立按物理 raw magic 查询的函数级索引;按输入的逻辑 magic 对可写 reshape 分组,并保留原有更新顺序。 - 在插入转换算子时直接记录它们。公共形状推导工具按拓扑序选出目标算子,省去全图位置表和对目标算子的二次排序。 - slice 模式的升级护栏保护 outcast 及有效 raw magic 相同的逻辑张量,包括 actualRawmagic 别名,判定口径与 Function::IsFromOutCast 一致。索引由 RunOnFunction 初始化;如果提前调用推理,只记录 warning 并继续执行。 - 补充 contract 到 slice 路径、第一层 reshape 和 view 输出上的 outcast,以及同 raw 张量和别名的测试。调整 machine 回归用例的输入图,确保读写发生在不同子图中,并验证 use list 将 call list 的 R2,W3,W4 按依赖顺序记录为 W4,W3,R2。 验证: - pre-commit run --all-files 通过。 - bash tools/scripts/pre_commit_check.sh 通过:使用 CANN 9.2 和默认配置,passes 和 machine 模块选中的 3501 个 C++ UT 全部通过。 Related Issues: #3517 See merge request: cann/pypto!7452 | 18 days ago | |
fix(pass): Fix log messages and coverage Co-authored-by: xujiayi1999<xujiayi28@huawei.com> # message auto-generated for no-merge-commit merge: !5807 merge fix-log-rectification into master fix(pass): Fix log messages and coverage Created-by: xujiayi1999 Commit-by: xujiayi1999 Merged-by: cann-robot Description: ### 变更概述 整改 Pass 模块日志中的拼写、语法及文案错误,提升日志准确性和可读性。 ### 主要变更 - 修正 candidate、partial、latest、Tarjan 等拼写错误。 - 修正日志中的语法错误及大小写错误。 - 修正输入/输出 datatype 日志描述。 - 修正 merge_src_dst_buffer 中日志参数传递错误。 - 补充 datatype 不匹配场景 UT,覆盖相关分支。 - 未调整表格中标记为“级别错配”的日志级别,保持本次修改范围聚焦于拼写和语法整改。 See merge request: cann/pypto!5807 | 2 months ago | |
fix(pass): Also drop write-only dangling tokens before ExpandFunction Co-authored-by: Immutable01<gaoqiancheng@huawei.com> # message auto-generated for no-merge-commit merge: !7149 merge 1026_token into master fix(pass): Also drop write-only dangling tokens before ExpandFunction Created-by: Immutable01 Commit-by: Immutable01 Merged-by: cann-robot Description: 在expandfunction前删除没有生产者也没有消费者的悬空token See merge request: cann/pypto!7149 | 29 days ago | |
perf(reduce_copy): Allow two-stage N:M merge via direct path and bounded serial loss Co-authored-by: bytecode<dubingjia1@huawei.com> # message auto-generated for no-merge-commit merge: !7429 merge perf/reduce-copy-nm-two-stage into master perf(reduce_copy): Allow two-stage N:M merge via direct path and bounded serial loss Created-by: bytecode Commit-by: bytecode Merged-by: cann-robot Description: #3793 ## 问题 CheckMergeBenefitByStructuralPattern 对 N:M 结构一票否决(tensor 层双侧多 root 直接 return false、root 层 N:1+1:N 共存直接 return false),具备 UB2L1/L0C2UB 特殊通路资格的完整两阶段候选被拒绝,跨子图数据仍走 DDR 往返。 ## 修复 - CheckMergeBenefitByStructuralPattern:tensor 层 N:M 不再立即拒绝,改为建全量 root 级方向边,延迟到 root 层整体评估 - CheckTwoStageNmBenefit(新增):整体 N:M 时组内须为严格两层完全二部结构(双侧各 >=2 root、无中间/孤立 root、每个 prod->cons 均有调度依赖且带 root 对级直连证据,缺一即拒),两侧并行损失 sum−max <= 8 x 对侧 max(系数沿用 kSerialLossRatio)时放行 - hinge 护栏循环:仅当 hinge 端点及其全部分支都属于两阶段结构时豁免该条目,组外 hinge 与混入结构外分支的条目仍走原有 kHingeBranchThreshold + 串行损失护栏 ## 涉及文件 - reduce_copy.cpp:新增 CheckTwoStageNmBenefit 两阶段收益评估(直连证据 root 对绑定 + hinge 逐条豁免),N:M 拒绝路径改为直连门+损失约束放行 - reduce_copy.h:新增 CheckTwoStageNmBenefit 声明 - test_reduce_copy.cpp:新增 6 个 TwoStageNm 用例(放行正路径 / 缺调度依赖 / 单侧超预算 / 部分直连拒绝 / 结构内 hinge 豁免 / 组外扇出拦截),全量 ReduceCopyTest 85/85 通过 See merge request: cann/pypto!7429 | 18 days ago | |
feat(Pass): Add pgo pass framework Co-authored-by: yinjie27_<yinjie27@huawei.com> # message auto-generated for no-merge-commit merge: !7403 merge pgo-vf-init-origin into master feat(Pass): Add pgo pass framework Created-by: yinjie27_ Commit-by: yinjie27_ Merged-by: cann-robot Description: feat(Pass): Add pgo pass framework See merge request: cann/pypto!7403 | 24 days ago |
| Files | Last commit | Last update |
|---|---|---|
| 3 months ago | ||
| 18 days ago | ||
| 26 days ago | ||
| 2 months ago | ||
| 4 months ago | ||
| 2 months ago | ||
| 18 days ago | ||
| 2 months ago | ||
| 29 days ago | ||
| 18 days ago | ||
| 24 days ago |