| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
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 个月前 | |
fix(operation): Add missing arch and format constraint checks for matmul/scaled_mm Co-authored-by: shi-dingkun<shidingkun1@huawei.com> # message auto-generated for no-merge-commit merge: !5865 merge fix/matmul-arch-and-format-constraint-check into master fix(operation): Add missing arch and format constraint checks for matmul/scaled_mm Created-by: shi-dingkun Commit-by: shi-dingkun Merged-by: cann-robot Description: 为 matmul/scaled_mm 补齐接口文档中缺失的业务约束检查以及文档针对多核切K功能的描述修正,并修正 FP4 UT。 ## 约束检查 | 约束 | 检查位置 | |---|---| | 输入→输出 dtype 组合表(基础/量化/反量化场景) | __validate_out_dtype | | A2/A3 不支持 DT_HF8 输入 | __validate_inputs | | DT_HF8 不支持 NZ 格式 | __validate_inputs | | A2/A3 不支持 trans_mode | __validate_trans_mode | | scale_a/scale_b 仅支持 ND 格式 | __validate_scaled_inputs | | matmul 拒绝 FP4 输入(仅 scaled_mm 支持) | __validate_matmul_fp4_input | ## FP4 UT 修正 test_fp4_packed_shape.py 重写为正规写法:独立 X/Y 矩阵,scaled_mm + scale tensors + DT_FP16 输出。 ## 测试 test_matmul_op.py 20/20 通过,test_fp4_packed_shape.py 1/1 通过。 Related Issues: #3213 See merge request: cann/pypto!5865 | 2 个月前 | |
feat(interpreter): Interpreter python script remove ml_dtypes Co-authored-by: dingbo929<dingbo24@h-partners.com> # message auto-generated for no-merge-commit merge: !5854 merge master into master feat(interpreter): Interpreter python script remove ml_dtypes Created-by: dingbo929 Commit-by: dingbo929 Merged-by: cann-robot Description: 移除精度工具的python脚本对于第三方库ml_dtypes的依赖,bf16等数据类型的解析用二进制解码方式实现 See merge request: cann/pypto!5854 | 2 个月前 | |
fix(tensor): Fix assemble offset for slice assignment without start and IR dump update Co-authored-by: HuYiSheng01<hys123456aaa@163.com> # message auto-generated for no-merge-commit merge: !5941 merge fix/issue3-assemble-no-start-offset into master fix(tensor): Fix assemble offset for slice assignment without start and IR dump update Created-by: HuYiSheng01 Commit-by: HuYiSheng01 Merged-by: cann-robot Description: loop 循环中 assemble 写法不带起始 start 偏移量时存在精度问题。典型写法: output_tensor[b_idx * tile_b:(b_idx + 1) * tile_b, :h] = left # "[:h]" 不带 start output_tensor[b_idx * tile_b:(b_idx + 1) * tile_b, h:] = right Issue 中最小复现(test_coe_issue.py 1)triple-compare 精度 FAILED,IR 偏移证据为 to offset:[0,-64] to dynoffset:[...,-64]。 修复 Tensor._get_assemble_offset 对 slice(None, stop) 的偏移错算,使不带 start 的切片赋值写入正确位置。 按 Python 切片语义,切片起始位置即写入偏移——start 为 None 时 offset 置 0,否则为 start。同步清理不再使用的 stop/axis 局部变量。 此外,IR 文本 dump 能力增强 IRTextDumper::PrintAttrValue 缺少 std::vector<SymbolicScalar> 类型分支,导致 assemble/view 属性中的动态偏移(toOffset、fromOffset、toValidShape 等)序列化为 "Unsupported" 新增缺失分支,复用文件内已有的 VisitScalarExpr::Visit 打印器。[expr, expr] 列表格式符合 attr_value_list 文法,IRTextLoader round-trip 不受影响 新增 assemble_offset/ IR 快照回归测试(复刻 issue kernel 场景,pil.compile + check_snapshot);重渲染 94 个受影响黄金文件(Unsupported → 真实偏移表达式) Related Issue: #3216 See merge request: cann/pypto!5941 | 2 个月前 | |
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 个月前 | |
fix(operation): Add missing arch and format constraint checks for matmul/scaled_mm Co-authored-by: shi-dingkun<shidingkun1@huawei.com> # message auto-generated for no-merge-commit merge: !5865 merge fix/matmul-arch-and-format-constraint-check into master fix(operation): Add missing arch and format constraint checks for matmul/scaled_mm Created-by: shi-dingkun Commit-by: shi-dingkun Merged-by: cann-robot Description: 为 matmul/scaled_mm 补齐接口文档中缺失的业务约束检查以及文档针对多核切K功能的描述修正,并修正 FP4 UT。 ## 约束检查 | 约束 | 检查位置 | |---|---| | 输入→输出 dtype 组合表(基础/量化/反量化场景) | __validate_out_dtype | | A2/A3 不支持 DT_HF8 输入 | __validate_inputs | | DT_HF8 不支持 NZ 格式 | __validate_inputs | | A2/A3 不支持 trans_mode | __validate_trans_mode | | scale_a/scale_b 仅支持 ND 格式 | __validate_scaled_inputs | | matmul 拒绝 FP4 输入(仅 scaled_mm 支持) | __validate_matmul_fp4_input | ## FP4 UT 修正 test_fp4_packed_shape.py 重写为正规写法:独立 X/Y 矩阵,scaled_mm + scale tensors + DT_FP16 输出。 ## 测试 test_matmul_op.py 20/20 通过,test_fp4_packed_shape.py 1/1 通过。 Related Issues: #3213 See merge request: cann/pypto!5865 | 2 个月前 | |
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 个月前 | |
feat(pypto_pro): Upload for vf problem and pl problem solve Co-authored-by: liuyu<liuyu205@hisilicon.com> # message auto-generated for no-merge-commit merge: !5935 merge master into master feat(pypto_pro): Upload for vf problem and pl problem solve Created-by: liuyu205 Commit-by: liuyu Merged-by: cann-robot Description: Upload for vf problem and pl problem solve See merge request: cann/pypto!5935 | 2 个月前 | |
fix(tests): Delete unused simulator add test case Co-authored-by: chai-hw<chaizhengtong@huawei.com> # message auto-generated for no-merge-commit merge: !5957 merge delete_ut into master fix(tests): Delete unused simulator add test case Created-by: chai-hw Commit-by: chai-hw Merged-by: cann-robot Description: 删除无用ut See merge request: cann/pypto!5957 | 2 个月前 | |
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 个月前 |