| Files | Last commit | Last update |
|---|---|---|
fix(machine): fix log level mismatch, magic number and grammar errors Co-authored-by: chai-hw<chaizhengtong@huawei.com> # message auto-generated for no-merge-commit merge: !5720 merge pyptolog_fix2 into master fix(machine): fix log level mismatch, magic number and grammar errors Created-by: chai-hw Commit-by: chai-hw Merged-by: cann-robot Description: 日志规范性整改 See merge request: cann/pypto!5720 | 3 months ago | |
fix(machine): Compile monitor info fix. Co-authored-by: chai-hw<chaizhengtong@huawei.com> # message auto-generated for no-merge-commit merge: !5321 merge compile_fix into master fix(machine): Compile monitor info fix. Created-by: chai-hw Commit-by: chai-hw Merged-by: cann-robot Description: 删除重复warning信息;删除重复compile_monitor标识 See merge request: cann/pypto!5321 | 3 months ago | |
feat(operation): Update kirin supported op dtypes check Co-authored-by: GBowen666<libowen58@huawei.com> # message auto-generated for no-merge-commit merge: !6884 merge master into master feat(operation): Update kirin supported op dtypes check Created-by: GBowen666 Commit-by: GBowen666 Merged-by: cann-robot Description: Related Issue: [[Requirement|需求建议]: 算子 dtype 校验改为按输入维度的 JSON 配置,并补齐 Kirin 校验](https://gitcode.com/cann/pypto/issues/3547) 1、feat(operation): Update kirin supported op dtypes check See merge request: cann/pypto!6884 | 1 month ago | |
fix(interface): Reduce UT time and resolve code style. Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !3697 merge review into master fix(interface): Reduce UT time and resolve code style. Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: 1. 减少ut耗时 2. 整改代码规范 See merge request: cann/pypto!3697 | 5 months ago | |
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 | 1 month ago | |
compilation issue fixed Co-authored-by: hsqnb<heshouqi@h-partners.com> # message auto-generated for no-merge-commit merge: !5798 merge master into master compilation issue fixed Created-by: hsqnb Commit-by: hsqnb Merged-by: cann-robot Description: fix(interface): Add missing cstdint header in pre_def The pre_def.h uses uint8_t (via BinDataPtr typedef) but does not include <cstdint> that defines it. This causes compilation failures on strict toolchains where <cstdint> is not transitively included. Changes: - Add #include <cstdint> to framework/src/interface/inner/pre_def.h Related Issue: #3172 See merge request: cann/pypto!5798 | 2 months ago | |
fix(interpreter): Correct FP4 E1M2 decode table to uniform 0.25 spacing Co-authored-by: Immutable01<gaoqiancheng@huawei.com> # message auto-generated for no-merge-commit merge: !6892 merge 1013_fp4 into master fix(interpreter): Correct FP4 E1M2 decode table to uniform 0.25 spacing Created-by: Immutable01 Commit-by: Immutable01 Merged-by: cann-robot Description: 修正fp4e1m2的解码表 See merge request: cann/pypto!6892 | 1 month ago | |
feat(ir): Sink a for loop after if into both branches Co-authored-by: zhaojunhan<zhaojunhan1@huawei.com> # message auto-generated for no-merge-commit merge: !6872 merge sink_for_into_if into master feat(ir): Sink a for loop after if into both branches Created-by: zhaojunhan Commit-by: zhaojunhan Merged-by: cann-robot Description: feat(ir): Sink a for loop after if into both branches 本 PR 让 MergeStmtsIntoIf 把 If 后面的 For 下沉到 then/else 两个分支,只执行被选中的那一侧。下沉后 If 不再 yield 循环上界/步长/动态 shape 符号,必须把这些 yield 变量替换进被拷贝的循环。后两个 commit 分别修替换不完整导致的两个 bug:AICPU LOOP 死循环,以及 cube 有效 shape 悬空造成的精度错误。 ## Commit 1 bb35f73d3 feat(ir): Sink a for loop after if into both branches 功能:If 后面的 For 复制进两个分支;If 前面的 For 保持在外。下沉时保留循环结果、零次迭代初值、动态 shape,以及 sunk loop 内嵌套 If 的返回 tensor。 源程序: if cond: width, count = 8, 2 else: width, count = 16, 1 for i in loop(count): ... 下沉后 then/else 各自有一份循环,循环上界和 VIEW 的 toValidShape 换成该分支的常量。 ## Commit 2 dee7afa81 (bug 1:ST 超时 / AICPU 死循环) fix(ir): Substitute ScalarExpr when sinking a for into if 现象:python/tests/st/test_yield_scalar_if_for.py 在 A3 冒烟里 500s 超时。 原因:pypto.loop 的 step 编成 ScalarExpr v0mul(1, step_val)。下沉时 SunkStmtSubstitutor 只替换 Var 叶子,stop 能换成常量,step 仍引用 step_val_0。If 下沉后不再定义该标量,AICPU LOOP 步长变成未赋值的 0,idx += 0 死循环。 修复:VisitExpr_(ScalarExprPtr) 走 SymbolicScalar::SubstituteVars,把分支 yield 值写进 sunk loop 的 step/stop。 ## Commit 3 239b2fb13 (bug 2:动态 valid shape 悬空 / dK 精度失败) fix(ir): Substitute result dynvalidshape when sinking a for into if 现象:gym sparse_flash_attention_grad TND 的 test_level0_tiny,dQ 通过,dK_nope 失败(只写下第一个 sparse index)。下沉前该算子通过。 原因:SubstituteTensorStmt 只在 op 属性变化时重建。VIEW 的 fromOffset/toValidShape 带 yield 变量,能换成分支常量;A_MUL_B/ADD/CAST 的有效 shape 只在结果 tensor 的 dynvalidshape 上,属性为空就 early-return。then 分支里 dK cube(dS^T @ Q)仍引用已不再 yield 的 q_offset_0/kv_offset_0,valid M 编错。即便走进 clone 路径,旧代码 Clone() 也不 UpdateDynValidShape。 修复:结果 GetDynValidShape 能替换到 yield 变量时,Clone(true) 并 UpdateDynValidShape;属性或结果 shape 任一变化都重建 stmt。 新增 UT test_sunk_loop_add_dyn_valid_shape:VIEW 后跟 ADD,then 分支 ADD 必须是 dynvalidshape([8,16]),不能残留 width_0。 Changes: - 将 If 后的 For 下沉到 then/else,If 前的 For 保持在外 - 下沉时用 SymbolicScalar::SubstituteVars 替换 ScalarExpr(修 LOOP step=0 死循环) - 下沉时替换结果 tensor 的 dynvalidshape 并写回 clone(修 cube 有效 shape 悬空) - 补充 merge-pass snapshot:sunk loop、嵌套 If、ADD 推断 dynvalidshape 验证: - python/tests/st/test_yield_scalar_if_for.py 通过 - python/tests/ut/ir/test_merge_pass/ 30 passed - gym test_level0_tiny(原始 kernel,未改 gym)通过 See merge request: cann/pypto!6872 | 1 month ago | |
fix(machine): DRCORE balanced scheduling Co-authored-by: wan_jianfen<wanjianfen@hisilicon.com> # message auto-generated for no-merge-commit merge: !6627 merge br_ctu into master fix(machine): DRCORE balanced scheduling Created-by: wan_jianfen Commit-by: wan_jianfen 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!6627 | 1 month ago | |
fix(operation): Fix TCMPS read 256B in pow Co-authored-by: xiefangming<xiefangming@huawei.com> # message auto-generated for no-merge-commit merge: !6902 merge pow_pad into master fix(operation): Fix TCMPS read 256B in pow Created-by: xiefangming Commit-by: xiefangming Merged-by: cann-robot Description: pow里用的tcmps没有留足够大小的空间,导致特定shape下ub访问越界 [#3558](https://gitcode.com/cann/pypto/issues/3558) See merge request: cann/pypto!6902 | 1 month ago | |
refactor(all): Remove trailing whitespace Co-authored-by: tsungl4<lidongsheng4@huawei.com> # message auto-generated for no-merge-commit merge: !2188 merge pre-commit into master refactor(all): Remove trailing whitespace Created-by: tsungl4 Commit-by: tsungl4 Merged-by: cann-robot Description: Introduce pre-commit tools, and remove trailing white space with default plugin Related Issue: #1017 See merge request: cann/pypto!2188 | 7 months ago | |
fix(interpreter): Fix bug of verify output have empty dir Co-authored-by: dingbo929<dingbo24@h-partners.com> # message auto-generated for no-merge-commit merge: !6095 merge master into master fix(interpreter): Fix bug of verify output have empty dir Created-by: dingbo929 Commit-by: dingbo929 Merged-by: cann-robot Description: 1. 修复开启精度工具后,产物output目录会有一个空目录 See merge request: cann/pypto!6095 | 2 months ago | |
feat(pypto_pro): Remove duplicate checks in SIMT API Co-authored-by: wuzhongxin<wuzhongxin1@huawei.com> # message auto-generated for no-merge-commit merge: !6850 merge fix into master feat(pypto_pro): Remove duplicate checks in SIMT API Created-by: wuzhongxin Commit-by: wuzhongxin 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!6850 | 1 month 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(ir): Sort ComputeIncast inputs by magic for deterministic ordering Co-authored-by: Catherie<mayuan33@huawei.com> # message auto-generated for no-merge-commit merge: !6592 merge fix/incast-magic-sort into master fix(ir): Sort ComputeIncast inputs by magic for deterministic ordering Created-by: Catherie Commit-by: Catherie Merged-by: cann-robot Description: fix(ir): Sort ComputeIncast inputs by magic for deterministic ordering std::unordered_set 的遍历序取决于其存储的 shared_ptr 元素的堆地址,而堆地址受 ASLR 影响在不同进程间不同。这导致 hiddenfunc 的入参顺序不确定,函数 hash 与生成的 CCE 文件名每次运行都会变化。 Changes: - 在 RootFunctionBuilder::ComputeIncast 中遍历前按 tensor magic 对所有输入排序, 保证 hiddenfunc 入参序跨进程确定 - test(ir): Add UT for ComputeIncast deterministic ordering —— 补充 test_compute_incast_deterministic_order:loop-body 段消费 6 个独立参数,通过 golden 快照与入参顺序断言验证 hiddenfunc 入参序恒为 magic 升序(修复前 8/8 次 运行用例失败并呈现随机排列,修复后跨进程稳定) See merge request: cann/pypto!6592 | 2 months ago | |
fix(operation): Fix Temp Offset Co-authored-by: Creeeeper<liuyizhe6@huawei.com> # message auto-generated for no-merge-commit merge: !6918 merge layout into master fix(operation): Fix Temp Offset Created-by: Creeeeper Commit-by: Creeeeper Merged-by: cann-robot Description: ## 描述 算子的输入输出tensor的rawShape在pass阶段从tile切分后到最后一个pass之间会改变,而临时空间大小由tileshape得到,临时空间中的小块偏移不能直接由输入或输出的rawShape计算而是应由validshape计算 ## 测试 完成 A3 A5 冒烟测试 ## 关联Issue [#3574](https://gitcode.com/cann/pypto/issues/3574) ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/pypto!6918 | 1 month ago | |
feat(operation): support A5 adaptive in-place overwrite Co-authored-by: bynshard<zhangbingshuai@huawei.com> # message auto-generated for no-merge-commit merge: !6174 merge codex/scatter-upstream-master into master feat(operation): support A5 adaptive in-place overwrite Created-by: bynshard Commit-by: bynshard Merged-by: cann-robot Description: scatter 算子 现在阶段使用 标量来实现,A5 有了 simt 能力,可以提高效率。 同时,部分场景中,在ub 中使用 Tscatter 性能更有优势 。 我们相当于支持了 scatter 自适应的 ub 和 gm,并且在gm 场景中使用 simt 来提高性能。 单算子场景中,性能平均提升 4~5,在ub 场景中无劣化。 Related Issue: https://gitcode.com/cann/pypto/issues/3470 更多描述信息见:[Commit Message 规范](../docs/zh/contribute/pull-request.md#commit-message) See merge request: cann/pypto!6174 | 1 month ago | |
fix(pro): fix profiling for cann 9.3.0 Co-authored-by: gravel1997<shili19@huawei.com> # message auto-generated for no-merge-commit merge: !6634 merge profiling_fix_0922 into master fix(pro): fix profiling for cann 9.3.0 Created-by: gravel1997 Commit-by: gravel1997 Merged-by: cann-robot Description: fix(pro): fix profiling for cann 9.3.0 Related Issue: [#3299](https://gitcode.com/cann/pypto/issues/3299) See merge request: cann/pypto!6634 | 2 months ago |
| Files | Last commit | Last update |
|---|---|---|
| 3 months ago | ||
| 3 months ago | ||
| 1 month ago | ||
| 5 months ago | ||
| 1 month ago | ||
| 2 months ago | ||
| 1 month ago | ||
| 1 month ago | ||
| 1 month ago | ||
| 1 month ago | ||
| 7 months ago | ||
| 2 months ago | ||
| 1 month ago | ||
| 4 months ago | ||
| 2 months ago | ||
| 1 month ago | ||
| 1 month ago | ||
| 2 months ago |