| Files | Last commit | Last update |
|---|---|---|
fix(machine): Detect intra-loop write overlap for single-root cell-match WAW Co-authored-by: songyangyang18<songyangyang18@huawei.com> # message auto-generated for no-merge-commit merge: !6438 merge 920 into 9.2.0 fix(machine): Detect intra-loop write overlap for single-root cell-match WAW Created-by: songyangyang18 Commit-by: songyangyang18 Merged-by: cann-robot Description: ## 1. Background(背景信息) 当前 kernel 输入 tensor 的写后写依赖建立过程,单 root、跨迭代写同一 assemble 区域时,无法建立写后写依赖,导致精度异常。 为了解决场景精度异常问题,新增 PASS 在 IR 层进行写后写区域重叠校验:相对当前循环变量,相邻迭代写窗可分,并进行非重叠标记,用于machine部分的写后写依赖判定依据。 ## 2. 总体流程 1. 在create_function之后新增了infer_multi_iter_overlap_pass,用于检测loop 迭代间的写区域重叠; 2. 对于检测区域不重叠的打上标记,使用rebuildable attribute挂载在function上; 3. 获取function的assemble数量,数量>=2的保守视为存在写后写,只考虑assemble数量为1的场景; 4. 对于整体的function,识别assemble所在循环层的循环变量与步长,进行区域重叠检测,不存在循环变量的视为固定区域写,存在重叠;存在循环变量的进行重叠检测,用循环变量i+step与i的offset之差与assemble的tensor shape做比较。 ## 3. 验证场景一览 | # | scene | assemble offset(示意) | 期望 Mark / WAW | |---|-------|-------------------------|-----------------| | 1 | assemble_disjoint | [i*tile, 0] | Mark / 无 WAW | | 2 | assemble_overlap | [i*(tile//2), 0] | 不 Mark / 有 WAW | | 3 | nested_disjoint | [i*tile, j*tile_n](innermost=j 可分) | Mark / 无 WAW | | 4 | nested_overlap | [i*tile, j*(tile_n//2)](innermost=j 半窗重叠) | 不 Mark / 有 WAW | | 5 | fixed_offset | [0, 0](当前变量不在 offset) | 不 Mark / 有 WAW | | 6 | same_idx_diff_step | sibling:左半窗重叠 + 右 step=2 可分 | 同 raw 多 assemble → 不 Mark | | 7 | nested_inner_immediate_offset | 嵌套:[i*tile, 0],innermost=j 不在 offset | 不 Mark / 有 WAW | ## 4. PR限制约束 1. 当前实现逻辑只考虑了最内层循环的重叠判定,在循环嵌套场景下,外层循环的影响没有考虑,存在局限。 2. 当前实现逻辑没有考虑循环内部创建tensor的情况,内部创建的tensor会自动根据迭代次数分配不同的地址区域,所以一定不重叠。 3. 更多的泛化性场景需要验证与补充。 See merge request: cann/pypto!6438 | 2 months ago | |
feat(pypto-pro): Decouple generation of tilingdata.h from codegen Co-authored-by: poorwill<wangbing110@huawei.com> # message auto-generated for no-merge-commit merge: !5799 merge master into master feat(pypto-pro): Decouple generation of tilingdata.h from codegen Created-by: wangbing110 Commit-by: poorwill Merged-by: cann-robot Description: decouple generation of tilingdata.h from codegen See merge request: cann/pypto!5799 | 2 months ago | |
feat(ir): Add block bindings support Co-authored-by: wuzhongxin<wuzhongxin1@huawei.com> # message auto-generated for no-merge-commit merge: !3705 merge new into master feat(ir): Add block bindings support Created-by: wuzhongxin Commit-by: wuzhongxin Merged-by: cann-robot Description: support block bindings See merge request: cann/pypto!3705 | 5 months ago | |
fix(frontend): resolve CodeCheck G.FMT/G.STD/G.CNS/G.PRE/G.EXP/G.SCRIPT warnings Co-authored-by: HuYiSheng01<hys123456aaa@163.com> # message auto-generated for no-merge-commit merge: !6523 merge 9.2.0 into 9.2.0 fix(frontend): resolve CodeCheck G.FMT/G.STD/G.CNS/G.PRE/G.EXP/G.SCRIPT warnings Created-by: HuYiSheng01 Commit-by: HuYiSheng01 Merged-by: cann-robot Description: ## 背景 CodeCheck代码规范缺陷列表,共 3 个检查任务、去重后 13 处缺陷、9 个文件(C/C++ 双扫导致的重复项已合并)。 ## 改动概览 涉及模块: framework/src/interface/{utils,tensor,function}、python/src/bindings ## 已修复项 | 规范 | 文件 | 修复方式 | |---|---|---| | G.FMT.17-CPP | torch_tensor_converter.cpp | 删除返回值判断前的多余空行 | | G.CNS.02-CPP | symbolic_scalar_simplify.h | magic number 4/2/3 → 0x4/2/3 | | G.CNS.02-CPP | function.cpp | magic number 62 → 具名常量 | | G.CNS.02-CPP | controller.cpp | magic number 2 → 0x2 | | G.PRE.09 | rebuildable_attribute.h | 宏末尾去除分号(调用处已带分号,3 处调用已验证) | | G.EXP.09-CPP | symbolic_scalar.cpp | 递归 lambda 变量声明即初始化 | See merge request: cann/pypto!6523 | 2 months ago | |
fix(simulation): Relax capture mode during device-to-host data transfer Co-authored-by: zhiweiyuan<zhiweiyuan@huawei.com> # message auto-generated for no-merge-commit merge: !5303 merge fix/capture-mode-relax into master fix(simulation): Relax capture mode during device-to-host data transfer Created-by: zhiweiyuan Commit-by: zhiweiyuan Merged-by: cann-robot Description: fix(simulation): Relax capture mode during device-to-host data transfer In A3 simulation mode, executing capture test cases fails with RT_MEMCPY_FAILED (F7B002) during CopyFromDev. The root cause is that device-to-host memory copy is restricted in capture mode. This change calls ExchangeCaptureModeRelax before the data transfer to relax the capture mode constraint, allowing the memcpy to succeed. Changes: - Add ExchangeCaptureModeRelax call in cost_model.py before device-to-host tensor transfer - Bind ExchangeCaptureModeRelax function in cost_model.cpp - Add ExchangeCaptureModeRelax declaration in __init__.pyi Related Issues: #2887 See merge request: cann/pypto!5303 | 3 months ago | |
feat(ir): Add block bindings support Co-authored-by: wuzhongxin<wuzhongxin1@huawei.com> # message auto-generated for no-merge-commit merge: !3705 merge new into master feat(ir): Add block bindings support Created-by: wuzhongxin Commit-by: wuzhongxin Merged-by: cann-robot Description: support block bindings See merge request: cann/pypto!3705 | 5 months ago | |
feat(ir): Add block bindings support Co-authored-by: wuzhongxin<wuzhongxin1@huawei.com> # message auto-generated for no-merge-commit merge: !3705 merge new into master feat(ir): Add block bindings support Created-by: wuzhongxin Commit-by: wuzhongxin Merged-by: cann-robot Description: support block bindings See merge request: cann/pypto!3705 | 5 months ago | |
feat(pypto_pro):unified error codes Co-authored-by: huanyongben<huanyongben1@hisilicon.com> # message auto-generated for no-merge-commit merge: !6508 merge 9.2.0 into 9.2.0 feat(pypto_pro):unified error codes Created-by: huanyongben Commit-by: huanyongben Merged-by: cann-robot Description: pypto统一错误码和日志规范 See merge request: cann/pypto!6508 | 2 months ago | |
fix(pass): Fix nested-loop InferMultiIterOverlap and refine local-tensor create detection Include dump function attribute support for rebuildable attrs. Co-authored-by: Cursor <cursoragent@cursor.com> | 2 months ago | |
fix(operator): Make ScatterUpdate update dst inplace and preserve slot symbol Co-authored-by: gaoxingwang<camuel.gao@huawei.com> # message auto-generated for no-merge-commit merge: !6120 merge scatterupdate-inplace-9.2.0 into 9.2.0 fix(operator): Make ScatterUpdate update dst inplace and preserve slot symbol Created-by: gaoxingwang Commit-by: gaoxingwang Merged-by: cann-robot Description: fix(operator): Make ScatterUpdate update dst inplace and preserve slot symbol Sync of #6028 (merged to master) to release branch 9.2.0. ScatterUpdate returned a new tensor while leaving dst unchanged, which broke inplace semantics and lost dst ARG symbol in codegen when the src slot (nameless inplace-view SSA) took over dst registration. Changes: - Change ScatterUpdate dst parameter to a mutable reference and assign result back to dst so the caller-side tensor reflects the update - Register input names at param-declaration time via the new TensorSlotManager::MarkInputName (called in RootFunctionBuilder::InitDynFunc and RecordFunc::RecordDynFuncInner), so inputNameList keeps the original ARG symbols before any SetSameSlot migration - Keep slot marking and startArgs fill in BuildDynSlotScope unchanged - Register pypto.scatter_update in _patch_methods so inplace slot tracking covers it Related Issues: #3260 See merge request: cann/pypto!6120 | 2 months ago | |
feat(ir): Add block bindings support Co-authored-by: wuzhongxin<wuzhongxin1@huawei.com> # message auto-generated for no-merge-commit merge: !3705 merge new into master feat(ir): Add block bindings support Created-by: wuzhongxin Commit-by: wuzhongxin Merged-by: cann-robot Description: support block bindings See merge request: cann/pypto!3705 | 5 months ago | |
refactor(platform): Pass memory space key as string in GetMemoryLimitForArch Co-authored-by: zhengyaoff12<zhengyao12@huawei.com> # message auto-generated for no-merge-commit merge: !5982 merge commit-0907 into master refactor(platform): Pass memory space key as string in GetMemoryLimitForArch Created-by: zhengyaoff12 Commit-by: zhengyaoff12 Merged-by: cann-robot Description: Follow-up to the review comment on #5779: platform (tilefwk) must not include headers from ir. - Remove #include "ir/memory_space.h" from framework/include/tilefwk/platform.h; GetMemoryLimitForArch now takes the memory space as a string key instead of pypto::ir::MemorySpace. - Define the accepted space keys (kMemorySpaceVec/Mat/Left/Right/Acc) in platform.h next to the interface; the key -> platform-ini column mapping (spaceKeys) lives in platform.cpp. - Python bindings and get_memory_limit forward the string key; _get_memory_capacity passes MemorySpace.name instead of .value. Related Issue: https://gitcode.com/cann/pypto/issues/3181 See merge request: cann/pypto!5982 | 2 months ago | |
fix(dfx): Add memory events and change moduleid to PyPTO. 9.2.0 Co-authored-by: meiqing2<meiqing2@hisilicon.com> # message auto-generated for no-merge-commit merge: !6225 merge mtr9.2.0 into 9.2.0 fix(dfx): Add memory events and change moduleid to PyPTO. 9.2.0 Created-by: meiqing2 Commit-by: meiqing2 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!6225 | 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 | |
fix(ir): Select merged valid_shape by branch condition Co-authored-by: tsungl4<lidongsheng4@huawei.com> # message auto-generated for no-merge-commit merge: !5840 merge fix/phi-shape into master fix(ir): Select merged valid_shape by branch condition Created-by: tsungl4 Commit-by: tsungl4 Merged-by: cann-robot Description: Related Issue: #2559 See merge request: cann/pypto!5840 | 2 months ago | |
fix(frontend): resolve CodeCheck G.FMT/G.STD/G.CNS/G.PRE/G.EXP/G.SCRIPT warnings Co-authored-by: HuYiSheng01<hys123456aaa@163.com> # message auto-generated for no-merge-commit merge: !6523 merge 9.2.0 into 9.2.0 fix(frontend): resolve CodeCheck G.FMT/G.STD/G.CNS/G.PRE/G.EXP/G.SCRIPT warnings Created-by: HuYiSheng01 Commit-by: HuYiSheng01 Merged-by: cann-robot Description: ## 背景 CodeCheck代码规范缺陷列表,共 3 个检查任务、去重后 13 处缺陷、9 个文件(C/C++ 双扫导致的重复项已合并)。 ## 改动概览 涉及模块: framework/src/interface/{utils,tensor,function}、python/src/bindings ## 已修复项 | 规范 | 文件 | 修复方式 | |---|---|---| | G.FMT.17-CPP | torch_tensor_converter.cpp | 删除返回值判断前的多余空行 | | G.CNS.02-CPP | symbolic_scalar_simplify.h | magic number 4/2/3 → 0x4/2/3 | | G.CNS.02-CPP | function.cpp | magic number 62 → 具名常量 | | G.CNS.02-CPP | controller.cpp | magic number 2 → 0x2 | | G.PRE.09 | rebuildable_attribute.h | 宏末尾去除分号(调用处已带分号,3 处调用已验证) | | G.EXP.09-CPP | symbolic_scalar.cpp | 递归 lambda 变量声明即初始化 | See merge request: cann/pypto!6523 | 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): Add block bindings support Co-authored-by: wuzhongxin<wuzhongxin1@huawei.com> # message auto-generated for no-merge-commit merge: !3705 merge new into master feat(ir): Add block bindings support Created-by: wuzhongxin Commit-by: wuzhongxin Merged-by: cann-robot Description: support block bindings See merge request: cann/pypto!3705 | 5 months ago |
| Files | Last commit | Last update |
|---|---|---|
| 2 months ago | ||
| 2 months ago | ||
| 5 months ago | ||
| 2 months ago | ||
| 3 months ago | ||
| 5 months ago | ||
| 5 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 5 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 4 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 4 months ago | ||
| 5 months ago |