| Files | Last commit | Last update |
|---|---|---|
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(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 | |
fix(config|frontend): Refresh JIT options when global config changes Co-authored-by: zhaojunhan<zhaojunhan1@huawei.com> # message auto-generated for no-merge-commit merge: !7567 merge fix/jit-config-refresh into master fix(config|frontend): Refresh JIT options when global config changes Created-by: nanguag Commit-by: zhaojunhan Merged-by: cann-robot Description: ## 问题 同一个 JIT kernel 在不同静态 shape 下重新编译时,可能继续使用首次创建 KernelModule 时读取的配置: - 全局 compile_monitor_enable 从 2 改为 0 后,后续编译仍输出监控信息。 - 全局 runtime_debug_mode 按 3 → 0 → 3 切换时,dump 开关未随配置变化。 ## 修改 - 每次调用 JIT kernel 时读取当前全局配置,刷新未在 @pypto.jit 中显式指定的 compile_monitor_enable 和 runtime_debug_mode;JIT 显式参数保持更高优先级。 - 将这两个配置值纳入 KernelModule 缓存键,使配置变化后创建使用新配置的模块。 - 移除三个 dump 入口对 runtime_debug_mode 首次读取结果的静态缓存。 ## 验证 使用不同静态 shape 触发重新编译: - Host DFX 用例:compile_monitor_enable 从 2 改为 0,监控输出从 178 行降为 0 行,2/2 断言通过。 - Debug DFX 用例:runtime_debug_mode 按 3 → 0 → 3 切换,三次编译分别产生 7、0、7 个 dump 文件,3/3 断言通过。 在当前测试环境中,需设置 PTO_TILE_LIB_CODE_PATH=/home/zjh/pto-isa,以使用与 PyPTO 匹配的 PTO 头文件。 ## 性能 固定 shape、复用已编译 kernel 的测量显示:刷新配置使 Python 调用路径增加约 8 µs/次;完整 NPU 调用观察到约 15 µs/次的差值,其中包含设备调度波动。 See merge request: cann/pypto!7567 | 11 days ago | |
fix(machine): Restore and Reloc dyn-CM freelist for CF-cache continue Co-authored-by: songyangyang18<songyangyang18@huawei.com> # message auto-generated for no-merge-commit merge: !7559 merge topo into master fix(machine): Restore and Reloc dyn-CM freelist for CF-cache continue Created-by: songyangyang18 Commit-by: songyangyang18 Merged-by: cann-robot Description: ## Summary Host CF-cache 录制装不下触发 Device **partial continue** 时,dyn-CM 的 CM.ptr 仍挂着 **Host 占槽地址**(不能当 Device freelist 条目还池/Reloc)。assemble 缓冲已 Restore,不再走 AllocateAssembleSlot,表也不会再分配 → PartialUpdateStitch 读空/野表 → AICPU SIGSEGV → **507018**。 本 PR:continue 后 **丢掉 Host CM.ptr**,用独立标记 **isDynamicCellMatchNeedAlloc**(与 isAssembleSlotNeedAlloc 解耦)驱动 Device 池 **TryAllocate 重占槽**;UpdateSlots 保持父提交 Prepare-only。 ## 问题背景 默认 stitch CF-cache 约 100M。Host 录制中途 StopRecording 后,Device 先 replay 已录段,再 **continue** live stitch。 continue 时: - slot / outcast / tensor freelist:仍 Restore + Reloc - assemble:**已有** rtOutcastIter → 不进 AllocateAssembleSlot - dyn-CM:CM.ptr 来自 Host 录制,**不是** Device 池槽;不能 Deallocate / 迁 freelist 父提交(0bdb466e6)上 eb_probe_assemble_memory(l=100000)稳定 **507018**。 ## 修复方案 text continue (DuppedRootUpdateAndCachedAllSubmitted) ├─ RuntimeAddrRestore / RelocWorkspace // tensor 侧不变 ├─ for outcast: CM.ptr = {} // 不接 Host 占槽;不 Deallocate └─ for dyn partial (mask≠NONE): isDynamicCellMatchNeedAlloc = true 后续 root · ResolveOutcast ├─ assemble NeedAlloc → AllocateAssembleSlot // 仅 tensor ├─ output / assemble → TryAllocate // 只认 isDynamicCellMatchNeedAlloc └─ Stitch → UpdateSlots // Prepare-only(size==0 && Data!=nullptr) | 标记 | 管什么 | |------|--------| | isAssembleSlotNeedAlloc | assemble **tensor 缓冲** | | isDynamicCellMatchNeedAlloc | dyn-CM **表槽**(Fill 首次 / continue 置位;分配后清) | 要点: - **不**对 dyn-CM 做 CF freelist Backup/Restore/Reloc - 清 CM.ptr **不**走 Device Deallocate(地址属 Host 录制生命周期) - TryAllocate **只认 flag**;调用方不再叠 partial∧mask 门禁 - view 由 TryAllocate 覆盖;UpdateSlots 不 Allocate、不按 CM.ptr 重绑 ## 涉及文件 | 文件 | 变更 | |------|------| | device_execute_context.cpp | continue:清 CM.ptr + 置 isDynamicCellMatchNeedAlloc | | device_slot_context.cpp | Fill/MarkPartialUpdateSlots:首次 Data 空时置 need-alloc | | dev_encode_program_ctrlflow_cache.h | 新增 isDynamicCellMatchNeedAlloc | | dev_workspace.cpp | AllocateAssembleSlot 仅 tensor;Resolve 上 TryAllocate 只认 flag | | test_ctrlflow_cache_dyn_cm.cpp | 2 条 UT:flag 门禁 + continue 清 ptr/置位 | ## 验证 同机同卡对比 eb_probe_assemble_memory(xrunfk -i=test_cases/machine/error_branch_F7.json -s=40 -e=40,case_idx=41,l=100000): | 版本 | 结果 | |------|------| | 父提交 0bdb466e6 | **507018**,精度 FAILED | | 本修复 | **精度 PASS**,无 507018 | UT:CtrlFlowCacheDynCmUt.* 2/2 PASS。 See merge request: cann/pypto!7559 | 3 days ago | |
fetor(Machine): Legacy tar support driver Co-authored-by: wan_jianfen<wanjianfen@hisilicon.com> # message auto-generated for no-merge-commit merge: !7481 merge br_builtIn into master fetor(Machine): Legacy tar support driver Created-by: wan_jianfen Commit-by: wan_jianfen 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!7481 | 15 days ago | |
refactor(build): Replace hardcoded paths with CMake imported targets Co-authored-by: wangmingjun<wangmingjun13@huawei.com> # message auto-generated for no-merge-commit merge: !5147 merge header-deps into master refactor(build): Replace hardcoded paths with CMake imported targets Created-by: hwwangmingjun Commit-by: wangmingjun Merged-by: cann-robot Description: 为实现全量源码构建场景(issue #2573),将 CMake 构建系统中对 cann-toolkit 头文件、库文件的硬编码路径依赖(ASCEND_CANN_PACKAGE_PATH) 替换为 CMake imported targets,通过 find_cann_package 查找 acl_rt、ascend_hal、hcomm/hccl、runtime、atrace、slog 等依赖。 Changes: - 顶层 CMakeLists.txt 增加 acl_rt、ascend_hal、hcomm、hccl、runtime 的 find_cann_package 调用,并处理 hcomm_headers 别名 - cmake/device/CMakeLists.txt 增加 ascend_hal、atrace、hcomm/hccl、slog 的依赖查找 - adapter/machine/device 各 CMakeLists.txt 移除硬编码 include/link 目录,改用 target_link_libraries 引用 imported targets - c_sec 安装改用 $<TARGET_FILE> 生成表达式,头文件安装改用 $<TARGET_PROPERTY> - version.cmake 增加 runtime、hcomm 的构建依赖声明 Related Issues: #2573 See merge request: cann/pypto!5147 | 3 months ago | |
feactor(machine): Add built-in pypto tar Co-authored-by: wan_jianfen<wanjianfen@hisilicon.com> # message auto-generated for no-merge-commit merge: !7398 merge br_builtIn into master feactor(machine): Add built-in pypto tar Created-by: wan_jianfen Commit-by: wan_jianfen 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!7398 | 18 days ago |
| Files | Last commit | Last update |
|---|---|---|
| 4 months ago | ||
| 1 month ago | ||
| 11 days ago | ||
| 3 days ago | ||
| 15 days ago | ||
| 3 months ago | ||
| 18 days ago |