| 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 | |
feat(frontend): Sync compute determinism from torch_npu Co-authored-by: songyangyang18<songyangyang18@huawei.com> # message auto-generated for no-merge-commit merge: !5622 merge torch-npu into master feat(frontend): Sync compute determinism from torch_npu Created-by: songyangyang18 Commit-by: songyangyang18 Merged-by: cann-robot Description: PyPTO 编码侧的计算确定性需要与 torch_npu 进程级设置保持一致。 前端同步:在 JIT 编译入口读取 torch_npu.npu._get_deterministic_level(),写入已有 global config 项 compute_determinism_level(取值 0/1/2),后端通过 ConfigManagerNg::GetGlobalConfig 读取。 level 含义与 torch_npu 一致:0 关闭,1 仅确定性,2 强一致性。约定进程内 level 固定,不在运行中切换。 See merge request: cann/pypto!5622 | 2 months ago | |
refactor(models): Remove models directory and dependent tests. Co-authored-by: chai-hw<chaizhengtong@huawei.com> # message auto-generated for no-merge-commit merge: !5724 merge delete_models into master refactor(models): Remove models directory and dependent tests. Created-by: chai-hw Commit-by: chai-hw Merged-by: cann-robot Description: 删除models目录及相关内容 See merge request: cann/pypto!5724 | 2 months ago | |
fix(interface): Optimize redundant tokens with new logical tensors Co-authored-by: zhaojunhan<zhaojunhan1@huawei.com> # message auto-generated for no-merge-commit merge: !5744 merge fix_reshape_inplace_ into master fix(interface): Optimize redundant tokens with new logical tensors Created-by: zhaojunhan Commit-by: zhaojunhan Merged-by: cann-robot Description: ## 问题背景 开启 create_new_logical_tensor=True 后,部分场景会产生不必要的 token 依赖: - inplace reshape 仅建立 storage alias,不产生真实内存读写,但原先会生成 read/write token,影响后续 MergeViewAssemble 和 DCE,可能导致 hidden function 被错误删除。 - 写入区域不相交的多个 assemble 仍被 token 串行化,造成性能劣化。 ## 修改内容 - 将 inplace reshape 设为 token-transparent,不再生成冗余 read/write token。 - 在当前 SCF 块内,删除能够证明访问区域不相交的 token 依赖。 - 第一阶段暂不处理跨 SCF 的 token 分析与转发。 - 补充并更新相关 UT 和 IR 快照。 ## 验证结果 - 相关 token UT 全部通过。 - InterleaveRope 精度无损,性能恢复至约 225.97 μs。 See merge request: cann/pypto!5744 | 3 months ago | |
feat(matmul): support GEMV (M=1) via TGEMV + ND data path Co-authored-by: zhuhongyu<zhuhongyu22@h-partners.com> # message auto-generated for no-merge-commit merge: !5563 merge pr/gemv into master feat(matmul): support GEMV (M=1) via TGEMV + ND data path Created-by: Zhu1418539395 Commit-by: zhuhongyu Merged-by: cann-robot Description: ## 功能描述<br> 支持 MatMul 的 GEMV(M=1,矩阵向量乘)场景:当 matmul 的 A 为单行(M=1,非 transA)时,算侧使用 pto::TGEMV(底层 mad 指令,M 硬编码 1),搬运侧 A 全程保持 ND 数据路径(不做 NZ 分形转换),并做 M 轴去 pad / K 对齐差异化,减少 L1/L0A buffer 占用。<br><br> ## 改动内容(按层)<br> **信号判定(op 创建处)**<br> - cube_operation_impl.cpp AddAMulBNode:非 transA 且 M==1 时设 OpAttributeKey::isGemv;transA(M=1)退化为普通 transA matmul。<br><br> **Tile graph pass(对齐/搬运)**<br> - generate_move_op.cpp ProcessUB2L1:GEMV A 来自 UB 时跳过 ND2NZ(A 保持 ND)。<br> - pad_local_buffer.cpp PadMatmul:GEMV 的 L1/L0A/UB2L1 输入按 K 对齐(L1/UB 32B、L0A 512B)、M 轴不打 pad;isUB2L1Scene 的 bank 冲突优化(+=1)对 GEMV 跳过。<br> - merge_view_assemble_utils.*:isGemv/copy_in_mode 白名单继承,跨 VIEW 重建存活。<br><br> **Codegen(指令分发)**<br> - codegen_op_npu.h / codegen_op_litenpu.*:新增虚函数 GetMatmulTileOpName()(LiteNPU 覆写读 isGemv)。<br> - codegen_mte.cpp:GEMV 的 UB→L1 生成 TCopyUB2L1ND2ND、L1→L0A 生成 TExtractL1ToL0ND2ND。<br> - codegen_cube.cpp:算侧读 isGemv 生成 TGEMV。<br><br> **TileLib(指令实现)**<br> - cube_pto.h:新增 TGEMV(#ifdef __LITE_NPU)、TCopyUB2L1ND2ND / TExtractL1ToL0ND2ND wrapper。<br> - mmad_impl.h:TMatmulImpl 加 isGemv 模板参数,GEMV 时 validM=1(M 不打 pad)并分派 pto::TGEMV 系列。<br> - copy_ub_to_l1_impl.h / copy_l1_to_l0_impl.h:GEMV 时 tile 声明 BLayout::RowMajor(+ SLayout::NoneBox),命中 pto-isa TExtractVecToMat/TExtractToAVector 的 ND 搬运分支。<br><br> **平台隔离**<br> - 框架 pass/codegen 层:仅源头 1 处运行时平台判断(LiteNPU)+ codegen 虚函数分派,非 LiteNPU 平台行为不变。<br> - tileop wrapper 层:TGEMV/ND2ND wrapper 用 __LITE_NPU 宏(kernel 编译域可见)。<br><br> ## 测试<br> - python/tests/ut/kirin/common_matmul.py:新增 GEMV 用例 41 个(id 015-055,s8s8 015-027 / FP16 028-055),覆盖 2D/3D/4D batch、bias、a/b_trans、深 K/N、非对齐 K/N、sub-fractal K-tile(tileKAL1>tileKL0)。<br> - common_attention.py / test_kirin9030_attention.py:修复 4input 测试 out shape;attention 复合场景(matmul A 来自 UB,M=1)回归验证。<br><br> ## 验证<br> - GEMV 全量用例(015-055)+ attention 4input 回归通过(kirin9030)。****<br> See merge request: cann/pypto!5563 | 3 months ago | |
feat(operation): Support int64/uint64 for vector operations Co-authored-by: junnyleo<lijun580@huawei.com> # message auto-generated for no-merge-commit merge: !5572 merge feat/dtype into master feat(operation): Support int64/uint64 for vector operations Created-by: junnyleo Commit-by: junnyleo Merged-by: cann-robot Description: 本 PR 旨在为向量(vector)算子补充 int64/uint64 数据类型支持。改动主要为: 1. 通过 GetSupportedDataTypesByArch 在 A5 架构(DAV_3510)的算子支持类型集合中加入 DT_INT64/DT_UINT64; 2. 新增 CheckInt64Broadcast 校验以禁止 int64/uint64 输入的 broadcast;同时修正标量 Element 的构造/转换路径(int64 不经 float、uint64 不经 int64 中转),避免大数值精度丢失或符号翻转; 3. 在 tile-op 内核层为 int64 补齐 FloorDiv、compare、logicalnot、unary 等实现; 4. 配套更新了 Python 侧与测试用例及md文档。 Related Issue: #3141 See merge request: cann/pypto!5572 | 2 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 | |
revert//feat(pypto_pro): add frontend layout x dtype combo validation for load/store Co-authored-by: cann-robot<cann@cann.team> # message auto-generated for no-merge-commit merge: !5789 merge revert-mr-5566-1788001392176-auto into master revert//feat(pypto_pro): add frontend layout x dtype combo validation for load/store Created-by: cann-robot Commit-by: cann-robot 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!5789 | 2 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 | |
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 |