| Files | Last commit | Last update |
|---|---|---|
feat(codegen): Support Kirin9050 (NCH) LiteNPU codegen and tests Co-authored-by: m0_71310678<lizhexun2@huawei.com> # message auto-generated for no-merge-commit merge: !6988 merge kirin9050-feature-branch-part2 into master feat(codegen): Support Kirin9050 (NCH) LiteNPU codegen and tests Created-by: m0_71310678 Commit-by: m0_71310678 Merged-by: cann-robot Description: Add LiteNPU codegen support for the Kirin9050 (NCH) platform, including static codegen UT cases and single-op python tests. Changes: - Add LiteNPU codegen implementation for Kirin9050 (NCH) - Add codegen static tests for 31 single ops (abs, add, amax, amin, assemble, cast, compare, concat, div, exp, full, index_put_, matmul, maximum, minimum, mul, neg, reciprocal, reshape, rsqrt, sigmoid, sqrt, sub, sum, transpose, unsqueeze, view, where) - Add kernel entry uniqueness driver and single-op tests in python UT - Register kirin9050 operations in python/pypto/operator.py Related Issue: #3600 See merge request: cann/pypto!6988 | 1 month ago | |
feat(pypto_pro): Add api pl.get_cycle() Co-authored-by: yanhf<yanhaifeng5@huawei.com> # message auto-generated for no-merge-commit merge: !6993 merge cycle into master feat(pypto_pro): Add api pl.get_cycle() Created-by: tsungl4 Commit-by: yanhf Merged-by: cann-robot Description: Related Issue #3562 See merge request: cann/pypto!6993 | 1 month ago | |
feat(pad): Kirin9030/KirinX90 支持四边 padding 并补齐 lite UT(fill+concat,修复末维=1) Co-authored-by: zhuhongyu<zhuhongyu22@h-partners.com> # message auto-generated for no-merge-commit merge: !6700 merge pad_fill_assemble_pr into master feat(pad): Kirin9030/KirinX90 支持四边 padding 并补齐 lite UT(fill+concat,修复末维=1) Created-by: Zhu1418539395 Commit-by: zhuhongyu Merged-by: cann-robot Description: ## 背景 pad 的通用实现(Python API + 图算子 + tileop + codegen)早已存在,但: - lite(Kirin9030/KirinX90)平台此前只有“未验证”,没有用例; - 原实现只支持右/下 padding,不支持四边(左/上,torch 语义); - 输入末维 == 1 时 pad 结果错误(TD-1)。 本 PR 补齐 lite 上的 pad 验证与用例、让 lite 支持四边 padding,并修复末维 == 1 的问题。 ## 方案 ### 四边 padding( framework/src/interface/operation/vector/pad.cpp) TensorPadOperation 解析四边后按条件分流: - **右下快路径**(padLeft==0 && padTop==0):保持原 OP_PAD → TPad(TFILLPAD_EXPAND)不变,与 master 一致。 - **左/上(fill+concat)**:用 TensorFullOperation 造 pad 值零块,再用 Cat 沿对应维把“零块 + 输入 + 零块”拼成整块输出: - 最后维 W:Cat([zeros_left?, self, zeros_right?], ndim-1); - 倒数第二维 H:Cat([zeros_top?, cur, zeros_bottom?], ndim-2)。 之所以用 Cat 而非“Full 整块填 + 就地 Assemble 覆盖子区间”:后者让**同一张量同时被整块写(OP_VEC_DUP)和子区间写(OP_ASSEMBLE)两个重叠生产者写入**——单算子用例看不出问题,但多个 pad 结果再喂 add 的**融合核里会串写**(框架只对 outcast(函数输出)处理中间量的写冲突)。Cat 是“每块先 Assign 拷贝 + 写到不相交区段”,每个字节仅一个写者,安全。 - **平台隔离**:用 IsLiteNPU 门控,左/上只对 Kirin9030/KirinX90 放开,其他平台维持“仅右下”旧契约。 - **dtype 收窄**:LiteNPU 下限定 DT_FP16/DT_FP32(云侧白名单不变)。 ### TD-1 修复(framework/src/passes/tile_graph_pass/graph_constraint/axis_combine_marker.cpp) OP_PAD 退出合轴(DisableNoneWhiteListTensor)→ PadLocalBuffer 改为补最后一维到 32B;输入末维 == 1 时不再被折成 (1,N) 后按行列语义横写,重新走 OP_PAD 快路径。 ### Python 侧同步 python/pypto/op/other.py docstring、python/src/bindings/operation.cpp pybind 描述、docs/zh/.../pypto-pad.md 补充 LiteNPU 左/上支持说明。 ## 测试 - Python SIM UT:python/tests/ut/kirin/common_pad.py + kirin9030/x90 两个入口;golden 用 torch.nn.functional.pad,判据 cos ≥ 0.9999。 - C++ codegen UT:framework/tests/ut/codegen/src/test_static/test_litenpu/(共享 RunPad driver + 两个 soc 薄壳);test_codegen_common.h 增加 SetNPUArch/savedArch_ 保存与恢复,保证 fixture 目标架构与 socVersion_ 一致。 - 用例共 **48**(1D 4 / 2D 11 / 3D 11 / 4D 19 / ONNX 3),python 与 C++ 同编号一一对应;覆盖右下/左/上/四边、非对齐 offset、末维=1(TD-1 回归)、同块、pad≫输入、tile 逐维切分矩阵,以及真实 ONNX 形状(tiny_fp32_sim.onnx)。 - **本 PR 只放开四边用例 test_pad_044(4D,in (4,2,32,48),pad (5,16,7,8)),其余 47 个先 skip/disabled**:python 用 pytest.mark.skip,C++ 用两个薄壳里的 DISABLED_ 前缀。 ## 验证 - C++ codegen UT:Kirin9030 / KirinX90 通过(各 1 passed + 47 disabled,无 FAILED)。 - Python SIM UT:四边用例 044 通过。 - 静态检查(clang-format / ruff / 行宽 / EOF / codespell 等)通过。 ## 支持范围 - 位置:1D 支持左/右;2D+ 支持最后两维的四边(左/上/右/下)——左/上仅 LiteNPU(Kirin9030/KirinX90),其他平台维持右/下。 - dtype:LiteNPU 仅 fp16/fp32。 - 模式:constant,padding 值非负。 ## 影响面 - Pad 图算子在 LiteNPU 上放开左/上;OP_PAD 不再参与合轴(TD-1 修复)。 - 云侧 / A2 / A3 行为不变(仍拒绝左/上、dtype 白名单不变)。 See merge request: cann/pypto!6700 | 2 months ago | |
feat(operation): ScatterUpdate Tile Last Dim Co-authored-by: Creeeeper<liuyizhe6@huawei.com> # message auto-generated for no-merge-commit merge: !6967 merge su into master feat(operation): ScatterUpdate Tile Last Dim Created-by: Creeeeper Commit-by: Creeeeper Merged-by: cann-robot Description: ## 描述 ScatterUpdate算子尾轴可进行tileshape切分。 A5新增支持数据类型fp8e4m3。 ## 测试 完成 A3 A5 冒烟测试 ## 关联Issue [#3592](https://gitcode.com/cann/pypto/issues/3592) ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/pypto!6967 | 1 month ago | |
Initial commit | 11 months ago | |
docs(requirements): remove the parenthetical build_ci.py note from python/requirements.txt header Co-authored-by: lizixuan1020<3064268022@qq.com> # message auto-generated for no-merge-commit merge: !6629 merge doc/remove-buildci-parenthetical into master docs(requirements): remove the parenthetical build_ci.py note from python/requirements.txt header Created-by: lizixuan1020 Commit-by: lizixuan1020 Merged-by: cann-robot Description: ### PR功能描述 / 为什么需要这个合入 按 issue #3263 的方向(统一直指 build_ci.py 为构建入口),删除 python/requirements.txt 首行注释中括号内的过时说明(配合python3 build_ci.py使用)。 改动内容:仅删除该一句括号内文字,首行由 # 基础编译依赖(配合python3 build_ci.py使用) 改为 # 基础编译依赖,无其他变更。 ### 改动类型 - 文档更新 / Documentation ### 测试信息 - 纯注释行修改,无需测试;本地 diff 校验仅 1 行变化。 Refs #3263 See merge request: cann/pypto!6629 | 2 months ago |
| Files | Last commit | Last update |
|---|---|---|
| 1 month ago | ||
| 1 month ago | ||
| 2 months ago | ||
| 1 month ago | ||
| 11 months ago | ||
| 2 months ago |