| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
feat(pypto_pro): add tile_group auto mutex-id Co-authored-by: cfy111<chenfengyu3@huawei.com> # message auto-generated for no-merge-commit merge: !6209 merge master into master feat(pypto_pro): add tile_group auto mutex-id Created-by: cfy111 Commit-by: cfy111 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!6209 | 2 个月前 | |
feat(pypto_pro): replace internal 'a5' with NPUArch enum Co-authored-by: m0_55221889<chenliwen12@huawei.com> # message auto-generated for no-merge-commit merge: !6705 merge docs/fix-arch into master feat(pypto_pro): replace internal 'a5' with NPUArch enum Created-by: m0_55221889 Commit-by: m0_55221889 Merged-by: cann-robot Description: ## 背景 a5 为内部芯片代号,不应对外暴露。__NPU_ARCH__ 官方架构版本号中,Ascend 950PR/950DT 系列对应 **3510**(Atlas A2/A3 为 2201,训练系列为 1001)。本 PR 将 Pro 侧 arch 身份整体切换为 3510,并把散落的字符串字面量统一收敛到枚举。 ## 改动内容(5 个提交) **1. rename + fixtures + docs**:pl.jit(arch="3510")、combo/编译配置表键、比较逻辑、错误消息、产物目录名 build/<kernel>__3510__d0 及 pro 指南文档,全量替换。 **2. C++ 枚举化**:CCECodegen::arch_ 由 std::string 改为复用既有 NPUArch 枚举(与 base codegen 对齐);platform.h 新增 ParseNPUArch(数值串 + legacy 别名 a5/a2/a3,未知返 DAV_UNKNOWN);backends 15 处比较、archToIni 映射全部枚举化。 **3. Python 枚举化**:新增叶子模块 pypto_pro/_arch.py——NpuArch(IntEnum)(镜像 C++ 枚举)+ parse_arch()。 PYPTOPRO_JIT_ARCH 恒存规范值 "3510";即使传 a5,产物目录也统一为 __3510__。 ## 向后兼容 - pl.jit(arch="a5") 等全部公开入口:**警告但放行**(DeprecationWarning + 归一),不报错 - C++ ParseNPUArch 静默接受 a5/a2/a3 → 57 处既有 C++ 测试 fixture **零改动**,同时构成别名解析的隐式回归覆盖 See merge request: cann/pypto!6705 | 2 个月前 | |
feat(ir): Add block bindings support Co-authored-by: wuzhongxin<wuzhongxin1@huawei.com> # message auto-generated for no-merge-commit merge: !3705 merge new into master feat(ir): Add block bindings support Created-by: wuzhongxin Commit-by: wuzhongxin Merged-by: cann-robot Description: support block bindings See merge request: cann/pypto!3705 | 5 个月前 | |
fix(frontend): resolve CodeCheck G.FMT/G.STD/G.CNS/G.PRE/G.EXP/G.SCRIPT warnings Co-authored-by: HuYiSheng01<hys123456aaa@163.com> # message auto-generated for no-merge-commit merge: !6515 merge master into master fix(frontend): resolve CodeCheck G.FMT/G.STD/G.CNS/G.PRE/G.EXP/G.SCRIPT warnings Created-by: HuYiSheng01 Commit-by: HuYiSheng01 Merged-by: cann-robot Description: ## 背景 CodeCheck代码规范缺陷列表,共 3 个检查任务、去重后 13 处缺陷、9 个文件(C/C++ 双扫导致的重复项已合并)。 ## 改动概览 涉及模块: framework/src/interface/{utils,tensor,function}、python/src/bindings ## 已修复项 | 规范 | 文件 | 修复方式 | |---|---|---| | G.FMT.17-CPP | torch_tensor_converter.cpp | 删除返回值判断前的多余空行 | | G.CNS.02-CPP | symbolic_scalar_simplify.h | magic number 4/2/3 → 0x4/2/3 | | G.CNS.02-CPP | function.cpp | magic number 62 → 具名常量 | | G.CNS.02-CPP | controller.cpp | magic number 2 → 0x2 | | G.PRE.09 | rebuildable_attribute.h | 宏末尾去除分号(调用处已带分号,3 处调用已验证) | | G.EXP.09-CPP | symbolic_scalar.cpp | 递归 lambda 变量声明即初始化 | See merge request: cann/pypto!6515 | 2 个月前 | |
fix(simulation): Relax capture mode during device-to-host data transfer Co-authored-by: zhiweiyuan<zhiweiyuan@huawei.com> # message auto-generated for no-merge-commit merge: !5303 merge fix/capture-mode-relax into master fix(simulation): Relax capture mode during device-to-host data transfer Created-by: zhiweiyuan Commit-by: zhiweiyuan Merged-by: cann-robot Description: fix(simulation): Relax capture mode during device-to-host data transfer In A3 simulation mode, executing capture test cases fails with RT_MEMCPY_FAILED (F7B002) during CopyFromDev. The root cause is that device-to-host memory copy is restricted in capture mode. This change calls ExchangeCaptureModeRelax before the data transfer to relax the capture mode constraint, allowing the memcpy to succeed. Changes: - Add ExchangeCaptureModeRelax call in cost_model.py before device-to-host tensor transfer - Bind ExchangeCaptureModeRelax function in cost_model.cpp - Add ExchangeCaptureModeRelax declaration in __init__.pyi Related Issues: #2887 See merge request: cann/pypto!5303 | 3 个月前 | |
feat(ir): Add block bindings support Co-authored-by: wuzhongxin<wuzhongxin1@huawei.com> # message auto-generated for no-merge-commit merge: !3705 merge new into master feat(ir): Add block bindings support Created-by: wuzhongxin Commit-by: wuzhongxin Merged-by: cann-robot Description: support block bindings See merge request: cann/pypto!3705 | 5 个月前 | |
feat(ir): Add block bindings support Co-authored-by: wuzhongxin<wuzhongxin1@huawei.com> # message auto-generated for no-merge-commit merge: !3705 merge new into master feat(ir): Add block bindings support Created-by: wuzhongxin Commit-by: wuzhongxin Merged-by: cann-robot Description: support block bindings See merge request: cann/pypto!3705 | 5 个月前 | |
feat(pypto_pro):unified error codes Co-authored-by: huanyongben<huanyongben1@hisilicon.com> # message auto-generated for no-merge-commit merge: !6453 merge master into master feat(pypto_pro):unified error codes Created-by: huanyongben Commit-by: huanyongben Merged-by: cann-robot Description: pypto pro整改错误码以及日志规范 See merge request: cann/pypto!6453 | 2 个月前 | |
refactor(machine): Drop execute-path RUNTIME_SlotMarkNeedAlloc covered by path marking Co-authored-by: songyangyang18<songyangyang18@huawei.com> # message auto-generated for no-merge-commit merge: !6754 merge clean into master refactor(machine): Drop execute-path RUNTIME_SlotMarkNeedAlloc covered by path marking Created-by: songyangyang18 Commit-by: songyangyang18 Merged-by: cann-robot Description: ## 问题背景: Execute 图上的 NeedAlloc 标记曾用于修复非 assemble 算子(如 pypto.full), 产出的 assemble 目标漏发 RUNTIME_SlotMarkNeedAlloc 的问题。 目前,IR builder 会把所有非 assemble 生产者记录到 tensorConstructFunc_,PATH 级标记constructAssembleSlotList已经覆盖这些 slot,Execute 图上的标记因此变得冗余。 ## 删除的安全性: - 每个 PATH 只有一个 root,PATH 级标记在 PATH 入口发出,早于该 root 的 RUNTIME_RootAlloc。Execute 图标记的非参数 slot 都已被 PATH 标记过,且该标志是幂等的。 - Execute 图额外标记的只有 kernel 参数 slot。运行时 ResolveOutcastAddress 对这些 slot走外部 IO 分支,从不读取 NeedAlloc 标志,因此这些标记本身不起作用。 - 作用:参数 slot 不再计入 constructAssembleNeedAllocRuntimeSlots,totalAssembleOutcastSlot 不再为它们多预留 InnerTemporal slot。 ## 问题样例: 下面的算子,out会被错误纳入assemble outcast内存分配,去掉excute路径,恢复正常。 @pypto.frontend.jit(**_JIT) def _k_out_compute_then_assemble(src: _T, out: _T): pypto.set_vec_tile_shapes(TILE, TILE) out[:] = pypto.mul(src.view([BS, HIDDEN], [0, 0]), 2.0) for i in pypto.loop(N_ROW, name="NA_OCA", idx_name="i"): pypto.set_vec_tile_shapes(TILE, TILE) v = src.view([TILE, HIDDEN], [i * TILE, 0]) pypto.assemble(pypto.mul(v, 4.0), [i * TILE, 0], out) See merge request: cann/pypto!6754 | 2 个月前 | |
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 个月前 | |
feat(ir): Add block bindings support Co-authored-by: wuzhongxin<wuzhongxin1@huawei.com> # message auto-generated for no-merge-commit merge: !3705 merge new into master feat(ir): Add block bindings support Created-by: wuzhongxin Commit-by: wuzhongxin Merged-by: cann-robot Description: support block bindings See merge request: cann/pypto!3705 | 5 个月前 | |
feat(pypto_pro): replace internal 'a5' with NPUArch enum Co-authored-by: m0_55221889<chenliwen12@huawei.com> # message auto-generated for no-merge-commit merge: !6705 merge docs/fix-arch into master feat(pypto_pro): replace internal 'a5' with NPUArch enum Created-by: m0_55221889 Commit-by: m0_55221889 Merged-by: cann-robot Description: ## 背景 a5 为内部芯片代号,不应对外暴露。__NPU_ARCH__ 官方架构版本号中,Ascend 950PR/950DT 系列对应 **3510**(Atlas A2/A3 为 2201,训练系列为 1001)。本 PR 将 Pro 侧 arch 身份整体切换为 3510,并把散落的字符串字面量统一收敛到枚举。 ## 改动内容(5 个提交) **1. rename + fixtures + docs**:pl.jit(arch="3510")、combo/编译配置表键、比较逻辑、错误消息、产物目录名 build/<kernel>__3510__d0 及 pro 指南文档,全量替换。 **2. C++ 枚举化**:CCECodegen::arch_ 由 std::string 改为复用既有 NPUArch 枚举(与 base codegen 对齐);platform.h 新增 ParseNPUArch(数值串 + legacy 别名 a5/a2/a3,未知返 DAV_UNKNOWN);backends 15 处比较、archToIni 映射全部枚举化。 **3. Python 枚举化**:新增叶子模块 pypto_pro/_arch.py——NpuArch(IntEnum)(镜像 C++ 枚举)+ parse_arch()。 PYPTOPRO_JIT_ARCH 恒存规范值 "3510";即使传 a5,产物目录也统一为 __3510__。 ## 向后兼容 - pl.jit(arch="a5") 等全部公开入口:**警告但放行**(DeprecationWarning + 归一),不报错 - C++ ParseNPUArch 静默接受 a5/a2/a3 → 57 处既有 C++ 测试 fixture **零改动**,同时构成别名解析的隐式回归覆盖 See merge request: cann/pypto!6705 | 2 个月前 | |
fix(dfx): Add memory events and change moduleid to PyPTO. Co-authored-by: meiqing2<meiqing2@hisilicon.com> # message auto-generated for no-merge-commit merge: !6215 merge mtr1 into master fix(dfx): Add memory events and change moduleid to PyPTO. Created-by: meiqing2 Commit-by: meiqing2 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!6215 | 2 个月前 | |
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 个月前 | |
fix(ir): Select merged valid_shape by branch condition Co-authored-by: tsungl4<lidongsheng4@huawei.com> # message auto-generated for no-merge-commit merge: !5840 merge fix/phi-shape into master fix(ir): Select merged valid_shape by branch condition Created-by: tsungl4 Commit-by: tsungl4 Merged-by: cann-robot Description: Related Issue: #2559 See merge request: cann/pypto!5840 | 2 个月前 | |
fix(frontend): resolve CodeCheck G.FMT/G.STD/G.CNS/G.PRE/G.EXP/G.SCRIPT warnings Co-authored-by: HuYiSheng01<hys123456aaa@163.com> # message auto-generated for no-merge-commit merge: !6515 merge master into master fix(frontend): resolve CodeCheck G.FMT/G.STD/G.CNS/G.PRE/G.EXP/G.SCRIPT warnings Created-by: HuYiSheng01 Commit-by: HuYiSheng01 Merged-by: cann-robot Description: ## 背景 CodeCheck代码规范缺陷列表,共 3 个检查任务、去重后 13 处缺陷、9 个文件(C/C++ 双扫导致的重复项已合并)。 ## 改动概览 涉及模块: framework/src/interface/{utils,tensor,function}、python/src/bindings ## 已修复项 | 规范 | 文件 | 修复方式 | |---|---|---| | G.FMT.17-CPP | torch_tensor_converter.cpp | 删除返回值判断前的多余空行 | | G.CNS.02-CPP | symbolic_scalar_simplify.h | magic number 4/2/3 → 0x4/2/3 | | G.CNS.02-CPP | function.cpp | magic number 62 → 具名常量 | | G.CNS.02-CPP | controller.cpp | magic number 2 → 0x2 | | G.PRE.09 | rebuildable_attribute.h | 宏末尾去除分号(调用处已带分号,3 处调用已验证) | | G.EXP.09-CPP | symbolic_scalar.cpp | 递归 lambda 变量声明即初始化 | See merge request: cann/pypto!6515 | 2 个月前 | |
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 个月前 | |
feat(ir): Add block bindings support Co-authored-by: wuzhongxin<wuzhongxin1@huawei.com> # message auto-generated for no-merge-commit merge: !3705 merge new into master feat(ir): Add block bindings support Created-by: wuzhongxin Commit-by: wuzhongxin Merged-by: cann-robot Description: support block bindings See merge request: cann/pypto!3705 | 5 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 2 个月前 | ||
| 2 个月前 | ||
| 5 个月前 | ||
| 2 个月前 | ||
| 3 个月前 | ||
| 5 个月前 | ||
| 5 个月前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 5 个月前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 4 个月前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 4 个月前 | ||
| 5 个月前 |