| Files | Last commit | Last update |
|---|---|---|
feat(machine): Support L2-friendly scheduling in DRCO via device_sched_mode=1 Co-authored-by: LordOfMysteries<duhongxiang@huawei.com> # message auto-generated for no-merge-commit merge: !7058 merge master into master feat(machine): Support L2-friendly scheduling in DRCO via device_sched_mode=1 Created-by: lululu40888 Commit-by: LordOfMysteries Merged-by: cann-robot Description: feat(machine): Support L2-friendly scheduling in DRCO via device_sched_mode=1 See merge request: cann/pypto!7058 | 1 month ago | |
feat(machine): Support host ctrlflow cache by jit Co-authored-by: qq_52905393<liuzhen180@huawei.com> # message auto-generated for no-merge-commit merge: !5741 merge dev-host-ctrl-jit into master feat(machine): Support host ctrlflow cache by jit Created-by: qq_52905393 Commit-by: qq_52905393 Merged-by: cann-robot Description: 1、支持通过 jit ready_on_host_tensors 配置 npu_name: cpu_name 传入配对关系,算子 kernel 传入值依赖 tensor 对应的 cpu tensor 2、支持传入值依赖 tensor 场景下在 host 侧做 controlflow cache See merge request: cann/pypto!5741 | 2 months 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 | |
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(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 | |
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(pass): Add pipeall debug, fix SeqSchedule loop, update kirin tests Co-authored-by: GBowen666<libowen58@huawei.com> # message auto-generated for no-merge-commit merge: !6958 merge master into master feat(pass): Add pipeall debug, fix SeqSchedule loop, update kirin tests Created-by: GBowen666 Commit-by: GBowen666 Merged-by: cann-robot Description: Related Issue: [[Requirement|需求建议]: 新增 enable_pipe_all 全同步调试开关,修复 SeqSchedule 死循环,适配 Kirin(LiteNPU)编译链并更新 Kirin UT 用例](https://gitcode.com/cann/pypto/issues/3585) 1、feat(pass): Add pipeall debug, fix SeqSchedule loop, update kirin tests See merge request: cann/pypto!6958 | 1 month ago | |
feat(pass): Add pipeall debug, fix SeqSchedule loop, update kirin tests Co-authored-by: GBowen666<libowen58@huawei.com> # message auto-generated for no-merge-commit merge: !6958 merge master into master feat(pass): Add pipeall debug, fix SeqSchedule loop, update kirin tests Created-by: GBowen666 Commit-by: GBowen666 Merged-by: cann-robot Description: Related Issue: [[Requirement|需求建议]: 新增 enable_pipe_all 全同步调试开关,修复 SeqSchedule 死循环,适配 Kirin(LiteNPU)编译链并更新 Kirin UT 用例](https://gitcode.com/cann/pypto/issues/3585) 1、feat(pass): Add pipeall debug, fix SeqSchedule loop, update kirin tests See merge request: cann/pypto!6958 | 1 month ago | |
fix(machine): Add value depend check for ifstmt Co-authored-by: qq_52905393<liuzhen180@huawei.com> # message auto-generated for no-merge-commit merge: !7361 merge dev-fix-host-ctrl into master fix(machine): Add value depend check for ifstmt Created-by: qq_52905393 Commit-by: qq_52905393 Merged-by: cann-robot Description: 检测值依赖和 insert wait_aicore_start 的时候,增加 ifstmt 的检测 See merge request: cann/pypto!7361 | 24 days ago | |
fix(machine): Add value depend check for ifstmt Co-authored-by: qq_52905393<liuzhen180@huawei.com> # message auto-generated for no-merge-commit merge: !7361 merge dev-fix-host-ctrl into master fix(machine): Add value depend check for ifstmt Created-by: qq_52905393 Commit-by: qq_52905393 Merged-by: cann-robot Description: 检测值依赖和 insert wait_aicore_start 的时候,增加 ifstmt 的检测 See merge request: cann/pypto!7361 | 24 days ago | |
fix(codegen): Propagate parallel task exceptions instead of swallowing them Co-authored-by: anyangle<anyangle@huawei.com> # message auto-generated for no-merge-commit merge: !5266 merge compile_fix into master fix(codegen): Propagate parallel task exceptions instead of swallowing them Created-by: quadrate Commit-by: anyangle Merged-by: cann-robot Description: 1. 多线程 Codegen 确定性 Kernel 编译 Related Issue:[https://gitcode.com/cann/pypto/issues/2913](https://gitcode.com/cann/pypto/issues/2913) 2. Issue 背景:GenCode 内的 ExecuteParallelCompile 编译失败抛出 COMPILE_CODE_FAILED 被吞掉,leafDict[hash] = leaf 未执行,leafDict不完整。下游 ConstructCodeInfo → RunCompileAicoreKernelStage → RunEncodeStage 继续访问不完整的 leafDict,触发 std::unordered_map::at() 越界,抛出 F00003 RuntimeError: _Map_base::at 二次异常,掩盖了真实的编译错误 根因:codeGen在并行编译遇到错误抛出异常时,只记录日志,并不传播异常和终止剩余task,导致报错在第二现场F00003 RuntimeError: _Map_base::at处 解决方法:修改 ParallelExecuteAndWait,使其在 task 失败时记录错误、提前终止剩余 task、并在所有线程 join 后重新抛出首个 COMPILE_CODE_FAILED异常 修改前:  修改后:  See merge request: cann/pypto!5266 | 3 months ago | |
fix(codegen): Propagate parallel task exceptions instead of swallowing them Co-authored-by: anyangle<anyangle@huawei.com> # message auto-generated for no-merge-commit merge: !5266 merge compile_fix into master fix(codegen): Propagate parallel task exceptions instead of swallowing them Created-by: quadrate Commit-by: anyangle Merged-by: cann-robot Description: 1. 多线程 Codegen 确定性 Kernel 编译 Related Issue:[https://gitcode.com/cann/pypto/issues/2913](https://gitcode.com/cann/pypto/issues/2913) 2. Issue 背景:GenCode 内的 ExecuteParallelCompile 编译失败抛出 COMPILE_CODE_FAILED 被吞掉,leafDict[hash] = leaf 未执行,leafDict不完整。下游 ConstructCodeInfo → RunCompileAicoreKernelStage → RunEncodeStage 继续访问不完整的 leafDict,触发 std::unordered_map::at() 越界,抛出 F00003 RuntimeError: _Map_base::at 二次异常,掩盖了真实的编译错误 根因:codeGen在并行编译遇到错误抛出异常时,只记录日志,并不传播异常和终止剩余task,导致报错在第二现场F00003 RuntimeError: _Map_base::at处 解决方法:修改 ParallelExecuteAndWait,使其在 task 失败时记录错误、提前终止剩余 task、并在所有线程 join 后重新抛出首个 COMPILE_CODE_FAILED异常 修改前:  修改后:  See merge request: cann/pypto!5266 | 3 months ago | |
feat(Machine): Add FedProf and AicpuProf for machine profiling Co-authored-by: Jie Yin<yinjie27@huawei.com> # message auto-generated for no-merge-commit merge: !6980 merge pgo-framework into master feat(Machine): Add FedProf and AicpuProf for machine profiling Created-by: yinjie27_ Commit-by: Jie Yin Merged-by: cann-robot Description: feat(Machine): Add FedProf and AicpuProf for machine profiling Rework the machine-side profiling data path around a unified host profiler (FedProf). The old free-function dump machinery is replaced by a class-owned design; profiling buffers are allocated once at device init and addressed directly through DeviceArgs, so device cores no longer rely on the sharedBuffer slot to locate their per-core prof data. Changes: - Add the FedProf singleton: owns per-core prof buffers, the AICPU launch-round prof buffer, the dump thread and JSON dumping; split into fed_prof.{h,cpp}, fed_prof_aicpu_prof.cpp and fed_prof_io_json.{h,cpp}; remove dump_device_perf.* and runtime/runner/device_perf.* - Add DeviceArgs::perCoreProfAddr / aicpuProfAddr; per-core prof slots are addressed as perCoreProfAddr + idx * FED_PROF_PER_CORE_PROF_ALIGNED_SIZE, and aicore entry/dfx/drco, the AICPU task manager, AICoreHAL and the ESL model are updated accordingly; SHAK_BUF_PER_CORE_PROF_INDEX is removed - Allocate per-core prof data as a single contiguous 512B-aligned block at device init (DeviceDfx::Init -> FedProf::PerCoreProfAllocateData), gated by DUMP_DEVICE_PERF / HostProf / runtime debug mode, idempotent and released together with the AICPU prof buffer - Add AICPU launch-round profiling (FedProfAicpuProf): dump thread, swimlane JSON and machine_perf_trace.py integration, output via KEY_AICPU_PERF_GRAPH_PATH - Reorganize device headers: add aikernel_profile.h (prof structures and sizes) and aikernel_launch.h (KernelArgs/KernelSharedBuffer/TaskEntry/ParallelDevTask moved out of aicpu_common.h); rename aicpu_perf.h to aikernel_profile_aicpu.h and update the CMake install list - Update UT/ST cases, the ESL model hook and launcher call sites to the new interfaces Commits: - feat(Machine): Add FedProf as the profiler - feat(Machine): Add AicpuProf for profiling - feat(Machine): Normalize AicpuProf - feat(Machine): Normalize profiling allocation See merge request: cann/pypto!6980 | 1 month 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 |
| Files | Last commit | Last update |
|---|---|---|
| 1 month ago | ||
| 2 months ago | ||
| 1 month ago | ||
| 1 month ago | ||
| 3 months ago | ||
| 4 months ago | ||
| 1 month ago | ||
| 1 month ago | ||
| 24 days ago | ||
| 24 days ago | ||
| 3 months ago | ||
| 3 months ago | ||
| 1 month ago | ||
| 4 months ago |