| Files | Last commit | Last update |
|---|---|---|
feat(dist): Support distribute for pypto_pro Co-authored-by: tsungl4<lidongsheng4@huawei.com> # message auto-generated for no-merge-commit merge: !7250 merge dist3 into master feat(dist): Support distribute for pypto_pro Created-by: tsungl4 Commit-by: tsungl4 Merged-by: cann-robot Description: distributed communication (dist) support (UBMEM&URMA) Adds kernel-side distributed communication capability across the device/machine/IR/codegen/frontend/Python-binding stack: - device: add device-side distributed runtime header pypto_distribute.h (windows, channels, transfers), plus pypto_panic/pypto_assert helpers and DIST_CHECK macros - machine: add WindowContext host runtime and pybind dist module, with a DistributeContext interface - IR: add WindowType and the dist.* op definitions (dist_ops.cpp/py) - codegen: lower dist.* ops to CCE (backend_cce_ops.cpp, backend_cce_block_out_ops.cpp, cce_codegen.cpp); fix line wrapping of the set_ctrl_spr atomic-op-type error message - frontend: expose pld.* APIs (windows/channels/transfers) inside kernels; add pl.tensor_view for no-copy GM tensor sub-views - runtime: resolve dist include paths and sanitizer traps for kernels at compile time - parser: drop stale design references from parser docs - tests: add pld.* frontend dispatch UTs, window ST (test_window.py), and tensor_view parsing/CCE codegen UTs See merge request: cann/pypto!7250 | 1 month ago | |
feat(pass): Enable VF fusion for ROWSUMLINE op Co-authored-by: Catherie<mayuan33@huawei.com> # message auto-generated for no-merge-commit merge: !6860 merge feat/vf-fuse-rowsumline into master feat(pass): Enable VF fusion for ROWSUMLINE op Created-by: Catherie Commit-by: Catherie Merged-by: cann-robot Description: feat(pass): Enable VF fusion for ROWSUMLINE op ROWSUMLINE 是与 ROWSUM_SINGLE / ROWMAX_SINGLE / ROWMIN_SINGLE / ROWPROD_SINGLE 同类的 AIV 行规约算子,后四者已在 SUPPORT_VF_FUSE_OPS 中,放开后 ROWSUMLINE 即可加入 VF 融合 loop 组。 VF 融合的 loop body 每次迭代只处理各 operand 的最后 2 维切片,因此 ROWSUMLINE 仅当 reduce 轴落在最后 2 维内时可融合;若 reduce 轴位于 leading 维,规约需要跨迭代累加,融合后结果是错的。对可融合情形,现有 TRowSumLine tile 模板天然兼容 2 维 loop 张量(axis 归一化到 5 维坐标系下恒为 3),无需修改模板。 变更内容: - SUPPORT_VF_FUSE_OPS 中增加 Opcode::OP_ROWSUMLINE,使 ROWSUMLINE 可编入 VF 融合 loop 组 - 注册 loop body tensor 时跳过 ROWSUMLINE 复用的 tmp buffer(ID1),与 _SINGLE 系列 reduce 算子保持一致 - LoopaxesProc 中按 reduce 轴做编组门控:携带 reduce AXIS 属性的算子,仅当轴落在输入 tensor 最后 2 维内时才允许加入 VF 组,否则断组走原有全维生成路径 ## 附带修复:ASan UTest 退出阶段崩溃 ### 问题描述 现象:ASan UT(Cpp-Clang-1x/2x/3x)所有用例 [ PASSED ],但每个进程在退出阶段崩溃,CI 失败: text Tracer caught signal 11: addr=0x43xxx ==xxxx==LeakSanitizer has encountered a fatal error. → 进程退出码 1 根因链(CANN 库 × 进程退出时序): text 每个 UT 进程 ├─ 静态初始化:两条路径 dlopen CANN 库 │ ① REGISTER_BACKEND_OP → BackendCCE → CreateSoC → CannRuntime → libruntime.so │ ② platform 查询 → CannHostRuntime → libprofapi/libruntime/libascendcl │ └─ 退出(glibc atexit 按注册逆序执行): ① TU 静态析构 + _dl_fini(运行所有已加载 .so 的析构,含 CANN 库) ← 先执行 ② LeakSanitizer 退出检查(ASan preinit 期注册,最后执行) ← 后执行 └─ CANN 库在退出链遗留的失效状态(线程/TLS)→ tracer SIGSEGV 触发源为 CI 环境 nightly CANN 包内容变化。无 NPU 构建机上 SoC 查询本就恒定失败并回退默认值,这两条加载路径在 UT 中属无收益的风险源。 ### 修改逻辑 思路:UTest 构建下双端均不加载 CANN 运行时(编译期裁剪),非 UTest 构建行为不变。 | 提交 | 文件 | 改动 | 作用 | |---|---|---|---| | edde29027 | cann_runtime.cpp | 构造函数加载逻辑包进 #ifdef BUILD_WITH_CANN | 堵路径①:tile_fwk_interface 在 UTest 构建本就不定义该宏(interface/CMakeLists.txt 既有设计),原代码未判断宏、无条件 dlopen,补上判断即编译期裁剪 | | 8e18b71b1 | cann_host_runtime/CMakeLists.txt | BUILD_WITH_CANN 定义加 NOT ENABLE_UTEST 条件 | 堵路径②:源码本有 #ifdef BUILD_WITH_CANN,但该目标无条件定义宏,UT 构建仍会加载;对齐 adapter 既有门控模式 | | 27a8ae3c8 | executable.py | 枚举失败时打印被捕获的子进程 stdout/stderr | 纯诊断:此前 check=True 子进程失败时输出被吞,CI 日志看不到真实报错 | 为什么两条都要堵:只堵单边会被另一条路径复活——此前仅门控 CannRuntime 的版本,1x/2x/3x 仍复现退出崩溃(CannHostRuntime 路径存活)。 行为影响:UTest 构建 = 不加载 + 走默认规格(与无 NPU 构建机现状等价);非 UTest 且 BUILD_WITH_CANN=ON = 加载照旧;BUILD_WITH_CANN=OFF = 原先也是加载失败回退默认值,仅少两条告警。 ## 验证 pypto-gym mhc_sinkhorn / mhc_pre 全部用例通过(同时覆盖可融合的 row_sum 与不可融合的 col_sum 场景,含 bs8/bs64/bs128/bs1024 的 golden 精度对比),pypto ST 用例回归通过。 Related Issues: cann/pypto#3550 See merge request: cann/pypto!6860 | 1 month ago | |
feat(matmul): Remove reshape from batchmatmul by direct 3D/4D tensor flow Co-authored-by: li_qingyan<liqingyan10@h-partners.com> # message auto-generated for no-merge-commit merge: !7094 merge feat/batchmatmul-remove-reshape into master feat(matmul): Remove reshape from batchmatmul by direct 3D/4D tensor flow Created-by: li_qingyan Commit-by: li_qingyan Merged-by: cann-robot Description: ## 变更说明 删除 batchmatmul 链路中的冗余 Reshape:A_MUL_B 直接接受 3D/4D 参数输入,全链路支持带 batch 轴的多维 tile。 ### 变更原因 {1,m,k} 与 {m,k} 内存布局相同,逐 batch 拆解插入的 Reshape 涉及 Pass 层做特判,耦合严重,问题高发,且会放大 TensorGraph/TileGraph 规模、增加 pass 处理量与编译耗时。 旧: View{b,m,k}→{1,m,k} → Reshape→{m,k} ─┐ View{b,k,n}→{1,k,n} → Reshape→{k,n} ─┤→ A_MUL_B(2D){m,n} → Reshape→{1,m,n} → Assemble 新: View{b,m,k}→{1,m,k} ─┐ View{b,k,n}→{1,k,n} ─┴→ A_MUL_B(3D/4D){1,m,n} → Assemble ### 方案 各层统一 batch 轴约定:shape 恒 1、offset 恒 0。修改归为三类: 1. tile/offset 在 batch 轴补 1/0,与输入同 rank(规避 LogicalTensor::View / GetViewValidShape 的 rank 硬校验) 2. GM 搬运侧 batch 轴 offset 按 stride 线性化累加进 gmOffset;L1/L0 内部保持纯 2D 语义,batch 轴 offset 恒 0 See merge request: cann/pypto!7094 | 19 days ago | |
feat(Operation): Add pypto.conv_backward_filter and its 2D implementation on A2/A3 Co-authored-by: Zehai<wangzehai3@huawei.com> Co-authored-by: hongyiliu111<liuhongyi1@huawei.com> Co-authored-by: yuxin5<yuxin5@huawei.com> Co-authored-by: xutianlong1<xutianlong1@huawei.com> Co-authored-by: zhouxuan78<zhouxuan78@huawei.com> # message auto-generated for no-merge-commit merge: !6752 merge dev into master feat(Operation): Add pypto.conv_backward_filter and its 2D implementation on A2/A3 Created-by: yuxin5 Commit-by: Zehai;yuxin5;zhouxuan78;xutianlong1;royccc;hongyiliu111 Merged-by: cann-robot Description: feat(Operation): Add pypto.conv_backward_filter and its 2D implementation on A2/A3 Add pypto.conv_backward_filter interface to compute the gradient of convolution with respect to the weight tensor, and implement its 2D support spanning the frontend interface, backend operation implementation and MTE codegen Changes: - Add pypto.conv_backward_filter frontend interface with parameter validation - Implement ConvBackwardFilter 2D backend operation and codegen - Add UT/ST test cases for the 2D implementation See merge request: cann/pypto!6752 | 1 month ago | |
fix(pypto_pro): Align fillpad validation and lowering with PTO ISA Validate fillpad buffer compatibility and restrict Mat tiles to NORMAL mode with NZ layout and null/zero padding. Reuse structural_equal on underlying Tile types while ignoring mutex wrappers, and preserve the existing Vec padding and source-alias behavior. Skip the null-pad source alias for Mat and derive NORMAL's synchronization pipe from the destination buffer (Mat: MTE2, Vec: V). Update the L1 padding documentation and add IR, codegen and synchronization regression coverage, including the Mat codegen golden. | 16 days ago | |
perf(machine): Claim stitch-cache edges before HandleOneStitch to cut duplicate GetOperationStitch work Co-authored-by: songyangyang18<songyangyang18@huawei.com> # message auto-generated for no-merge-commit merge: !7449 merge perf into master perf(machine): Claim stitch-cache edges before HandleOneStitch to cut duplicate GetOperationStitch work Created-by: songyangyang18 Commit-by: songyangyang18 Merged-by: cann-robot Description: ## 1. 背景 Cell-match / FullCover / Hub / WorkspaceReuse 等路径会反复触达同一 (producer, consumer) 边。原先典型顺序是: 1. 取 GetOperationStitch(producer)(可能触发分配 / 列表准备) 2. 进入 HandleOneStitch 3. 在函数内部做 CheckStitchCacheDuplicate;若已建过边则直接返回 同一边被 walk 扫到 N 次时,真正建边只需 1 次;其余 N−1 次仍会付出 GetOperationStitch 与进函数的开销,再被 cache 丢掉。PerfEvt 上 FAST_STITCH 偏高,而最终 dyn_topo 边集合不变——多出来的是重复尝试建边的白跑,不是多建了边。 优化做法:把 CheckStitchCacheDuplicate 提前到 HandleOneStitch 之前;hit 则根本不取 stitch list、不进 HandleOne。所有建边调用点统一同一契约。 ### 1.1 修改前后调用栈(重复边 / cache hit) 收益发生在 **同一边第 2…N 次触达**。下面两路是主要形态;框内标注 ★ 白跑 / ★ 优化。 > **当前 API**:只保留带 producerStitchList 的 HandleOneStitch;无 list 重载已删除。调用方在 claim miss 后自行 GetOperationStitch,再传入 HandleOne。HandleOne 内不再 claim。 #### A. Cell-match(EstablishDependenciesWithType / HandleCellMatchFull / Slow overlap) 修改前常见路径是进 HandleOne 后再取 list / claim(或无 list 重载内部转发)。 **修改前 — 每次触达都进栈,hit 才 return:** text EstablishDependenciesWithType / HandleCellMatchFull::Process └─ HandleOneStitch(...) ├─ GetOperationStitch(producer) ★ 白跑(hit 时仍执行) ├─ CheckStitchCacheDuplicate → hit └─ return (未 PushBackTask) **修改后 — claim 提到调用方;hit 直接 continue,下面整段不进:** text EstablishDependenciesWithType / HandleCellMatchFull::Process ├─ CheckStitchCacheDuplicate → hit ★ 优化:提前判重 └─ continue ★ 优化:跳过以下全部 ✗ GetOperationStitch ✗ HandleOneStitch(... /* 有 list */) ✗ PushBackTask 修改前: mermaid flowchart TB B1["EstablishDependencies / HandleCellMatchFull"] --> B2["HandleOneStitch"] B2 --> B3["GetOperationStitch ★白跑"] B3 --> B4["CheckStitchCacheDuplicate hit → return"] 修改后: mermaid flowchart TB A1["EstablishDependencies / HandleCellMatchFull"] --> A2["CheckStitchCacheDuplicate hit ★优化"] A2 --> A3["continue:不取 list / 不进 HandleOne ★优化"] 首次 miss(真正建边)修改后:claim(miss 并写入) → GetOperationStitch → HandleOneStitch(list) → PushBackTask;与修改前最终边集合一致,只是 claim 位置前移、且无 list 重载已去掉。 #### B. Hub / FullCover producer / WorkspaceReuse(一对多) 修改前在进 consumer 循环**之前**就取 list;循环内每次进 HandleOne,由内部 claim。 **修改前:** text FullCoverUpdateStitch / StitchForWorkspaceReuse / ... ├─ GetOperationStitch(producer) ★ 白跑:循环前必取;全 hit 时也已付出 └─ for each consumer: └─ HandleOneStitch(... /* 有 list */) ├─ CheckStitchCacheDuplicate → hit └─ return **修改后 — 先 claim;list 仅在第一次真正建边时 lazy 取一次:** text FullCoverUpdateStitch / FullCoverPartialProdToFullConsStitch / StitchForWorkspaceReuse ├─ hoist: stitchCache / stride / epoch ← workspace_ ★ 微优化:循环外一次 └─ for each consumer: ├─ CheckStitchCacheDuplicate │ ├─ hit → continue ★ 优化:不取 list、不进 HandleOne │ └─ miss → │ ├─ GetOperationStitch(仅首次) ★ 优化:lazy,全 hit 时零次 │ └─ HandleOneStitch(list) → PushBackTask 修改前: mermaid flowchart TB P1["GetOperationStitch 循环前 ★白跑"] --> P2["for consumer"] P2 --> P3["HandleOneStitch"] P3 --> P4["CheckStitchCacheDuplicate hit → return"] 修改后: mermaid flowchart TB Q0["hoist stitch-cache getters from workspace_"] --> Q1["for consumer"] Q1 --> Q2{"CheckStitchCacheDuplicate ★优化前置"} Q2 -->|hit| Q3["continue ★跳过 list + HandleOne"] Q2 -->|miss 首次| Q4["lazy GetOperationStitch"] Q4 --> Q5["HandleOneStitch(list) → PushBackTask"] --- ## 2. 方案 ### 2.1 核心契约 text CheckStitchCacheDuplicate(...) == true → 边已存在(或本轮已被 claim)→ continue / return,不进 HandleOne CheckStitchCacheDuplicate(...) == false → 本调用方刚写入 cache → 按需 GetOperationStitch + HandleOneStitch HandleOneStitch 内部不再做第二次 claim CheckStitchCacheDuplicate 按 (epoch, taskId_lo16, producerFunc, consumerFunc) 打包写入 stitchCache[consumerOpIdx * stride + producerOpIdx];相等则视为 duplicate。 ### 2.2 覆盖路径 | 路径 | 位置 | |------|------| | Cell-match enhanced deps | EstablishDependenciesWithType | | FullCover cell-match | HandleCellMatchFull::Process | | Partial→FullCover 直连 | FullCoverPartialProdToFullConsStitch | | FullCover hub / producer 列表 | FullCoverUpdateStitch | | Workspace reuse | StitchForWorkspaceReuse | 不改算子、不改 cellShape、不改最终边集合;只裁掉注定被 cache 丢掉的前置工作。 --- ## 3. 实现要点 ### 3.1 Claim 前置(cell-match) EstablishDependenciesWithType / HandleCellMatchFull:在调用 HandleOneStitch 前 claim;hit 则 continue / return 0。 主线合入 Fast/Slow NORMAL_WRITE 后,Slow 路径 CellMatchStitchOverlappingNormalWrites 同样在 HandleOne 前 claim(与 Fast 契约一致)。 ### 3.2 Hub / FullCover / Reuse:claim + lazy list cpp DevAscendFunctionDuppedStitchList* producerStitchList = nullptr; for (/* each consumer */) { if (CheckStitchCacheDuplicate(...)) { continue; } if (producerStitchList == nullptr) { producerStitchList = &prevDup.GetOperationStitch(producerOpIdx, false); } DeviceStitchContext::HandleOneStitch(..., *producerStitchList, ...); } ### 3.3 HandleOneStitch 契约 Caller must claim the edge via CheckStitchCacheDuplicate before calling;函数内不再 claim。 **只保留**带 producerStitchList 的静态重载:做 PushBackTask / pred 计数 / dead-end 清理。 无 list、内部 GetOperationStitch 再转发的重载已删除——调用方在 claim miss 后显式取 list 再传入。 ### 3.4 微优化:stitch-cache getters hoist FullCoverUpdateStitch / FullCoverPartialProdToFullConsStitch / StitchForWorkspaceReuse / EstablishDependenciesWithType 等在循环外一次取出: cpp uint64_t* stitchCache = workspace_->StitchCacheAddr(); // 或 workspace-> const uint32_t stitchCacheStride = workspace_->StitchCacheStride(); const uint16_t stitchCacheEpoch = workspace_->StitchCacheEpoch(); 热路径假定 **已 Init 的 workspace_**(生产路径 DeviceStitchContext::Init 会绑定)。不做 lazy 判空,避免每边多一次分支。 ### 3.5 UT 适配 FullCoverUpdateStitch 入口即 hoist 读 workspace_,裸构造 DeviceStitchContext 再调 FullCover 会空指针。 相关 UT(FullCoverUpdateStitchTest.*)须绑 MiniStitchWorkspace(见 test_cell_match_dynamic.cpp):填 stitchCacheAddr_ / stride / epoch,BindStitchWorkspace(ctx, ws)。 其它只测 DumpStitchInfo / MoveTo 的 DeviceStitchContext UT 不进 FullCover,无需改。 --- ## 4. 测试结果 环境:A3,machine_perf_A3。A/B:claim 在 HandleOne 内且先 GetOperationStitch vs early claim + lazy list(+ hoist)。 主证据:**AICPU FAST_STITCH / STAGE_STITCH**(UPDATE_SLOT 应近似持平);e2e 作辅证。 ### 4.0 主线 rebase 复测(2026-11-12,cann/pypto master @ f19d53b39 + 适配 commit 0162db20f) 产物:/tmp/a3_early_claim_ab/mainline_runs/。适配点:保留主线 Fast/Slow cell-match;Slow overlap 写路径补 early claim。 #### LIQ case 61(high_throughput eager)— AICPU 首次 dump | 指标 | before | after | Δ | |------|--------|-------|---| | FAST_STITCH total_us | 3204 | 2273 | **−29.1%** | | STAGE_STITCH total_us | 4204 | 3273 | **−22.1%** | | CONTROL_FLOW total_us | 6228 | 5297 | −14.9% | | UPDATE_SLOT total_us | 941 | 943 | ~0% | | e2e_core_time | 5746 | 4985 | **−13.3%** | #### LIQ case 63(high_throughput_uniform eager)— AICPU 首次 dump | 指标 | before | after | Δ | |------|--------|-------|---| | FAST_STITCH total_us | 2954 | 1983 | **−32.9%** | | STAGE_STITCH total_us | 3972 | 2991 | **−24.7%** | | CONTROL_FLOW total_us | 5617 | 5323 | −5.2% | | UPDATE_SLOT total_us | 962 | 952 | ~0% | | e2e_core_time | 5218 | 5187 | −0.6% | 两 case 的 STAGE/FAST count 均为 449;UPDATE_SLOT 持平 → 收益仍钉在建边路径。与 rebase 前量级一致(FAST ≈ −29% / −33%)。 See merge request: cann/pypto!7449 | 18 days ago | |
fix(pass): Preserve alias-anchoring inplace reshapes to fix alias-write precision Co-authored-by: zhangxiangjie<zhangxiangjie5@huawei.com> # message auto-generated for no-merge-commit merge: !7460 merge fix-intra-subgraph-adapter-error-1109 into master fix(pass): Preserve alias-anchoring inplace reshapes to fix alias-write precision Created-by: zhangxiangjie Commit-by: zhangxiangjie Merged-by: cann-robot Description: ## 1. 问题描述 对 base 张量做就地 reshape 生成别名张量后,经 assemble 向共享同一底层存储(raw)的兄弟张量写回,**别名写路径出现严重精度异常**: - 拓扑: base tensor7(raw3, [129,128]) --inplace reshape--> alias tensor9(raw7, [258,64])(alias 零消费者);assemble 写兄弟 tensor11(与 alias 共享 raw7),元素总数 16512 等价。 - 现象:别名写 [258,64] 校验失败,误差签名 mare≈4501.0 / mere≈247.06 / rmse≈8160.19;别名读对照路径正常。 ## 2. 根因分析 **inplace reshape 是别名(alias)回绑 base 的唯一 IR 链接**,但它在图优化早期被两个消除点以"直接消费者"为依据过早清除: 1. **Pass_01 RemoveRedundantReshape**:以"输出 alias 零消费者"判定该 reshape 冗余并移除。 2. **Pass_06 MergeViewAssemble 内 DeadOperationEliminator**:标记-清除活性算法(outcast 生产者 + dontTouch 反向 BFS),alias 零消费者反向不可达,被判为死代码清除。 IR 链接断裂后,Pass_27 ReplaceTensor 的正常遍历(UniteTensor / FindBaseTensor / Backward / ForwardProcess)无法为别名 raw 建立绑定,只能依赖末端 replace_tensor.cpp 的 **memoryId 回填补丁**物化 actualRawmagic;codegen dev_encode.cpp HandleActualRaw 再按 actualRawmagic 路由写地址。一旦回填未覆盖该别名形态,写地址路由错误 → 精度异常。 > 本质:消除点只看到"reshape 输出无直接消费者",未识别"该 reshape 承载着下游存储别名关系"这一语义,属于**别名绑定语义契约被破坏**,而非单点偶发问题。 ## 3. 修复方案 ### 3.1 设计原则 以**通用规则**恢复语义契约,而非针对 issue5 的特判:凡移除某 inplace reshape 会破坏下游别名关系(仍有兄弟张量独立使用其输出 raw 存储),则该 reshape 是**活跃别名链接**,任何消除点都必须保留。保留后,reshape 存活至 ReplaceTensor,由正常遍历完成绑定,末端回填补丁不再必需,予以删除。 ### 3.2 具体改动 1. **新增共享谓词 GraphUtils::InplaceReshapeRemovalBreaksAlias**(graph_utils.h/.cpp) 判定条件:isInplace 且 inRaw.rawmagic != outRaw.rawmagic,且存在兄弟张量共享 alias 的 rawmagic 并仍带 producer/consumer → 返回 true(移除会断裂别名)。提取为 GraphUtils 静态方法,作为两处消除点的**单一真源**。 2. **RemoveRedundantReshape 接入守卫**(remove_redundant_reshape.cpp) 冗余移除前调用共享谓词,命中则保留该 inplace reshape。 3. **DeadOperationEliminator 接入守卫**(dead_operation_eliminate.cpp) 在标记-清除前,将命中谓词的 inplace reshape 作为**活性根种子**(visited + queue),使其反向可达、不被判死。 4. **删除 ReplaceTensor 末端 memoryId 回填**(replace_tensor.cpp,−21 行) reshape 存活后正常遍历即可建立 alias raw.actualRawmagic = base rawmagic,回填补丁失去存在必要,删除以简化代码、消除掩盖态。 See merge request: cann/pypto!7460 | 16 days ago | |
feat(kirin9050): Support matmul macro instruction with pre-stage quant/dequant Co-authored-by: m0_71310678<lizhexun2@huawei.com> # message auto-generated for no-merge-commit merge: !7126 merge kirin9050-matmul-mergepr into master feat(kirin9050): Support matmul macro instruction with pre-stage quant/dequant Created-by: m0_71310678 Commit-by: m0_71310678 Merged-by: cann-robot Description: feat(kirin9050): Support matmul macro instruction with pre-stage quant/dequant Support Kirin9050 matmul macro instruction bring-up: - macro matmul codegen/tileop (attrs, quant, inplace, infer), decoupled from generic path - route quant_pre through macro matmul; GEMV routing and fp16/int8 K-slice clamps - L1->GM TSTORE direct store, l12ub/ub2l1 support - rework matmul quant UT ids, shapes and tile-split coverage (Q16.16 semantics) Changes: - Add Kirin9050 (NCH) LiteNPU platform support and matmul macro instruction codegen/tileop - Add l12ub/ub2l1 data path and per-channel quant_pre routing through macro matmul - Add Kirin9030/Kirin9050/KirinX90 codegen UT coverage for matmul, attention and other single operations See merge request: cann/pypto!7126 | 1 month ago | |
fix: Correct lrelu arguments, source location cleanup, directory retention and argsort docs Co-authored-by: Aiden<linking_sky@outlook.com> # message auto-generated for no-merge-commit merge: !7206 merge fix/consolidate-four-prs into master fix: Correct lrelu arguments, source location cleanup, directory retention and argsort docs Created-by: linking_sky Commit-by: Aiden Merged-by: cann-robot Description: ## 描述 Tensor.lrelu 多声明了一个 other 参数,调用 pypto.lrelu 时传入多余参数,导致默认调用和显式传入斜率时失败。pypto.lrelu 的输入参数名 other 与文档中的 input、注释中的 a 不一致,使用 input= 关键字调用会失败。 op_wrapper 和 source_location 在被包装函数抛出异常时未清理源码位置状态,导致后续算子使用错误的源码位置。 RemoveOldDirectories 按目录修改时间升序排序后删除超出保留数量的目录,实际保留旧目录、删除新目录。 argsort 文档中的 descending 默认值为 True,与实际实现的 False 不一致。 ## 修复 移除 Tensor.lrelu 中多余的 other 参数,正确传递当前张量和 negative_slope。将 pypto.lrelu 的输入参数名统一为 input,同步更新实现和注释。 在 op_wrapper 和 source_location 中使用 try/finally,确保异常发生后仍清理源码位置状态。 将历史目录按修改时间降序排序,保留最新目录,并补充目录保留顺序、保留数量边界及前缀过滤测试。 修正 argsort 文档中的默认值,明确默认按升序返回索引,并同步更新 docstring。 ## 测试 - Tensor.lrelu 通过 A3 环境测试,验证默认调用、位置参数、关键字参数和 native graph。 ### 关联ISSUE ISSUE:[#3685](https://gitcode.com/cann/pypto/issues/3685) See merge request: cann/pypto!7206 | 1 month ago | |
refactor(operator): Remove tile_fwk_operator library and associated tests. Co-authored-by: chai-hw<chaizhengtong@huawei.com> # message auto-generated for no-merge-commit merge: !5704 merge delete_test into master refactor(operator): Remove tile_fwk_operator library and associated tests. Created-by: chai-hw Commit-by: chai-hw Merged-by: cann-robot Description: 整改库上代码,删除 framework/src/operator python/tests/st/operator/glm python/tests/st/operator/test_page_attention.py 以及相关涉及文件 See merge request: cann/pypto!5704 | 3 months ago |
| Files | Last commit | Last update |
|---|---|---|
| 1 month ago | ||
| 1 month ago | ||
| 19 days ago | ||
| 1 month ago | ||
| 16 days ago | ||
| 18 days ago | ||
| 16 days ago | ||
| 1 month ago | ||
| 1 month ago | ||
| 3 months ago |