| Files | Last commit | Last update |
|---|---|---|
fix(machine): TryAllocate dyn-CM on incast when need-alloc flag is set Co-authored-by: songyangyang18<songyangyang18@huawei.com> # message auto-generated for no-merge-commit merge: !7785 merge topo into master fix(machine): TryAllocate dyn-CM on incast when need-alloc flag is set Created-by: songyangyang18 Commit-by: songyangyang18 Merged-by: cann-robot Description: ## 问题 Host Control-Flow Cache 录制装不下、触发 Device **partial continue** 时,动态 Cell Match(dyn-CM)表仍可能挂着 **Host 侧地址**。Device 上若继续按该指针做 stitch / 还池,会出现: - AICPU **SIGSEGV**( PartialUpdateStitchConsumer 解引用空/野表) - 或 freelist / Reloc 异常(如 **507018**) 典型复现:op_combo_matrix case174(op_combo_cv_2v2c_waw_single_conv_s3_tail_eager,stitch_function_max_num=2)。 ## 原因 1. **Fill 清表(预期行为)** Device 启动 FillInputOutputSlot 时,将落在 devProg 镜像外的 Host dyn-CM Data 清成 nullptr,避免把 Host 地址当 Device 指针使用。 2. **表与 assemble tensor 生命周期解耦后的缺口** 引入独立标记 isDynamicCellMatchNeedAlloc 后,TryAllocate **只认 flag**;AllocateAssembleSlot 只负责 tensor,不再顺带分配 dyn-CM。 Fill / continue 在 Data()==nullptr 时置 flag,期望由后续 **outcast Resolve** 调用 TryAllocate 从 Device 池重占槽。 3. **Consumer 可能先于 outcast 分配到达** 单次 root 顺序为:AssignIncast → AssignOutcast(此处才 TryAllocate)→ **Stitch(先 Consumer 读表)** → UpdateSlots。 若 live root **只 incast 读**该 slot,本拍不会走对该 slot 的 outcast Resolve → flag 已置上但 **从未 TryAllocate** → PartialUpdateStitchConsumer 读到 Data()==nullptr → SEGV。 父提交能避开该洞,是因为 AllocateAssembleSlot(incast 常会先触达)内部仍会 TryAllocate;本设计把分配从 assemble 拆出后,调用点未覆盖「纯 consumer 先读」路径。 > 说明:仅在 consumer 对空指针 return 0 **不足以**替代分配——case174 上可消除 SEGV,但精度失败。后续 Prepare / UpdateSlots 填表依赖非空 Data 缓冲。 ## 修复方法 1. **独立 need-alloc 标记(与 assemble NeedAlloc 解耦)** - Fill / MarkPartialUpdateSlots:Data()==nullptr 且需 partial stitch → isDynamicCellMatchNeedAlloc = true - CF-cache continue(Restore + Reloc 之后):同样按 Data()==nullptr 置 flag - TryAllocateDynamicCellMatchForAssembleSlot:**只认 flag**;分配成功后清 flag 2. **分配调用点** - output / assemble **outcast Resolve**:flag 为真时 TryAllocate(既有) - **incast**(AssignIncastAddresses,rtOutcastIter 已有效之后):同样调用一次 flag 门闩的 TryAllocate - 覆盖「consumer 先于任何 outcast Resolve 读表」的洞 - 门闩仍是 flag:无 need-alloc 时为空操作 - 不把「表内容由 outcast producer 填写」的语义改成由 incast 生产;此处只保证 Device 侧表缓冲在 Stitch 前存在,便于后续 Prepare / 填表与安全读表 3. **刻意不做** - continue 后不对 CM.ptr 做 bulk clear(由 TryAllocate 覆盖写入) - UpdateSlots 保持 Prepare-only,不按 CM.ptr 重绑 See merge request: cann/pypto!7785 | 3 days 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 | |
fix(machine): Fix security risks Co-authored-by: W4termy<wangmingyang21@huawei.com> # message auto-generated for no-merge-commit merge: !2467 merge os into master fix(machine): Fix security risks Created-by: W4termy Commit-by: W4termy 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 规范](https://gitcode.com/cann/pypto/blob/master/docs/contribute/pull-request.md#commit-message) See merge request: cann/pypto!2467 | 7 months ago | |
feat(dfx): Runtime memory overlap check Co-authored-by: duanhaotian<duanhaotian@huawei.com> # message auto-generated for no-merge-commit merge: !5107 merge duanhaotian7 into master feat(dfx): Runtime memory overlap check Created-by: duanhaotian Commit-by: duanhaotian Merged-by: cann-robot Description: dump运行时各个op的读写信息以及每个op的读写范围大小并dump运行时整体内存使用情况统计,基于相关dump数据和topo序,设计内存重叠检测脚本,检测是否存在 内存重叠 See merge request: cann/pypto!5107 | 3 months ago | |
fix(machine): Compile out host DEV_VERBOSE_ when ENABLE_COMPILE_VERBOSE_LOG=0 Co-authored-by: Snow__Land<songyangyang18@huawei.com> # message auto-generated for no-merge-commit merge: !7244 merge verbose into master fix(machine): Compile out host DEV_VERBOSE_ when ENABLE_COMPILE_VERBOSE_LOG=0 Created-by: songyangyang18 Commit-by: Snow__Land Merged-by: cann-robot Description: ## 背景 host 侧 DEV_VERBOSE_DEBUG / DEV_VERBOSE_DEBUG_SPLIT / DEV_VERBOSE_INFO 原先直接展开为 PYPTO_SIM_LOG,即使未开 DEBUG,热路径仍会执行 setAttr/checkLevel。device 侧已用 DEV_IF_VERBOSE_LOG(ENABLE_COMPILE_VERBOSE_LOG=0 时编译剔除)。 Engram 录 CF 时 cell-match 会命中上述宏数万次,导致 host FAST_STITCH 虚高(约 3.5 ms → 修复后约 1.0 ms)。 ## 改动 host 与 device 对齐:上述三个宏包上 DEV_IF_VERBOSE_LOG。 不影响 stitch/CF 语义。若需输出 verbose/trace:设 ENABLE_COMPILE_VERBOSE_LOG=1 重编,并开 DEBUG 级别(与 device 一致)。 ## 结果  See merge request: cann/pypto!7244 | 28 days ago | |
feat(machine): Cache AOT control-flow binaries in multi-slot LRU pool Co-authored-by: LordOfMysteries<duhongxiang@huawei.com> # message auto-generated for no-merge-commit merge: !5007 merge perf/aot-cf-code-pool into master feat(machine): Cache AOT control-flow binaries in multi-slot LRU pool Created-by: LordOfMysteries Commit-by: LordOfMysteries Merged-by: cann-robot Description: https://gitcode.com/cann/pypto/issues/2597 feat(machine): Cache AOT control-flow binaries in multi-slot LRU pool Replace single-slot AOT CF binary caching with a multi-slot LRU pool, plus coding micro-optimizations that share encode_program surfaces (RuntimeVerify moved out of header, workspace/start-args tidy). Commits: - feat(machine): Cache AOT control-flow binaries in multi-slot LRU pool - refactor(machine): Apply coding and style micro-optimizations Changes: - AOT_CODE_POOL multi-slot LRU - Encode hashKey assert for empty-slot sentinel - ST test_aot_code_pool - RuntimeVerify / workspace micro cleanups Related Issues: N/A See merge request: cann/pypto!5007 | 4 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 | |
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 | |
fix(machine): prevent offline exception dump segfault on bundle launch Co-authored-by: W4termy<wangmingyang21@huawei.com> # message auto-generated for no-merge-commit merge: !5936 merge fix/exception-dump-offline into master fix(machine): prevent offline exception dump segfault on bundle launch Created-by: W4termy Commit-by: W4termy Merged-by: cann-robot Description: 修复单算子复现出现段错误的问题 当前bundle启动时会将kername写到opname中,在进行异常复现时先读取opname中的名称,避免由于bundle不走前端而导致的lastfunc为空指针的情况 See merge request: cann/pypto!5936 | 2 months ago | |
fix(machine): Improve ctrl cache replay performance Co-authored-by: qq_52905393<liuzhen180@huawei.com> # message auto-generated for no-merge-commit merge: !6302 merge dev-restore-pingpong into master fix(machine): Improve ctrl cache replay performance Created-by: qq_52905393 Commit-by: qq_52905393 Merged-by: cann-robot Description: 1、将 PredCount 以及 readyque 改为 A B 两份,通过pingpong 结构,当前轮次 ctrl push task 之后,对 B 做 restore ,利用 ctrl 结尾空闲时间掩盖 restore 开销 See merge request: cann/pypto!6302 | 2 months ago |
| Files | Last commit | Last update |
|---|---|---|
| 3 days ago | ||
| 7 months ago | ||
| 7 months ago | ||
| 3 months ago | ||
| 28 days ago | ||
| 4 months ago | ||
| 7 months ago | ||
| 7 months ago | ||
| 2 months ago | ||
| 2 months ago |