| Files | Last commit | Last update |
|---|---|---|
fix(machine): fix mismatch and incomplete error descriptions in machine and misc files Co-authored-by: chai-hw<chaizhengtong@huawei.com> # message auto-generated for no-merge-commit merge: !5806 merge pyptolog_fix3 into master fix(machine): fix mismatch and incomplete error descriptions in machine and misc files Created-by: chai-hw Commit-by: chai-hw Merged-by: cann-robot Description: machine 日志内容整改 See merge request: cann/pypto!5806 | 2 months ago | |
refactor(build): Reuse the common compilation options from common cmake. Co-authored-by: Feiteng Zheng<zhengfeiteng1@h-partners.com> # message auto-generated for no-merge-commit merge: !5292 merge 20260728-intf-pub-2 into master refactor(build): Reuse the common compilation options from common cmake. Created-by: zhengfeiteng Commit-by: Feiteng Zheng Merged-by: cann-robot Description: 切换使用 cann/cmake 仓规定的 intf_pub。 - 通过CANN_GLIBCXX_USE_CXX11_ABI属性设置tile_fwk_calculator的_GLIBCXX_USE_CXX11_ABI Related Issue: #2650 See merge request: cann/pypto!5292 | 3 months ago | |
fix(codegen): Uniquify the LiteNPU kernel entry name by function hash Co-authored-by: Nikita Larichev<nikita.larichev@h-partners.com> # message auto-generated for no-merge-commit merge: !5598 merge v3_01_litenpu into master fix(codegen): Uniquify the LiteNPU kernel entry name by function hash Created-by: Nikita17 Commit-by: Nikita Larichev Merged-by: cann-robot Description: fix(codegen): Uniquify the LiteNPU kernel entry name by function hash Split out of https://gitcode.com/cann/pypto/merge_requests/5158 for reviewability. This is the only part of that PR that changes framework code, and it is independent of the rest of the series. Two kernels built in separate processes can receive the same generated entry symbol, because the function-id counter that feeds the magic name restarts per process. When their artifacts are combined into one offline model the second kernel silently overwrites the first. Appending the function hash to the entry name makes the symbol depend on the kernel body rather than on process-local state. Changes: - Append the function hash to the LiteNPU kernel entry name so distinct kernel bodies cannot share an entry symbol - Add a Kirin9030 test that builds the same-named kernel in two fresh subprocesses and asserts identical bodies keep one name while different bodies get different names ### Revision notes - **Since the previous revision:** the duplicated LiteNPU entry-name formula is now a single member, Function::GetMagicNameWithHash(), called from both codegen sites and the launcher. The interim framework/src/interface/utils/kernel_entry_name.{h,cpp} pair introduced by an earlier revision is deleted — Function already lives under interface/, so a member has the same layering and link properties as a free function there and needs no new file. The test's build driver is now a real module, kernel_entry_uniqueness_driver.py, copied per build with the operation passed as an argument, rather than a templated source string. - **Review feedback:** answers all three comments on this PR — reuse rather than a second formula, a copied driver rather than a generated one, and the helper as a member of Function. - **Against custom_pypto_20260717_rebased, the monolithic branch this series was split from:** adds test_kirin9030_kernel_entry_uniqueness.py (4 tests), absent there. ### Why this is needed at all Before this change the emitted LiteNPU entry symbol was TENSOR_default_loop_1_Unroll1_PATH0_hiddenfunc0_5_main — **byte-identical across unrelated kernels**. On device that mis-dispatched: a two-kernel pipeline failed precision at cosine 0.924405, because one kernel's binary shadowed the other inside the combined offline model. An upstream change complicates the picture and is worth naming, because it invites the wrong conclusion. 51ff0e528 *"feat(ir): Switch new_ir config to true"* (2026-08-12) flipped new_ir from False to True, moving kernels from the AST parser onto the PIL pipeline. The two pipelines name functions differently, so magic names **acquired** a per-kernel component they did not have before. That was a feature switch, not a naming fix. It does not make this change unnecessary. On the current pipeline, across the shipped demo set, 16 distinct magic names include **3 that are each shared by two or three different kernels**: | magic name | kernels sharing it | |---|---| | add_kernel_PATH0_hiddenfunc_5 | add, add_softmax_pipeline, mixed_ascendc_pypto | | softmax_kernel_PATH0_hiddenfunc_5 | softmax, add_softmax_pipeline | | pypto_add_kernel_PATH0_hiddenfunc_5 | mixed_ascendc_pypto, mixed_torch_pypto | The function id is _5 in every one — Program::Reset() rewinds the counter per process, so the id never disambiguates. Each operator of a multi-operator offline model is exported and built by its own process and the artifacts are combined afterwards, which is exactly the regime where those names meet. test_distinct_entry_names_differ_only_in_the_content_hash asserts the collision directly: two same-named kernels with different bodies share a magic name and are separated by the content hash alone. new_ir=False also remains a supported argument, and restores the fully generic name where the hash does all of the work. Related Issues: [#2869](https://gitcode.com/cann/pypto/issues/2869), [#5158](https://gitcode.com/cann/pypto/merge_requests/5158) See merge request: cann/pypto!5598 | 2 months ago | |
refactor(cost_model): Remove dead code and fix log message spelling Co-authored-by: zhiweiyuan<zhiweiyuan@huawei.com> # message auto-generated for no-merge-commit merge: !5703 merge refactor/cost-model-cleanup into master refactor(cost_model): Remove dead code and fix log message spelling Created-by: zhiweiyuan Commit-by: zhiweiyuan Merged-by: cann-robot Description: refactor(cost_model): Remove dead code and fix log message spelling Clean up code quality issues in framework/src/cost_model/simulation/ directory: 1. Fix 5 spelling/grammar errors in log messages (Genearte→Generate, equels→equal, Uissued→Unissued, "is error"→"is invalid", "is not equals"→"is not equal") 2. Remove 13 unused #include <iostream> across the codebase 3. Remove 17 unused functions, 3 unused virtual...final methods, 2 undefined declarations, and 1 unused class (SimplifiedMemoryAllocator) 4. Fix PvModel output directory creation: only create if not exists, instead of delete-then-recreate Changes: - Fix log message spelling errors in ModelTop.cpp, CoreMachine.cpp, Config.h, ParseInput.cpp - Remove unused iostream includes, replace with <string> where needed - Remove dead code: unused functions, virtual methods, declarations, and class - Remove std::cout from ToDataType, return default DT_FP16 directly - Fix DynPvModelImpl to create output dir only when it does not exist Related Issues: #3104 See merge request: cann/pypto!5703 | 3 months ago | |
fix(Operation): clean up implementation and magic numbers | 2 months ago | |
fix(machine): fix mismatch and incomplete error descriptions in machine and misc files Co-authored-by: chai-hw<chaizhengtong@huawei.com> # message auto-generated for no-merge-commit merge: !5806 merge pyptolog_fix3 into master fix(machine): fix mismatch and incomplete error descriptions in machine and misc files Created-by: chai-hw Commit-by: chai-hw Merged-by: cann-robot Description: machine 日志内容整改 See merge request: cann/pypto!5806 | 2 months ago | |
fix(pass): Exclude graph-merge attrs from COE hash to fix conv compile error Co-authored-by: Catherie<mayuan33@huawei.com> # message auto-generated for no-merge-commit merge: !5793 merge fix/coe-hash-exclude-merge-attrs into master fix(pass): Exclude graph-merge attrs from COE hash to fix conv compile error Created-by: Catherie Commit-by: Catherie Merged-by: cann-robot Description: ## 问题现象 Conv 算子(conv1d_dynamic_kernel,A5/DAV_3510 平台)编译报错: ErrCode: FC6202! ConvExpandFuncError::EXPANDFUNC_TENSOR_ATTR_GET_FAILED: L1CopyInConv op should have CopyOpAttribute(op_infer_shape_impl.cpp:1120)。 ## 根因分析 1. L1CopyInReuseMerge 等合图 pass 在合并前会为每个子图的所有 op 标注合图组属性:l1_reuse_hashOrder/cube_merge_hashOrder/vec_merge_hashOrder 及对应 subgraphCount,值为 func<magic>_<order>。 2. L1 复用按 GM 输入特征(而非同构组)合并子图,合并后同一子图内会出现两个语义完全相同的 TRANS_FORMAT_L1 生产者,仅合图标注属性不同。 3. COE(CommonOperationEliminateUtils)计算生产者组 hash 时通过 op->DumpAttr() 把全部属性计入 hash,导致这两个等价生产者组 hash 不一致、无法去重。 4. 残留的重复 TRANS_FORMAT_L1 使 GenerateMoveOp::CollapseTransFormatL1Consumer 因 consumer 数 != 1 而放弃合并,L1_COPY_IN_CONV 未被设置 CopyOpAttribute,InferShape 断言失败。 ## 修复方案 - 新增 CommonOperationEliminateUtils::DumpAttr(const Operation&):序列化 op 属性时排除 6 个合图标注属性(l1Reuse/cubeMerge/vecMerge 的 hashOrder + subgraphCount),hash 计算不再受合图簿记标注影响。 - 这些属性是合图 pass 的合并组簿记信息(用于按组配置寻址与泳道图 profiling),不参与计算语义,等价生产者组排除后可正确去重;被保留的 op 仍携带一份该属性,不影响上述用途。 - reduce_copy_pre_subgraph_id 等语义敏感属性仍参与 hash(有既有 UT 约束)。 ## 验证 - 新增回归 UT CommonOperationEliminateTest.EliminateDupOpsWithDifferentGraphMergeHashOrder:两个等价 ABS 生产者仅合图标注不同,修复后正确去重(op 数 3→2)。 - 全量相关 UT 通过:CommonOperationEliminateTest 20、L1CopyInReuseTest、NBufferMergeTest、ReduceCopyTest、GenerateMoveOpPassTest 等共 125 个用例全部 PASS。 - 端到端验证:Conv_L0_basic 用例(xrunfk.py -s=11 -e=11)修复前 ERROR(上述断言),修复后 PASS,双/三精度比对均达标(mare 0.00037)。 See merge request: cann/pypto!5793 | 2 months ago | |
fix(pass): Fix log messages and coverage Co-authored-by: xujiayi1999<xujiayi28@huawei.com> # message auto-generated for no-merge-commit merge: !5807 merge fix-log-rectification into master fix(pass): Fix log messages and coverage Created-by: xujiayi1999 Commit-by: xujiayi1999 Merged-by: cann-robot Description: ### 变更概述 整改 Pass 模块日志中的拼写、语法及文案错误,提升日志准确性和可读性。 ### 主要变更 - 修正 candidate、partial、latest、Tarjan 等拼写错误。 - 修正日志中的语法错误及大小写错误。 - 修正输入/输出 datatype 日志描述。 - 修正 merge_src_dst_buffer 中日志参数传递错误。 - 补充 datatype 不匹配场景 UT,覆盖相关分支。 - 未调整表格中标记为“级别错配”的日志级别,保持本次修改范围聚焦于拼写和语法整改。 See merge request: cann/pypto!5807 | 2 months ago | |
fix(machine): fix log quality issues in machine module. Co-authored-by: chai-hw<chaizhengtong@huawei.com> # message auto-generated for no-merge-commit merge: !5679 merge pyptolog_fix into master fix(machine): fix log quality issues in machine module. Created-by: chai-hw Commit-by: chai-hw Merged-by: cann-robot Description: PyPTO machine 模块日志整改 See merge request: cann/pypto!5679 | 3 months ago | |
refactor(operator): Remove tile_fwk_operator library and associated tests. Co-authored-by: chai-hw<chaizhengtong@huawei.com> # message auto-generated for no-merge-commit merge: !5704 merge delete_test into master refactor(operator): Remove tile_fwk_operator library and associated tests. Created-by: chai-hw Commit-by: chai-hw Merged-by: cann-robot Description: 整改库上代码,删除 framework/src/operator python/tests/st/operator/glm python/tests/st/operator/test_page_attention.py 以及相关涉及文件 See merge request: cann/pypto!5704 | 3 months ago |
| Files | Last commit | Last update |
|---|---|---|
| 2 months ago | ||
| 3 months ago | ||
| 2 months ago | ||
| 3 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 3 months ago | ||
| 3 months ago |