| 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(Operation): Add pypto.conv_backward_input and its 2D implementation on A2/A3 Co-authored-by: hongyiliu111<liuhongyi1@huawei.com> Co-authored-by: xutianlong1<xutianlong1@huawei.com> Co-authored-by: wangshenhao<wangshenhao1@huawei.com> # message auto-generated for no-merge-commit merge: !5528 merge dev into master feat(Operation): Add pypto.conv_backward_input and its 2D implementation on A2/A3 Created-by: hongyiliu111 Commit-by: wangshenhao;hongyiliu111;xutianlong1 Merged-by: cann-robot Description: feat(Operation): Add pypto.conv_backward_input and its 2D implementation on A2/A3 Add pypto.conv_backward_input interface to compute the gradient of convolution with respect to the input tensor, and implement its 2D support spanning the frontend interface, backend operation implementation and MTE codegen Changes: - Add pypto.conv_backward_input frontend interface with parameter validation - Implement ConvBackwardInput 2D backend operation and codegen - Add UT/ST test cases for the 2D implementation See merge request: cann/pypto!5528 | 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 | |
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 | |
fix(Operation): modify cleancode Co-authored-by: chenbl<chenbinglin7@huawei.com> # message auto-generated for no-merge-commit merge: !5748 merge fix/docs into master fix(Operation): modify cleancode Created-by: chenbl Commit-by: chenbl Merged-by: cann-robot Description: cleancode修改: - 拆分过长的 Operation 和 TileOp 文件 - 重构过长函数并提取重复代码 - 使用公共常量替换 Magic Number - 修复报错日志的拼写和语法问题 - 补充报错日志中的实际参数值 - 删除自定义调试打印 - 清理无用变量和重复实现 - 迁移并补充 Vector Operation 单元测试 See merge request: cann/pypto!5748 | 2 months ago | |
fix(Operation): clean up implementation and magic numbers | 2 months ago | |
feat(Operation): Add pypto.conv_backward_input and its 2D implementation on A2/A3 Co-authored-by: hongyiliu111<liuhongyi1@huawei.com> Co-authored-by: xutianlong1<xutianlong1@huawei.com> Co-authored-by: wangshenhao<wangshenhao1@huawei.com> # message auto-generated for no-merge-commit merge: !5528 merge dev into master feat(Operation): Add pypto.conv_backward_input and its 2D implementation on A2/A3 Created-by: hongyiliu111 Commit-by: wangshenhao;hongyiliu111;xutianlong1 Merged-by: cann-robot Description: feat(Operation): Add pypto.conv_backward_input and its 2D implementation on A2/A3 Add pypto.conv_backward_input interface to compute the gradient of convolution with respect to the input tensor, and implement its 2D support spanning the frontend interface, backend operation implementation and MTE codegen Changes: - Add pypto.conv_backward_input frontend interface with parameter validation - Implement ConvBackwardInput 2D backend operation and codegen - Add UT/ST test cases for the 2D implementation See merge request: cann/pypto!5528 | 3 months ago | |
fix(Operation): clean up implementation and magic numbers | 2 months ago |
| Files | Last commit | Last update |
|---|---|---|
| 4 months ago | ||
| 3 months ago | ||
| 3 months ago | ||
| 4 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 3 months ago | ||
| 2 months ago |