| Files | Last commit | Last update |
|---|---|---|
style(all): Fix ruff-check lint errors across the codebase Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4934 merge style-python-format into master style(all): Fix ruff-check lint errors across the codebase Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Fix ruff-check lint errors across the codebase See merge request: cann/pypto!4934 | 4 months ago | |
fix(function): Prevent coredump when JIT loop recording aborts mid-path Co-authored-by: Immutable01<gaoqiancheng@huawei.com> # message auto-generated for no-merge-commit merge: !4996 merge 0720_seg into master fix(function): Prevent coredump when JIT loop recording aborts mid-path Created-by: Immutable01 Commit-by: Immutable01 Merged-by: cann-robot Description: ## Summary 修复 JIT 录制在 loop 中途失败后继续编译/运行导致的 heap corruption( corrupted size vs. prev_size / double free),并完善异常路径下的 Program 生命周期管理。 ## Problem 上一个kernal 在 pypto.loop 录制中途失败(如 transpose 参数校验)时: 1. 异常路径若仍走 EndFunction() 或 Reset() 析构不完整 loop-path 图,会破坏堆; 2. RecordLoopFunc 在异常 unwind 与进程退出 frame 清理时被二次析构,对空 loopStack_ 执行 pop_back() 触发 coredump。 ## Solution - **录制 abort**:pypto.function 异常时改调 AbortRecording(),不再 EndFunction() - **不完整图保活**:AbandonIncompleteRecording() 将半成品图泄漏至 AbandonedGraphPool,避免 ~Function - **成功编译 pin**:RegisterLastCompiledKernel() 通过 KernelBinary::pinnedGraph_ 持有 functionmap,Reset() 可安全 clear() - **Python 缓存**:JIT __call__ 失败时 _drop_kmodule_cache(),避免复用脏 KernelModule - **Loop 析构**:RecordLoopFunc::~RecordLoopFunc() 仅在仍为 stack 顶时才 pop(幂等) - **优化**:HasIncompleteRecordingState() 使 abort 路径幂等;CompileIfNeeded 仅在状态仍脏时清理 ## Changed Files | 层 | 文件 | |----|------| | C++ | program.cpp/h, recorder.cpp, tensor_slot.h, kernel_binary.cpp/h | | Bindings | runtime.cpp, controller.cpp | | Python | _controller.py, frontend/parser/entry.py | See merge request: cann/pypto!4996 | 4 months ago | |
feat(ir): Support del stmt Co-authored-by: tsungl4<lidongsheng4@huawei.com> # message auto-generated for no-merge-commit merge: !5089 merge return_var into master feat(ir): Support del stmt Created-by: tsungl4 Commit-by: tsungl4 Merged-by: cann-robot Description: 1. fix return vars not correct 2. support del stmt Related Issue: #1185 See merge request: cann/pypto!5089 | 4 months ago | |
style(all): Fix ruff-check lint errors across the codebase Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4934 merge style-python-format into master style(all): Fix ruff-check lint errors across the codebase Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Fix ruff-check lint errors across the codebase See merge request: cann/pypto!4934 | 4 months ago | |
style(all): Fix ruff-check lint errors across the codebase Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4934 merge style-python-format into master style(all): Fix ruff-check lint errors across the codebase Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Fix ruff-check lint errors across the codebase See merge request: cann/pypto!4934 | 4 months ago | |
style(all): Fix ruff-check lint errors across the codebase Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4934 merge style-python-format into master style(all): Fix ruff-check lint errors across the codebase Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Fix ruff-check lint errors across the codebase See merge request: cann/pypto!4934 | 4 months ago | |
style(all): Fix ruff-check lint errors across the codebase Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4934 merge style-python-format into master style(all): Fix ruff-check lint errors across the codebase Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Fix ruff-check lint errors across the codebase See merge request: cann/pypto!4934 | 4 months ago |