| Files | Last commit | Last update |
|---|---|---|
feat(ir): Remove eval stmt Co-authored-by: poorwill<wangbing110@huawei.com> # message auto-generated for no-merge-commit merge: !7482 merge rm_eval into master feat(ir): Remove eval stmt Created-by: wangbing110 Commit-by: poorwill Merged-by: cann-robot Description: feat(ir): Remove eval stmt See merge request: cann/pypto!7482 | 21 days ago | |
feat(ir): Add new pass to apply config op Co-authored-by: zhaojunhan<zhaojunhan1@huawei.com> # message auto-generated for no-merge-commit merge: !7084 merge add_config_pass into master feat(ir): Add new pass to apply config op Created-by: zhaojunhan Commit-by: zhaojunhan Merged-by: cann-robot Description: **标题:新增 ApplyConfigOps pass,支持合图后配置重放** 新增 ApplyConfigOps,在 merge 后、create_root_functions 前重放 OP_CONFIG: - 将 tile、scope、atomic scope 应用到各计算 op。 - 为计算段保存最终配置,构建 hidden function 时写入函数参数。 - 支持分支及嵌套 loop 的配置继承与隔离,合入分支的计算使用对应分支配置。 补充 test_apply_config_ops 的 8 个典型用例,通过 IR golden 和最终 op/function 配置断言验证,全部通过。 See merge request: cann/pypto!7084 | 1 month ago | |
feat(ir): Remove eval stmt Co-authored-by: poorwill<wangbing110@huawei.com> # message auto-generated for no-merge-commit merge: !7482 merge rm_eval into master feat(ir): Remove eval stmt Created-by: wangbing110 Commit-by: poorwill Merged-by: cann-robot Description: feat(ir): Remove eval stmt See merge request: cann/pypto!7482 | 21 days 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 | 2 months ago | |
perf(ir): Skip token inference for parallel batch matmul assembles Co-authored-by: zhaojunhan<zhaojunhan1@huawei.com> # message auto-generated for no-merge-commit merge: !7346 merge skip_parallel_assemble_tokens into master perf(ir): Skip token inference for parallel batch matmul assembles Created-by: zhaojunhan Commit-by: zhaojunhan Merged-by: cann-robot Description: ### 问题与改动 大 batch matmul 在 C++ 构图时展开大量 Assemble。对这些互不重叠的写回推导串行 token,会增加后续 RemoveRedundantTokenPass 的删边及后继扫描开销。 - 将 cube_operation_impl.cpp 的全部 7 处 Assemble 标记为 parallel:普通 3D/4D、GM 累加 3D/4D、MX 3D/4D,以及 TransposedBatchMatmul。 - 各 batch 写回区域互不重叠;TransposedBatchMatmul 按不同列区间写回,GM 路径在写回前完成 K 累加。 - InferTokenPass 对 parallel Assemble 直接返回,跳过其输入读、输出写 token 推导,不更新读写状态。 - 新增最小 4D batch matmul 前端 IR 快照,检查两次 Assemble 的 parallel(true) 和空 token 列表。 ### 验证与范围 - 跳过范围包括全部读写 token,不仅是 Assemble 之间的写依赖。尚未验证设备执行正确性及大规模用例编译提速;新增快照覆盖 4D 普通路径,其他路径尚无新增专项测试。 ### CI 快照修复(0e19e0ee6) 更新 test_reshape 的 12 处内部三维 batch matmul Assemble 为 parallel(true),其他 IR 不变。扫描确认 test_c2v2 也使用三维 matmul,但没有快照。37 个快照测试文件共 123 项:122 通过,test_branch_config 因全局 atomic scope 编号顺序差异失败;该项单独复跑通过,与 test_reshape、token 测试合计 18 项通过。 See merge request: cann/pypto!7346 | 28 days ago | |
fix(pypto_pro): Align fillpad validation and lowering with PTO ISA Validate fillpad buffer compatibility and restrict Mat tiles to NORMAL mode with NZ layout and null/zero padding. Reuse structural_equal on underlying Tile types while ignoring mutex wrappers, and preserve the existing Vec padding and source-alias behavior. Skip the null-pad source alias for Mat and derive NORMAL's synchronization pipe from the destination buffer (Mat: MTE2, Vec: V). Update the L1 padding documentation and add IR, codegen and synchronization regression coverage, including the Mat codegen golden. | 16 days ago | |
feat(ir): Remove eval stmt Co-authored-by: poorwill<wangbing110@huawei.com> # message auto-generated for no-merge-commit merge: !7482 merge rm_eval into master feat(ir): Remove eval stmt Created-by: wangbing110 Commit-by: poorwill Merged-by: cann-robot Description: feat(ir): Remove eval stmt See merge request: cann/pypto!7482 | 21 days ago | |
feat(ir): Remove eval stmt Co-authored-by: poorwill<wangbing110@huawei.com> # message auto-generated for no-merge-commit merge: !7482 merge rm_eval into master feat(ir): Remove eval stmt Created-by: wangbing110 Commit-by: poorwill Merged-by: cann-robot Description: feat(ir): Remove eval stmt See merge request: cann/pypto!7482 | 21 days ago | |
feat(ir): Dump memeryId for logical tensor. Co-authored-by: zhaojunhan<zhaojunhan1@huawei.com> # message auto-generated for no-merge-commit merge: !7426 merge dump_memeryId into master feat(ir): Dump memeryId for logical tensor. Created-by: zhaojunhan Commit-by: zhaojunhan Merged-by: cann-robot Description: ir dump/load时,增加对logical tensor的memeryId的打印。 memeryId初始值等于rawmagic,当memeryId和rawmagic不相等才dump。 See merge request: cann/pypto!7426 | 25 days ago | |
feat(ir): Remove eval stmt Co-authored-by: poorwill<wangbing110@huawei.com> # message auto-generated for no-merge-commit merge: !7482 merge rm_eval into master feat(ir): Remove eval stmt Created-by: wangbing110 Commit-by: poorwill Merged-by: cann-robot Description: feat(ir): Remove eval stmt See merge request: cann/pypto!7482 | 21 days ago | |
feat(ir): Remove eval stmt Co-authored-by: poorwill<wangbing110@huawei.com> # message auto-generated for no-merge-commit merge: !7482 merge rm_eval into master feat(ir): Remove eval stmt Created-by: wangbing110 Commit-by: poorwill Merged-by: cann-robot Description: feat(ir): Remove eval stmt See merge request: cann/pypto!7482 | 21 days ago | |
feat(ir): Remove eval stmt Co-authored-by: poorwill<wangbing110@huawei.com> # message auto-generated for no-merge-commit merge: !7482 merge rm_eval into master feat(ir): Remove eval stmt Created-by: wangbing110 Commit-by: poorwill Merged-by: cann-robot Description: feat(ir): Remove eval stmt See merge request: cann/pypto!7482 | 21 days ago | |
feat(ir): Dump memeryId for logical tensor. Co-authored-by: zhaojunhan<zhaojunhan1@huawei.com> # message auto-generated for no-merge-commit merge: !7426 merge dump_memeryId into master feat(ir): Dump memeryId for logical tensor. Created-by: zhaojunhan Commit-by: zhaojunhan Merged-by: cann-robot Description: ir dump/load时,增加对logical tensor的memeryId的打印。 memeryId初始值等于rawmagic,当memeryId和rawmagic不相等才dump。 See merge request: cann/pypto!7426 | 25 days ago | |
fix(token): Preserve tensor read token ownership across branches Co-authored-by: zhaojunhan<zhaojunhan1@huawei.com> # message auto-generated for no-merge-commit merge: !7198 merge fix_if_else_read into master fix(token): Preserve tensor read token ownership across branches Created-by: zhaojunhan Commit-by: zhaojunhan Merged-by: cann-robot Description: ## 问题场景 在 loop 前创建 tensor A,if/else 分支内先读取 A,再通过 assemble 覆盖 A。例如: - then:计算 A + B,随后 assemble 写 A。 - else:计算 A + B,随后 assemble 写 A。 不同分支共享同一个 LogicalTensor,但原实现仅用一个 readToken_ 保存读取 token。推断后一个分支时会覆盖前一个分支的记录,导致 ExpandFunction 无法将前一个分支的 READ 正确匹配到 A 的 SLICE。 这可能使后续写入缺少对实际读取的等待,造成读写乱序和精度异常。原复现中,部分行出现固定偏差;float16 下受调度顺序影响可能偶现。 ## 修复方案 将 LogicalTensor 上单个 READ/WRITE token 改为按身份去重的列表,保留不同访问对应的 token。 保持 InferToken 原有的连续读复用规则: - 连续读取 A 共用同一个 READ,重复登记后列表仍只有一项。 - 不同分支产生不同 READ 时,同时保存,避免相互覆盖。 展开时通过“输入 tensor 的 READ 列表与当前 op 的 result token 的交集”确定归属。对于 A+B 等多输入操作,可准确匹配 A 和 B 各自的读取,无需根据输入数量猜测。 ## 核心修改 1. **保存和匹配访问归属** InferToken 追加登记 token;ExpandFunction 使用列表成员关系匹配 READ,将对应的 NORMAL 挂到实际读取输入的 SLICE 上。 2. **维护克隆后的归属** LogicalTensor Clone 复制访问列表;操作及 token 重映射时,将新 token 登记到对应的新输入、输出 tensor,避免只保留旧 token 指针。 3. **处理 AutoCast** 按当前 op 与输入 tensor 的 token 交集,将 READ 完成信号迁移到实际读取原始输入的 CAST,并同步更新依赖缓存。 4. **保留展开后的依赖** InheritTokenContract 仅追加原操作已有的 NORMAL token,并按身份去重,避免覆盖展开阶段已建立的 SLICE/CONTRACT 依赖。 5. **精确删除及接口清理** 删除无用 token 时仅移除对应元素,保留同一 tensor 上的其他访问记录;移除无生产调用的单 READ getter 和旧 setter 接口。 WRITE 虽改为列表保存,但 if/loop 合并仍沿用逻辑版本最后一次 WRITE 的语义;NextVersion 不继承旧版本的访问列表。 ## 验证情况 - 已验证旧实现会在共享输入的 READ 被覆盖后,无法将前一读取的 token 挂到输入 SLICE。 - 回归测试覆盖连续读复用、双分支 A+B、三种 dtype、AutoCast、尾块、克隆重映射及精确删除。 - 简化前版本通过 128 项 host 测试;正常 NPU 包运行原始 pass_token_issue_7.py ## 范围说明 本次不覆盖同一 op 的两个不同别名输入共享 READ、且需要分别迁移到 CAST 的场景;未新增访问列表的文本 IR 序列化支持。 See merge request: cann/pypto!7198 | 1 month ago | |
fix(pypto-pro): Fix tiletype in IR and keep camelCase code style Co-authored-by: poorwill<wangbing110@huawei.com> # message auto-generated for no-merge-commit merge: !7348 merge vf_fusion into master fix(pypto-pro): Fix tiletype in IR and keep camelCase code style Created-by: wangbing110 Commit-by: poorwill Merged-by: cann-robot Description: fix(pypto-pro): Fix tiletype in IR and keep camelCase code style See merge request: cann/pypto!7348 | 28 days ago | |
feat(ir): Remove eval stmt Co-authored-by: poorwill<wangbing110@huawei.com> # message auto-generated for no-merge-commit merge: !7482 merge rm_eval into master feat(ir): Remove eval stmt Created-by: wangbing110 Commit-by: poorwill Merged-by: cann-robot Description: feat(ir): Remove eval stmt See merge request: cann/pypto!7482 | 21 days ago | |
fix(pypto-pro): Fix tiletype in IR and keep camelCase code style Co-authored-by: poorwill<wangbing110@huawei.com> # message auto-generated for no-merge-commit merge: !7348 merge vf_fusion into master fix(pypto-pro): Fix tiletype in IR and keep camelCase code style Created-by: wangbing110 Commit-by: poorwill Merged-by: cann-robot Description: fix(pypto-pro): Fix tiletype in IR and keep camelCase code style See merge request: cann/pypto!7348 | 28 days ago | |
fix(pypto-pro): Fix tiletype in IR and keep camelCase code style Co-authored-by: poorwill<wangbing110@huawei.com> # message auto-generated for no-merge-commit merge: !7348 merge vf_fusion into master fix(pypto-pro): Fix tiletype in IR and keep camelCase code style Created-by: wangbing110 Commit-by: poorwill Merged-by: cann-robot Description: fix(pypto-pro): Fix tiletype in IR and keep camelCase code style See merge request: cann/pypto!7348 | 28 days ago | |
fix(pypto-pro): Fix tiletype in IR and keep camelCase code style Co-authored-by: poorwill<wangbing110@huawei.com> # message auto-generated for no-merge-commit merge: !7348 merge vf_fusion into master fix(pypto-pro): Fix tiletype in IR and keep camelCase code style Created-by: wangbing110 Commit-by: poorwill Merged-by: cann-robot Description: fix(pypto-pro): Fix tiletype in IR and keep camelCase code style See merge request: cann/pypto!7348 | 28 days ago | |
feat(ir): Remove eval stmt Co-authored-by: poorwill<wangbing110@huawei.com> # message auto-generated for no-merge-commit merge: !7482 merge rm_eval into master feat(ir): Remove eval stmt Created-by: wangbing110 Commit-by: poorwill Merged-by: cann-robot Description: feat(ir): Remove eval stmt See merge request: cann/pypto!7482 | 21 days ago | |
fix(ir): Preserve ordinary outputs when merging tensor versions Co-authored-by: zhaojunhan<zhaojunhan1@huawei.com> # message auto-generated for no-merge-commit merge: !7284 merge fix_reshape into master fix(ir): Preserve ordinary outputs when merging tensor versions Created-by: zhaojunhan Commit-by: zhaojunhan Merged-by: cann-robot Description: **标题:** 避免普通op与assemble输出的 tensor 版本合并 **背景:** 同一 raw tensor 的旧版本无人读取时,原逻辑可能将普通op和 ASSEMBLE 的输出合并为同一个 logical tensor,后续 Pass 无法处理这种 IR。 **修改:** 将普通op输出作为版本边界;ASSEMBLE、ATOMIC_RMW 产生的未读版本仍可向后合并,已被读取的版本仍保留。保留边界可能产生无消费者 tensor,由已有的 dead-op 清理逻辑处理,本 PR 只调整合并规则。 See merge request: cann/pypto!7284 | 27 days ago | |
feat(sanitizer): Detect L1 slice OOB and start alignment violations Co-authored-by: zhengyaoff12<zhengyao12@huawei.com> # message auto-generated for no-merge-commit merge: !7444 merge sanitizer-nz-slice into master feat(sanitizer): Detect L1 slice OOB and start alignment violations Created-by: zhengyaoff12 Commit-by: zhengyaoff12 Merged-by: cann-robot Description: Instrument block.subview on Mat (L1) tiles to detect dynamic slice bounds and start alignment violations that the static frontend check cannot see (runtime loop variables, computed offsets). Commits: - feat(sanitizer): Detect L1 NZ/ZN slice OOB and alignment violations - feat(sanitizer): Check plain L1 slice start address alignment at runtime Changes: - Extend the TileAccess wire with access_kind, layout_kind, inner_rows, inner_cols and slice_start_bits - RecordSubview emits one record per block.subview call on Mat tiles, carrying the slice start, size, parent runtime valid_shape and the NZ/ZN fractal inner block geometry - Per-dimension bounds check compares against the runtime valid_shape (matching the frontend static clamp semantics); zero valid_shape dimensions on L1 slices are treated as known empty bounds - TILE_SLICE_UNALIGNED for NZ/ZN slices: starts must align to the inner block boundary (NZ: rows%16, cols%C0; ZN: rows%C0, cols%16) - New block.tile_offset op shares subview's layout/stride calculation so the wire carries the ND/DN slice's absolute start bit address; the replay checks 32-byte alignment, covering nested views and FP4 half-byte offsets, while extreme coordinates skip the address computation and keep the original bounds log Test Results: - NZ/ZN detection commit: 3859 UT passed (all pypto_pro UT) and 118 ST passed on Ascend950PR (sanitizer suite plus 6 new cases: alignment/valid_shape/OOB) - ND/DN alignment commit: adds UT coverage (replay records, wire round trip, empty bounds) and ST cases for plain/nested L1 slices, FP4 offsets and extreme coordinates See merge request: cann/pypto!7444 | 17 days 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 | |
feat(ir): Remove eval stmt Co-authored-by: poorwill<wangbing110@huawei.com> # message auto-generated for no-merge-commit merge: !7482 merge rm_eval into master feat(ir): Remove eval stmt Created-by: wangbing110 Commit-by: poorwill Merged-by: cann-robot Description: feat(ir): Remove eval stmt See merge request: cann/pypto!7482 | 21 days ago |
| Files | Last commit | Last update |
|---|---|---|
| 21 days ago | ||
| 1 month ago | ||
| 21 days ago | ||
| 2 months ago | ||
| 28 days ago | ||
| 16 days ago | ||
| 21 days ago | ||
| 21 days ago | ||
| 25 days ago | ||
| 21 days ago | ||
| 21 days ago | ||
| 21 days ago | ||
| 25 days ago | ||
| 1 month ago | ||
| 28 days ago | ||
| 21 days ago | ||
| 28 days ago | ||
| 28 days ago | ||
| 28 days ago | ||
| 21 days ago | ||
| 27 days ago | ||
| 17 days ago | ||
| 2 months ago | ||
| 21 days ago |