| Files | Last commit | Last update |
|---|---|---|
fix(pypto_pro): Aicpu kernel bugfix Co-authored-by: chen-yongkang16<chenyongkang16@huawei.com> # message auto-generated for no-merge-commit merge: !7672 merge master into master fix(pypto_pro): Aicpu kernel bugfix Created-by: huangyuqian Commit-by: chen-yongkang16 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!7672 | 7 days ago | |
feat(pypto_pro): validate intra-core tile-group slot lifetime Co-authored-by: m0_55221889<chenliwen12@huawei.com> # message auto-generated for no-merge-commit merge: !7539 merge feat/pipeline-local-slot-pc into master feat(pypto_pro): validate intra-core tile-group slot lifetime Created-by: m0_55221889 Commit-by: m0_55221889 Merged-by: cann-robot Description: ### 背景 跨核 buffer 已有 fwd/bwd 事件 id、单生产者/单消费者、depth >= gap + 1 等校验; 但核内 tile group 只有 mutex_ids 保证访问互斥,没有槽位生命周期校验。 这会导致两类问题在编译期静默通过: 1. 延迟 stage 使用 current() / previous() 时读到别的 task 的数据; 2. 槽数不足时生产者覆盖尚未消费的槽。 ### 修改意图 不强制用户把访问改写成 task % depth,而是由 parser 记录每次真实的 slot 选择, 分析阶段按 cursor 回放,校验实际槽位的单生产者/单消费者、容量和代际关系。 动态索引如果依赖无法静态求值的 runtime 值,则发出警告并跳过该 group,避免误报。 ### 主要改动 - Parser 层 - 新增 SlotSelector(kind, slot, index_node, order),kind 使用 SelectorKind(IntEnum)。 - 每次 next/current/previous/index 调用创建一个 selector 对象;同一个 tile 的 多个 operand、别名和合并值共享该对象,用于去重和恢复选择顺序。 - BufferRef 持有 selector,不再散落 kind/index_node/selector_id。 - Analyzer 层 - StageOpAccess 的 operand 使用 OperandFact(position, keyword, names, selectors)。 - stage_accesses 一遍扫描产出统一的 StageAccess(buffer, role, pipe, selector): - 跨核侧按 role is not None 过滤; - 本地侧按 selector is not None 过滤。 - 新增 analyze_local_slot_events:按 beat、stage 源码顺序、selector 顺序回放 cursor, 生成 (beat, task, stage, kind, order, slot) 事件。 - 校验层 - _validate.py 只保留校验函数: - validate_local_slot_lifetime - _check_slot_pair - _check_slot_events - _check_slot_pair 检查每个 slot: - 单 producer / 单 consumer; - producer 必须在 consumer 之前; - 必须同核; - depth >= consumer.delay - producer.delay + 1。 - _check_slot_events 按 beat 维护 generation/pending: - 覆盖未消费 → 报错; - 读到错误 generation → 报错; - 生产后从未消费 → 报错。 - 动态索引无法求值时发出 PyptoProWarning,并跳过该 group。 - 跨核 buffer 不进入本地校验,原有跨核同步逻辑不变。 ### 行为示例 | 场景 | 结果 | |---|---| | sc_db depth=1,preload=2,消费者 current() | 报需要 3 个 slot | | sc_db depth=3,消费者 current() | 报 consumer task 0 读到 slot2/generation2 | | 消费者 db[k % DEPTH] | 通过 | | 消费者 db[(k + 1) % DEPTH] | 报读错代 | | serial + current() | 通过 | | previous() + gap=2 | 报读错代 | ### 测试 新增 UT:python/tests/ut/pypto_pro/runtime/pipeline/test_local_slot_lifetime.py 覆盖: - 槽数不足; - current() 延迟读错代; - 正确/错误显式索引; - serial current() 通过; - previous() gap=2 读错代; - 动态索引无法求值时发出警告。 已验证: ### 已知边界 - 跨核仍使用 task % depth 契约,不校验 current/previous 语义。 - 本地动态索引无法静态求值时只警告并跳过,不做保守推断。 - 全 next / 全 current 的 scratch ring 不按 P/C 校验。 - 本地地址复用目前按 buffer 分析,未合并到 region 级生命周期。 - 分支控制流未建模,按静态路径回放。 See merge request: cann/pypto!7539 | 1 day ago | |
feat(pypto_pro): Add make_list_tensor_desc for DYNAMIC inputs Co-authored-by: h9718w<wangchaoyuan10@huawei.com> # message auto-generated for no-merge-commit merge: !7493 merge feat-list-tensor-desc into master feat(pypto_pro): Add make_list_tensor_desc for DYNAMIC inputs Created-by: h9718w Commit-by: h9718w Merged-by: cann-robot Description: ## 问题与原因 PR #6777(dynamic_input_ptr / dynamic_input_dim)的遗留后续:ST 用例与两处 API 文档示例各自复制了一份手工构造 list-tensor 描述符的本地辅助函数,直接 launch 的调用方需要到处复制布局代码。 ## 修改内容 - 新增 pypto_pro.language.make_list_tensor_desc(addrs, shape=None):纯 Python 的 host 侧构造器(不依赖 AscendC),覆盖 dim=0 仅地址形式与 dim!=0 含形状形式,编码布局与 AscendC ListTensorDesc 的解码一致 - shape 支持两种形式:扁平 list[int] 为所有 Tensor 共享同一形状(向后兼容);嵌套 list[list[int]] 逐 Tensor 指定各自的轴长(如 [[33,34,35],[23,24,25]]),长度须与 addrs 一致;dim 为全局唯一、struct 步长统一,因此各 Tensor 维数必须相同 - 用新 API 替换 ST 用例及 dynamic_input_ptr / dynamic_input_dim 文档示例中重复的 _build_list_tensor_desc / _build_list_tensor_desc_dim1 辅助函数 - 新增 UT 覆盖两种描述符形式、逐 Tensor shape 布局与参数校验(数量不匹配、维数不一致、混合形式拒绝);新增 API 文档页 make_list_tensor_desc.md 并注册到资源管理目录树 - 文档布局归属调整:两种打包布局示意图集中在 make_list_tensor_desc.md 的约束说明中(作为描述符构造契约),dynamic_input_ptr.md / dynamic_input_dim.md 的约束说明改为链接指向 ## 测试 - UT:test_list_tensor.py 16/16 通过(含逐 Tensor shape 布局与拒绝路径) - ST(Ascend950PR):test_dynamic_input_dim 设备侧验证 dim=1/2/3 共享 shape 及逐 Tensor shape(tensor 1 读到自己的 [6,7])解码正确;test_dynamic_input_ptr 回归通过 Related PR: #6777 See merge request: cann/pypto!7493 | 9 days ago | |
test(pypto_pro): supplement custom kernel naming coverage Co-authored-by: gcw_bTlukKC6<xuxinlei1@huawei.com> # message auto-generated for no-merge-commit merge: !7635 merge docs-pro-sync-0902 into master test(pypto_pro): supplement custom kernel naming coverage Created-by: gcw_bTlukKC6 Commit-by: gcw_bTlukKC6 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!7635 | 7 days ago | |
feat(pypto_pro): Support CAP_1/2 early-start in ACLNN SK Co-authored-by: gaoxiang<gaoxiang26@huawei.com> # message auto-generated for no-merge-commit merge: !7450 merge sk_1106 into master feat(pypto_pro): Support CAP_1/2 early-start in ACLNN SK Created-by: z_noahor Commit-by: gaoxiang Merged-by: cann-robot Description: based on PR#7415 See merge request: cann/pypto!7450 | 14 days ago | |
refactor(dist): Fold window memory registration and connect into create_window Co-authored-by: tsungl4<lidongsheng4@huawei.com> # message auto-generated for no-merge-commit merge: !7776 merge channel1 into master refactor(dist): Fold window memory registration and connect into create_window Created-by: tsungl4 Commit-by: tsungl4 Merged-by: cann-robot Description: The previous window setup required a strict 3-step protocol (create_window -> register_memory -> connect), which was easy to misuse: a temporary tensor passed to register_memory could be garbage-collected while the window still referenced its address, region names had to be kept identical across ranks by hand, a not-yet-connected window had to be rejected at launch time, and the jetty table was allocated and copied to device even when no region used the URMA plane (kernels never touch it there). This PR simplifies the flow to a single collective call and skips the useless jetty work. See merge request: cann/pypto!7776 | 2 days ago | |
perf(pypto_pro): reduce exception dump launch overhead Co-authored-by: fa<yangzf993@163.com> # message auto-generated for no-merge-commit merge: !7531 merge new_11 into master perf(pypto_pro): reduce exception dump launch overhead Created-by: fafafafafa Commit-by: fa 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!7531 | 8 days ago | |
refactor(ir): Store PtrType element type as TypePtr Co-authored-by: tsungl4<lidongsheng4@huawei.com> # message auto-generated for no-merge-commit merge: !7790 merge ptr1 into master refactor(ir): Store PtrType element type as TypePtr Created-by: tsungl4 Commit-by: tsungl4 Merged-by: cann-robot Description: Replace DataType dtype_ with TypePtr type_ so a pointer may point at non-scalar element types, and also remove two unused field. See merge request: cann/pypto!7790 | 1 day ago | |
fix(pypto_pro): emit C linkage for stable kernel symbols Co-authored-by: gcw_bTlukKC6<xuxinlei1@huawei.com> # message auto-generated for no-merge-commit merge: !7472 merge docs-pro-sync-0902 into master fix(pypto_pro): emit C linkage for stable kernel symbols Created-by: gcw_bTlukKC6 Commit-by: gcw_bTlukKC6 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!7472 | 9 days ago | |
feat(pypto_pro): Add make_list_tensor_desc for DYNAMIC inputs Co-authored-by: h9718w<wangchaoyuan10@huawei.com> # message auto-generated for no-merge-commit merge: !7493 merge feat-list-tensor-desc into master feat(pypto_pro): Add make_list_tensor_desc for DYNAMIC inputs Created-by: h9718w Commit-by: h9718w Merged-by: cann-robot Description: ## 问题与原因 PR #6777(dynamic_input_ptr / dynamic_input_dim)的遗留后续:ST 用例与两处 API 文档示例各自复制了一份手工构造 list-tensor 描述符的本地辅助函数,直接 launch 的调用方需要到处复制布局代码。 ## 修改内容 - 新增 pypto_pro.language.make_list_tensor_desc(addrs, shape=None):纯 Python 的 host 侧构造器(不依赖 AscendC),覆盖 dim=0 仅地址形式与 dim!=0 含形状形式,编码布局与 AscendC ListTensorDesc 的解码一致 - shape 支持两种形式:扁平 list[int] 为所有 Tensor 共享同一形状(向后兼容);嵌套 list[list[int]] 逐 Tensor 指定各自的轴长(如 [[33,34,35],[23,24,25]]),长度须与 addrs 一致;dim 为全局唯一、struct 步长统一,因此各 Tensor 维数必须相同 - 用新 API 替换 ST 用例及 dynamic_input_ptr / dynamic_input_dim 文档示例中重复的 _build_list_tensor_desc / _build_list_tensor_desc_dim1 辅助函数 - 新增 UT 覆盖两种描述符形式、逐 Tensor shape 布局与参数校验(数量不匹配、维数不一致、混合形式拒绝);新增 API 文档页 make_list_tensor_desc.md 并注册到资源管理目录树 - 文档布局归属调整:两种打包布局示意图集中在 make_list_tensor_desc.md 的约束说明中(作为描述符构造契约),dynamic_input_ptr.md / dynamic_input_dim.md 的约束说明改为链接指向 ## 测试 - UT:test_list_tensor.py 16/16 通过(含逐 Tensor shape 布局与拒绝路径) - ST(Ascend950PR):test_dynamic_input_dim 设备侧验证 dim=1/2/3 共享 shape 及逐 Tensor shape(tensor 1 读到自己的 [6,7])解码正确;test_dynamic_input_ptr 回归通过 Related PR: #6777 See merge request: cann/pypto!7493 | 9 days ago | |
refactor(pypto_pro): rename internal A5/A6 and drop A2/A3 remnants Co-authored-by: gcw_bTlukKC6<xuxinlei1@huawei.com> # message auto-generated for no-merge-commit merge: !7357 merge newbranch into master refactor(pypto_pro): rename internal A5/A6 and drop A2/A3 remnants Created-by: gcw_bTlukKC6 Commit-by: gcw_bTlukKC6 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!7357 | 21 days ago | |
fix(pypto_pro): reject static tile slice ends beyond bounds Co-authored-by: fa<yangzf993@163.com> # message auto-generated for no-merge-commit merge: !7571 merge new into master fix(pypto_pro): reject static tile slice ends beyond bounds Created-by: fafafafafa Commit-by: fa 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!7571 | 1 day ago | |
feat(pro): Improve frontend diagnostics and contract checks Co-authored-by: ddddwee1<chengyu996@gmail.com> # message auto-generated for no-merge-commit merge: !6868 merge codex/pro-diagnostics into master feat(pro): Improve frontend diagnostics and contract checks Created-by: ddddwe Commit-by: ddddwee1 Merged-by: cann-robot Description: Pro frontend errors and warnings carry DSL call and argument locations. Tile builder validation uses an explicit span when supplied and inherits current_span when omitted, including nested reinterpretation and capacity warnings. Capacity lookup failures produce located CapacityUnknown warnings for bounded on-chip buffers, including MX ScaleLeft/ScaleRight; DDR does not trigger this warning. Tile capacity checks raise OutOfRange immediately on the first over-capacity declaration, in both normal compilation and pipeline probe parsing. Error rendering can omit source previews while preserving error codes, locations, hints and notes. Tests explicitly inspect the error message or rendered diagnostic, keeping assertions independent of source previews and pytest internals. TileType equality checks effective MemRef presence and memory space. A known memory reference differs from an unspecified one; two unspecified references can match. Allocation addresses and sizes do not participate in type equality. Packed host shape binding normalizes the last axis of 4-bit tensors directly; explicit static_shapes already count logical elements. Compile-time binding and launch validation share accepted Torch storage dtypes: sub-byte data uses uint8, with native Torch FP4 also accepted for FP4E2M1. FP8 supports its matching Torch dtype or a uint8 carrier. INT16 and UINT16 each accept torch.int16 or torch.uint16 as bit-preserving 16-bit storage carriers. UINT32 accepts torch.uint32 or torch.int32 as 32-bit carriers. Integer carriers of the wrong width and unrelated floating-point dtypes remain invalid; no numerical dtype conversion is performed. The frontend also checks dynamic slot reinterpretation, MX data/scale slot layouts and manual mutex aliases. IR observation exposes versioned attribute snapshots and invocation-local parse observers. Existing scalar arithmetic aliases have public declarations and documentation. Capacity validation uses the upstream Bias/Scaling and MX buffer mappings. The existing gather comparison and gatherb STs use their original int32 storage directly. Their UINT32 arguments retain the same 32-bit bit patterns without a dtype conversion. This PR does not modify any ST case. Validation: - PR branch baseline: c8367c8ece9f031c2a22fa64ee2244d63c10bcb0. The earlier diagnostics validation below is recorded against cb13c5555; current carrier compatibility and A5 integration checks are listed separately. - Recorded Pro Python UT on cb13c5555: 2742 passed, 21 existing architecture skips, one expected MutexMismatch warning - Diagnostics and contract regressions with all conftest files disabled (--noconftest): 67 passed - ST bundle collection: 3 tests collected successfully; this covers the duration_estimate import in test_kernel_bundle.py - First-error regressions cover normal and pipeline probe parsing; the first capacity error and its source location are preserved - Current carrier and packed-shape regression: 157 passed, including 74 carrier cases across compile binding and launch. Both signed/unsigned 16-bit carrier combinations and UINT32/int32 are accepted in compile binding and launch. Wider 32-bit buffers remain rejected for 16-bit parameters; narrower storage and floating-point mismatches are rejected for UINT32. - The recorded full Pro UT used pytest 8.4.2; current targeted checks and A5 ST use pytest 9.1.1. - Existing validation of the unchanged production code: C++ structural comparison suite 63 passed, upstream MX/Bias/Scaling capacity regression 1 passed, generated CCE compilation probes 5 passed. These interface-specific native checks retain their recorded results; current A5 integration validation is listed separately below - Applicable pre-commit checks passed for the current patch. The previously recorded CodeCheck comparison found no new findings across seven affected Python test files. The external agent log-spec hook was not run - Current A5 integration with upstream c859e50090de549a226c4e1805b516cffd673993: validation tree 7dd5abf7d8fbd9b3171a715892e24a4d67b34ed3 matches PR head c718e2e12. Native build inputs are unchanged from the full A5 build, whose native payload is reused in an isolated wheel with the updated Python JIT and regenerated RECORD. All 5182 source files, 1359 native-source/binding files and 158 Python files were verified; no Python overlay is used. - Current 16-bit compatibility passed 8 on-device bit-pattern copy combinations across INT16/UINT16 declarations and signed/unsigned input/output carriers. The original quant-lightning-indexer ST passed on the current integration with its unchanged int16 score buffer. The unchanged UINT32 path had both original gather comparison and gatherb STs pass on PR head 3244fbab0. The Tensor API softmax example passed on the earlier integration. - The single-card A5 ST sweep covered all 1833 selected cases (524 excluded by existing SoC/world-size markers): 1675 passed, 137 failed, 19 skipped, 2 expected failures. Completed-prefix evidence is bound to its earlier snapshots, and the remaining sweep used head 3244fbab0; these totals are not a complete rerun on c718e2e12. The UINT16 carrier rejection found in that sweep is addressed by the current patch. No ST cases are modified. - Unmodified upstream c859e5009 was independently built with the same CANN/PTO setup and all 137 failed nodes were rerun on the same device. 132 also failed upstream: 87 merged-axis cases, 18 core-limit cases, 4 HF8 scatter cases, 3 L0C-to-L1 cases, 1 per-channel-scale case, 4 VF control-flow cases, 10 blocking-launch/affected following cases, 1 missing-msprof case and 4 device-ELF dump assertions. Representative merged-load and L0C TEXTRACT/TINSERT compiler failures have matching generated code. These upstream/environment failures are outside this PR and their tests are unchanged. - Of the other five nodes, three GM Gather cases passed on both upstream and the current PR integration. The UINT16 quant-lightning-indexer regression passed after the carrier fix. The online-softmax shape test passed alone on both installations; running it after the Gather cases reproduces the native GetGraphInfo crash on pristine upstream as well, establishing an existing order-dependent failure. There is no full-suite pass claim. See merge request: cann/pypto!6868 | 1 month ago | |
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 months ago |
| Files | Last commit | Last update |
|---|---|---|
| 7 days ago | ||
| 1 day ago | ||
| 9 days ago | ||
| 7 days ago | ||
| 14 days ago | ||
| 2 days ago | ||
| 8 days ago | ||
| 1 day ago | ||
| 9 days ago | ||
| 9 days ago | ||
| 21 days ago | ||
| 1 day ago | ||
| 1 month ago | ||
| 2 months ago |