| Files | Last commit | Last update |
|---|---|---|
refactor(pypto_pro): address codecheck warnings Co-authored-by: fa<yangzf993@163.com> # message auto-generated for no-merge-commit merge: !7683 merge bugfix into master refactor(pypto_pro): address codecheck warnings Created-by: fafafafafa Commit-by: fa Merged-by: cann-robot Description: PR 应该避免没有描述信息,描述信息的最重要的作用是描述修改意图,应该清晰明了。例如:标题中包含了 fix 标签,如果没有描述信息,就需要Review人员猜测PR具体修复了哪些内容,或者怀疑修改的必要性。如果PR和特定的Issue相关,可以单独包含一行 Related Issue: 放到描述信息最后。 下面是一个典型的PR描述信息: The origin issue template brings too many noise, it's not suitable for git message. eg: comments are not removed, labels are redundant as the PR tile already contains the tag. The guide gives a clear suggestion on how to write the PR body. Related Issue: #1234,#5678 更多描述信息见:[Commit Message 规范](../docs/zh/contribute/pull-request.md#commit-message) See merge request: cann/pypto!7683 | 3 days ago | |
refactor(machine): Drop execute-path RUNTIME_SlotMarkNeedAlloc covered by path marking Co-authored-by: songyangyang18<songyangyang18@huawei.com> # message auto-generated for no-merge-commit merge: !6754 merge clean into master refactor(machine): Drop execute-path RUNTIME_SlotMarkNeedAlloc covered by path marking Created-by: songyangyang18 Commit-by: songyangyang18 Merged-by: cann-robot Description: ## 问题背景: Execute 图上的 NeedAlloc 标记曾用于修复非 assemble 算子(如 pypto.full), 产出的 assemble 目标漏发 RUNTIME_SlotMarkNeedAlloc 的问题。 目前,IR builder 会把所有非 assemble 生产者记录到 tensorConstructFunc_,PATH 级标记constructAssembleSlotList已经覆盖这些 slot,Execute 图上的标记因此变得冗余。 ## 删除的安全性: - 每个 PATH 只有一个 root,PATH 级标记在 PATH 入口发出,早于该 root 的 RUNTIME_RootAlloc。Execute 图标记的非参数 slot 都已被 PATH 标记过,且该标志是幂等的。 - Execute 图额外标记的只有 kernel 参数 slot。运行时 ResolveOutcastAddress 对这些 slot走外部 IO 分支,从不读取 NeedAlloc 标志,因此这些标记本身不起作用。 - 作用:参数 slot 不再计入 constructAssembleNeedAllocRuntimeSlots,totalAssembleOutcastSlot 不再为它们多预留 InnerTemporal slot。 ## 问题样例: 下面的算子,out会被错误纳入assemble outcast内存分配,去掉excute路径,恢复正常。 @pypto.frontend.jit(**_JIT) def _k_out_compute_then_assemble(src: _T, out: _T): pypto.set_vec_tile_shapes(TILE, TILE) out[:] = pypto.mul(src.view([BS, HIDDEN], [0, 0]), 2.0) for i in pypto.loop(N_ROW, name="NA_OCA", idx_name="i"): pypto.set_vec_tile_shapes(TILE, TILE) v = src.view([TILE, HIDDEN], [i * TILE, 0]) pypto.assemble(pypto.mul(v, 4.0), [i * TILE, 0], out) See merge request: cann/pypto!6754 | 1 month ago | |
feat(ir): Support dump function attribute Co-authored-by: tsungl4<lidongsheng4@huawei.com> # message auto-generated for no-merge-commit merge: !6675 merge attr into master feat(ir): Support dump function attribute Created-by: tsungl4 Commit-by: tsungl4 Merged-by: cann-robot Description: Related Issue: #2559 See merge request: cann/pypto!6675 | 2 months ago | |
fix(pass): Fix nested-loop InferMultiIterOverlap and refine local-tensor create detection Co-authored-by: songyangyang18<songyangyang18@huawei.com> # message auto-generated for no-merge-commit merge: !6555 merge cell-resolve into master fix(pass): Fix nested-loop InferMultiIterOverlap and refine local-tensor create detection Created-by: songyangyang18 Commit-by: songyangyang18 Merged-by: cann-robot Description: ## Background(背景信息) 当前InferMultiIterOverlap PASS只考虑了最内层循环变量的判重,对于循环嵌套场景以及内部创建tensor的场景存在判定不精准的问题。 ## 算法更新 1. 增加每一轮PASS前的clear清空操作,避免多轮之间的影响。 2. 增加outcast过滤,局部非outcast应该直接跳过。 3. 由最内层向外层循环逐一检测重叠,每一层按照当前层的循环变量与步长校验,只有全部非重叠,才进行标记; 4. 额外增加内部创建判定,创建的标识统一以path的constructAssembleSlotList为主,识别到当前循环层创建,当前层直接判定非重叠。 ## 用例看护 新增python UT场景看护。 | # | 用例 | 场景 | 期望 IterNoOverlapWaw | |---|------|------|-------------------------| | 1 | test_assemble_disjoint_marked | 单层 loop,assemble 偏移 i*TILE 邻接 | 有 Mark:[6](i 对应 hiddenfunc) | | 2 | test_assemble_overlap_unmarked | 单层 loop,偏移 i*(TILE//2) 半窗重叠 | 空 | | 3 | test_nested_disjoint_marked | 嵌套 i/j,i*TILE / j*TILE_N 均邻接 | 有 Mark:[6](内层 j) | | 4 | test_nested_overlap_unmarked | 嵌套,列步长 j*(TILE_N//2) 重叠 | 空 | | 5 | test_fixed_offset_unmarked | 每轮 assemble 到固定 [0,0] | 空 | | 6 | test_same_idx_diff_step_attrs | 兄弟 loop 同 idx_name=i:半窗 / step=2 邻接 | 仅 DJ 侧 Mark:[16] | | 7 | test_nested_inner_immediate_offset_unmarked | 内层 j 不进 assemble 偏移(对 j 不变) | 空 | | 8 | test_nested_outer_overlap_inner_disjoint_unmarked | 外层半窗重叠、内层邻接(任一层失败) | 空 | | 9 | test_tensor_create_outer_inner_overlap_attrs | 外层 tensor(buf);内层半窗写 buf;buf→out 邻接 | 仅外层 Mark:[14] | | 10 | test_full_create_disjoint_marked | 每轮 full + assemble i*TILE 邻接 | 有 Mark:[3] | | 11 | test_tensor_create_outer_inner_disjoint_attrs | 外层 buf;内层 j*TILE 与 buf→out i*TILE 均邻接 | 双 Mark:[14] + [7] | | 12 | test_multiround_disjoint_then_overlap_clears_marks | 同进程 5×:disjoint→overlap,验 Infer ClearMarks | disjoint 同 #1;overlap 始终空 | See merge request: cann/pypto!6555 | 1 month ago |
| Files | Last commit | Last update |
|---|---|---|
| 3 days ago | ||
| 1 month ago | ||
| 2 months ago | ||
| 1 month ago |