| fix(machine): fix mismatch and incomplete error descriptions in machine and misc files Co-authored-by: chai-hw<chaizhengtong@huawei.com> # message auto-generated for no-merge-commit merge: !5806 merge pyptolog_fix3 into master fix(machine): fix mismatch and incomplete error descriptions in machine and misc files Created-by: chai-hw Commit-by: chai-hw Merged-by: cann-robot Description: machine 日志内容整改 See merge request: cann/pypto!5806 | 2 months ago |
| feat(vector): Migrate vector operation guards to Python Co-authored-by: bynshard<zhangbingshuai@huawei.com> # message auto-generated for no-merge-commit merge: !5560 merge st-cpp2python into master feat(vector): Migrate vector operation guards to Python Created-by: bynshard Commit-by: bynshard Merged-by: cann-robot Description: 将 vector 算子的 st 测试迁移到的python 侧的,用于 ci流水整改 Related Issue: #3146 ``` 更多描述信息见:[Commit Message 规范](../docs/zh/contribute/pull-request.md#commit-message) See merge request: cann/pypto!5560 | 2 months ago |
| fix(pass): Exclude graph-merge attrs from COE hash to fix conv compile error Co-authored-by: Catherie<mayuan33@huawei.com> # message auto-generated for no-merge-commit merge: !5793 merge fix/coe-hash-exclude-merge-attrs into master fix(pass): Exclude graph-merge attrs from COE hash to fix conv compile error Created-by: Catherie Commit-by: Catherie Merged-by: cann-robot Description: ## 问题现象 Conv 算子(conv1d_dynamic_kernel,A5/DAV_3510 平台)编译报错: ErrCode: FC6202! ConvExpandFuncError::EXPANDFUNC_TENSOR_ATTR_GET_FAILED: L1CopyInConv op should have CopyOpAttribute(op_infer_shape_impl.cpp:1120)。 ## 根因分析 1. L1CopyInReuseMerge 等合图 pass 在合并前会为每个子图的所有 op 标注合图组属性:l1_reuse_hashOrder/cube_merge_hashOrder/vec_merge_hashOrder 及对应 subgraphCount,值为 func<magic>_<order>。 2. L1 复用按 GM 输入特征(而非同构组)合并子图,合并后同一子图内会出现两个语义完全相同的 TRANS_FORMAT_L1 生产者,仅合图标注属性不同。 3. COE(CommonOperationEliminateUtils)计算生产者组 hash 时通过 op->DumpAttr() 把全部属性计入 hash,导致这两个等价生产者组 hash 不一致、无法去重。 4. 残留的重复 TRANS_FORMAT_L1 使 GenerateMoveOp::CollapseTransFormatL1Consumer 因 consumer 数 != 1 而放弃合并,L1_COPY_IN_CONV 未被设置 CopyOpAttribute,InferShape 断言失败。 ## 修复方案 - 新增 CommonOperationEliminateUtils::DumpAttr(const Operation&):序列化 op 属性时排除 6 个合图标注属性(l1Reuse/cubeMerge/vecMerge 的 hashOrder + subgraphCount),hash 计算不再受合图簿记标注影响。 - 这些属性是合图 pass 的合并组簿记信息(用于按组配置寻址与泳道图 profiling),不参与计算语义,等价生产者组排除后可正确去重;被保留的 op 仍携带一份该属性,不影响上述用途。 - reduce_copy_pre_subgraph_id 等语义敏感属性仍参与 hash(有既有 UT 约束)。 ## 验证 - 新增回归 UT CommonOperationEliminateTest.EliminateDupOpsWithDifferentGraphMergeHashOrder:两个等价 ABS 生产者仅合图标注不同,修复后正确去重(op 数 3→2)。 - 全量相关 UT 通过:CommonOperationEliminateTest 20、L1CopyInReuseTest、NBufferMergeTest、ReduceCopyTest、GenerateMoveOpPassTest 等共 125 个用例全部 PASS。 - 端到端验证:Conv_L0_basic 用例(xrunfk.py -s=11 -e=11)修复前 ERROR(上述断言),修复后 PASS,双/三精度比对均达标(mare 0.00037)。 See merge request: cann/pypto!5793 | 2 months ago |
| refactor(all): Remove trailing whitespace Co-authored-by: tsungl4<lidongsheng4@huawei.com> # message auto-generated for no-merge-commit merge: !2188 merge pre-commit into master refactor(all): Remove trailing whitespace Created-by: tsungl4 Commit-by: tsungl4 Merged-by: cann-robot Description: Introduce pre-commit tools, and remove trailing white space with default plugin Related Issue: #1017 See merge request: cann/pypto!2188 | 7 months ago |
| feat(utest): Optimize the time consumption during the compilation phase Co-authored-by: DCGDDD<yangxu14@huawei.com> # message auto-generated for no-merge-commit merge: !232 merge master into master feat(utest): Optimize the time consumption during the compilation phase Created-by: DCGDDD Commit-by: DCGDDD Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> feat(utest): Optimize the time consumption during the compilation phase ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> [ISSUE 68](https://gitcode.com/cann/pypto/issues/68) ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/pypto!232 | 10 months ago |
| fix(simulation): Remove simulation_ca module Co-authored-by: zhengronggui<zhengronggui@huawei.com> # message auto-generated for no-merge-commit merge: !2717 merge master into master fix(simulation): Remove simulation_ca module Created-by: zhengronggui Commit-by: zhengronggui Merged-by: cann-robot Description: 移除仿真中simulation_ca模块 See merge request: cann/pypto!2717 | 7 months ago |
| fix(docs): Precision tools do not have a recompilation scenario Co-authored-by: lyz0328<liyanzhen@huawei.com> # message auto-generated for no-merge-commit merge: !4153 merge master into master fix(docs): Precision tools do not have a recompilation scenario Created-by: lyz0328 Commit-by: lyz0328 Merged-by: cann-robot Description: 1、仓库文档国际化,新增英文readme文件,skill和docs暂不翻译 2、精度工具文档陈旧内容修改:1)删除精度工具重编译步骤 2)更新msaccucmp.py执行命令,明确执行路径、不带版本信息,便于用户在不同版本通用执行 3、webide安装方式的安装界面截图变更 Related Issue: #2345 See merge request: cann/pypto!4153 | 5 months ago |
| feat(pass): Add slice contract feature for pass with some cases Co-authored-by: 2501_92924845<niulinkai@huawei.com> # message auto-generated for no-merge-commit merge: !5568 merge slice5close into master feat(pass): Add slice contract feature for pass with some cases Created-by: 2501_92924845 Commit-by: 2501_92924845 Merged-by: cann-robot Description: PR描述 1.背景 历史实现中,OP_VIEW 和 OP_ASSEMBLE 同时承担两类语义: 视图转换语义:描述 tensor 的 shape、offset、dyn offset、dyn valid shape 等逻辑视图关系。 搬运语义:在 tile graph 后段被 GenerateMoveOp 转换为 copy in / copy out 等真实搬运操作。 本需求将这两类语义拆开: OP_VIEW / OP_ASSEMBLE:保留为视图语义,表达逻辑视图关系。 OP_SLICE / OP_CONTRACT:表达搬运语义,分别对应原 copy in 方向和 copy out 方向的 tile 级搬运描述。 在 ExpandFunction 阶段,原先需要展开的 VIEW/ASSEMBLE 会被展开为 tile 级的 SLICE/CONTRACT。后续 tile graph pass 不能再默认 VIEW/ASSEMBLE 一定会生成真实搬运,而需要按新语义区分: 优化、合并、图结构分析类 pass 需要识别 view-like 和 assemble-like 两组 opcode。 内存推导和 move 生成类 pass 应以 SLICE/CONTRACT 作为真实搬运入口。 本设计覆盖 PVC2_OOO 策略中从 MergeViewAssemble 到 GenerateMoveOp 的相关 pass。 2.. 目标与非目标 2.1 目标 支持 ExpandFunction 后图中出现 OP_SLICE/OP_CONTRACT,并保证后续 pass 能正确识别、合并、拆分、分区和生成 move op。 将原来依赖 OP_VIEW/OP_ASSEMBLE 的搬运逻辑迁移到 OP_SLICE/OP_CONTRACT。 保留 OP_VIEW/OP_ASSEMBLE 的视图表达能力,避免把纯视图语义误转成 copy。 保持现有 offset、dyn offset、dyn valid shape、scope、atomic RMW 属性等关键信息在 pass 改写中正确传递。 兼容原有 pass 中 view/assemble 链路优化能力,使其覆盖 slice/contract 场景。 2.2 非目标 不改变用户侧 API 的 view/assemble 表达方式。 不改变 copy op 的最终执行语义。 不在 GenerateMoveOp 中继续把普通 OP_VIEW/OP_ASSEMBLE 当作搬运入口。 不引入新的 attribute 类型;OP_SLICE 复用 ViewOpAttribute,OP_CONTRACT 复用 AssembleOpAttribute。 2.3 相关验证 MergeViewAssemble UT:覆盖 view-view、slice-view、view-slice、assemble-contract 等链路合并,验证合并后 opcode 和 attribute 正确。 SplitReshape UT:覆盖 contract -> reshape -> slice、reduce_acc 前驱跳过、动态 shape 变轴跳过。 SplitLargeFanoutTensor UT:覆盖大 fanout 中 assemble-like producer 和 view-like consumer 的拆分、offset 更新和冗余删除。 AssignMemoryType UT:覆盖 slice/contract 的 original、requirement、convert 改写、LiteNPU reshape 特殊路径。 RemoveRedundantOp UT:覆盖 view/assemble-like perfect match、partial match、multi-contract-single-slice、single-contract-multi-slice。 ProcessAtomic UT:覆盖 AtomicRMW 属性下沉到 contract、offset 累加、VecDup 分支删除。 GraphPartition 与 IntraSubgraphAdapter UT:覆盖跨子图边界插入 slice/contract,以及 legacy view/assemble memory 不一致时的原地改写。 GenerateMoveOp UT:验证 OP_SLICE/OP_CONTRACT 正确生成 copy in/out,且普通 OP_VIEW/OP_ASSEMBLE 不再作为 move 入口。 See merge request: cann/pypto!5568 | 3 months ago |