| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
feat(IR): Add normalized PilCode Co-authored-by: Jie Yin<yinjie27@huawei.com> # message auto-generated for no-merge-commit merge: !5470 merge normalize-ir-compare into master feat(IR): Add normalized PilCode Created-by: yinjie27_ Commit-by: Jie Yin Merged-by: cann-robot Description: feat(IR): Add normalized PilCode See merge request: cann/pypto!5470 | 3 个月前 | |
feat(Pass): Assume_divisible for dual_dst Co-authored-by: gggxinmeng<guoxinmeng@huawei.com> # message auto-generated for no-merge-commit merge: !5527 merge dualdst_dynvalidshape_2 into master feat(Pass): Assume_divisible for dual_dst Created-by: gggxinmeng Commit-by: gggxinmeng Merged-by: cann-robot Description: https://gitcode.com/cann/pypto/issues/2858 # OoO阶段无法对动态validshape进行比较,导致dualdst使能失败 动态切分轴的逐 tile validShape 通常由编译器推导为: text min(max(rawShape - offset, 0), tileShape) 例如两个相邻半块可能分别得到: text min(max(vm, 0), TILE_M) min(max(vm - TILE_M, 0), TILE_M) InferDynShape::RecordStaticValidShapeOnL0CCopyUB 会在后续 InferShape 把 shape 归一化为动态表达式之前,将全 concrete 的 valid shape保存到 staticValidShape。但只要任意一维仍含动态成分,快照就整体跳过,DualDst 只能回退到动态表达式比较。 上述两个相邻半块的表达式 dump 不同,而且都没有 concrete 值,DynShapeEq 无法证明它们相等,因此 pair 识别失败。即使业务实际保证 vm 总是 TILE_M 的整数倍、两个半块运行时一定都是完整 tile,编译器仍然缺少这一事实。 根因不是 DualDst 搬运或 codegen 不支持,而是前端没有 Interface 表达“运行时标量可被 tile 整除”,编译期也就无法把逐 tile valid shape证明为静态满块。 # 方案目标 1. 允许用户显式声明某个运行时表达式一定能被指定 tile 整除; 2. 编译器依据该声明证明相关 validShape 恒等于完整 tile,并把它静态化; 3. 在 InferShape 归一化之前让 staticValidShape 快照命中,使现有 DualDst 识别和融合逻辑直接受益; 4. 融合后仅静态化切分轴,保留非切分轴原有 valid shape; 5. 在调试模式下生成运行时取模断言,帮助发现错误的用户声明; 6. 没有假设或证明条件不足时保留原动态表达式,不强行融合。 本方案解决的是“编译器缺少业务整除信息”的问题,而不是自动识别主块和尾块。它是一份由用户提供、编译器信任的语义契约。 # 总体设计 完整链路如下: text Python 用户代码 │ assume_divisible(expr, 128) ▼ Function 保存整除假设 │ expression -> {divisors} ▼ InferDynShape 证明 validShape 恒为 tile │ min/max/add/sub/mul + offset/cap 对齐证明 ▼ 动态 validShape -> 静态 tileShape │ 同步 Tensor 与需要保持一致的 Op attribute ▼ RecordStaticValidShapeOnL0CCopyUB │ 写入 staticValidShape ▼ 现有 DualDst 匹配与融合 │ 保留非切分轴的动态 validShape ▼ 现有 leaf / codegen / dev_encode / runtime 流程 调试模式 runtime_debug_mode=4: Function 中的显式假设 -> 生成 expr % divisor == 0 运行时断言 See merge request: cann/pypto!5527 | 2 个月前 | |
fix(machine) :Fix some issue of runtime worskpace Co-authored-by: duanhaotian<duanhaotian@huawei.com> # message auto-generated for no-merge-commit merge: !7433 merge duanhaotian1 into master fix(machine) :Fix some issue of runtime worskpace Created-by: duanhaotian Commit-by: duanhaotian Merged-by: cann-robot Description: 修复内存相关问题: 1.修复文档表述,当前构造每次JIT入参无变化不触发重编译的场景,配置不生效,默认使用首次配置。提示用户相关场景限制 2.auto_mix场景中实际执行无workspace申请时,提示用户无需精细化控制内存进行内存控制 3.在打开token后,tensor即是incast又是outcast的场景中,对于同一个rawtensor无需打上内存复用标签 4.get_runtime_option实验接口不返回所有runtime_option,只返回实际注册的 See merge request: cann/pypto!7433 | 19 天前 | |
feat(machine): Support host ctrlflow cache by jit Co-authored-by: qq_52905393<liuzhen180@huawei.com> # message auto-generated for no-merge-commit merge: !5741 merge dev-host-ctrl-jit into master feat(machine): Support host ctrlflow cache by jit Created-by: qq_52905393 Commit-by: qq_52905393 Merged-by: cann-robot Description: 1、支持通过 jit ready_on_host_tensors 配置 npu_name: cpu_name 传入配对关系,算子 kernel 传入值依赖 tensor 对应的 cpu tensor 2、支持传入值依赖 tensor 场景下在 host 侧做 controlflow cache See merge request: cann/pypto!5741 | 2 个月前 | |
feat(pypto_pro): unify dump_data and support L1 dump Co-authored-by: fa<yangzf993@163.com> # message auto-generated for no-merge-commit merge: !6962 merge fixmx into master feat(pypto_pro): unify dump_data and support L1 dump 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!6962 | 29 天前 | |
style(all): Fix ruff-check lint errors across the codebase Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4934 merge style-python-format into master style(all): Fix ruff-check lint errors across the codebase Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Fix ruff-check lint errors across the codebase See merge request: cann/pypto!4934 | 4 个月前 | |
fix(ir): Adapt some ut/st case for new ir Co-authored-by: seu_chang<liuchang169@huawei.com> # message auto-generated for no-merge-commit merge: !6897 merge new_ir into master fix(ir): Adapt some ut/st case for new ir Created-by: seu_chang Commit-by: seu_chang Merged-by: cann-robot Description: 删除用例中的new_ir标记并适配相关UT用例; 集合通信用例标记skip; See merge request: cann/pypto!6897 | 1 个月前 | |
feat(pass):Adapt static to dynamic for kirin Co-authored-by: fangrui_32<fangrui30@h-partners.com> # message auto-generated for no-merge-commit merge: !6986 merge master into master feat(pass):Adapt static to dynamic for kirin Created-by: fangrui_32 Commit-by: fangrui_32 Merged-by: cann-robot Description: Related Issue:[[Requirement|需求建议]: Adapt static to dynamic for kirin](https://gitcode.com/cann/pypto/issues/3597) See merge request: cann/pypto!6986 | 1 个月前 | |
style(all): Fix ruff-check lint errors across the codebase Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4934 merge style-python-format into master style(all): Fix ruff-check lint errors across the codebase Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Fix ruff-check lint errors across the codebase See merge request: cann/pypto!4934 | 4 个月前 | |
style(all): Fix ruff-check lint errors across the codebase Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4934 merge style-python-format into master style(all): Fix ruff-check lint errors across the codebase Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Fix ruff-check lint errors across the codebase See merge request: cann/pypto!4934 | 4 个月前 | |
fix(ir): Adapt some ut/st case for new ir Co-authored-by: seu_chang<liuchang169@huawei.com> # message auto-generated for no-merge-commit merge: !6897 merge new_ir into master fix(ir): Adapt some ut/st case for new ir Created-by: seu_chang Commit-by: seu_chang Merged-by: cann-robot Description: 删除用例中的new_ir标记并适配相关UT用例; 集合通信用例标记skip; See merge request: cann/pypto!6897 | 1 个月前 | |
fix(operation): Add missing arch and format constraint checks for matmul/scaled_mm Co-authored-by: shi-dingkun<shidingkun1@huawei.com> # message auto-generated for no-merge-commit merge: !5865 merge fix/matmul-arch-and-format-constraint-check into master fix(operation): Add missing arch and format constraint checks for matmul/scaled_mm Created-by: shi-dingkun Commit-by: shi-dingkun Merged-by: cann-robot Description: 为 matmul/scaled_mm 补齐接口文档中缺失的业务约束检查以及文档针对多核切K功能的描述修正,并修正 FP4 UT。 ## 约束检查 | 约束 | 检查位置 | |---|---| | 输入→输出 dtype 组合表(基础/量化/反量化场景) | __validate_out_dtype | | A2/A3 不支持 DT_HF8 输入 | __validate_inputs | | DT_HF8 不支持 NZ 格式 | __validate_inputs | | A2/A3 不支持 trans_mode | __validate_trans_mode | | scale_a/scale_b 仅支持 ND 格式 | __validate_scaled_inputs | | matmul 拒绝 FP4 输入(仅 scaled_mm 支持) | __validate_matmul_fp4_input | ## FP4 UT 修正 test_fp4_packed_shape.py 重写为正规写法:独立 X/Y 矩阵,scaled_mm + scale tensors + DT_FP16 输出。 ## 测试 test_matmul_op.py 20/20 通过,test_fp4_packed_shape.py 1/1 通过。 Related Issues: #3213 See merge request: cann/pypto!5865 | 2 个月前 | |
style(all): Fix ruff-check lint errors across the codebase Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4934 merge style-python-format into master style(all): Fix ruff-check lint errors across the codebase Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Fix ruff-check lint errors across the codebase See merge request: cann/pypto!4934 | 4 个月前 | |
fix(ir): Bump ooo scope iter in new frontend loop unroll Co-authored-by: seu_chang<liuchang169@huawei.com> # message auto-generated for no-merge-commit merge: !5813 merge front_2.0 into master fix(ir): Bump ooo scope iter in new frontend loop unroll Created-by: seu_chang Commit-by: seu_chang Merged-by: cann-robot Description: 修复新前端循环展开(loop unroll)中 OOO scope 迭代器计数不正确的问题:将原先集中在 Controller 类(位于 pypto/_controller.py)的编译状态(循环索引生成、函数内标志、ooo scope 迭代器)抽取到新的 CompileState 类(pypto/_compile_state.py),并在新前端循环展开路径(pypto/pil/ops.py 的 _dyn_for/_loop_unroll)中补充 ooo scope 迭代器的重置与递增逻辑,使 sg_set_ooo_scope 能为每个迭代编码出唯一 id,与旧前端 _LoopFunction.Iterator 的行为对齐。 See merge request: cann/pypto!5813 | 2 个月前 | |
fix(operation): Add viewshape check for GatherMask last axis Co-authored-by: Apricityh<wangxu359@huawei.com> # message auto-generated for no-merge-commit merge: !5626 merge fix/gathermask-view-split-check into master fix(operation): Add viewshape check for GatherMask last axis Created-by: Apricityh Commit-by: Apricityh Merged-by: cann-robot Description: 为 GatherMask 动态场景的最后一个轴添加viewshape不可切分约束检查 See merge request: cann/pypto!5626 | 3 个月前 | |
style(all): Fix ruff-check lint errors across the codebase Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4934 merge style-python-format into master style(all): Fix ruff-check lint errors across the codebase Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Fix ruff-check lint errors across the codebase See merge request: cann/pypto!4934 | 4 个月前 | |
style(all): Fix ruff-check lint errors across the codebase Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4934 merge style-python-format into master style(all): Fix ruff-check lint errors across the codebase Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Fix ruff-check lint errors across the codebase See merge request: cann/pypto!4934 | 4 个月前 | |
style(all): Fix ruff-check lint errors across the codebase Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4934 merge style-python-format into master style(all): Fix ruff-check lint errors across the codebase Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Fix ruff-check lint errors across the codebase See merge request: cann/pypto!4934 | 4 个月前 | |
style(all): Fix ruff-check lint errors across the codebase Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4934 merge style-python-format into master style(all): Fix ruff-check lint errors across the codebase Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Fix ruff-check lint errors across the codebase See merge request: cann/pypto!4934 | 4 个月前 | |
fix(pil): Preserve source location for tensor ops Co-authored-by: zhaojunhan<zhaojunhan1@huawei.com> # message auto-generated for no-merge-commit merge: !7432 merge fix_op_source_span into master fix(pil): Preserve source location for tensor ops Created-by: zhaojunhan Commit-by: zhaojunhan Merged-by: cann-robot Description: ## 背景 dump 出来的 tensor op(例如 MUL)没有 file / line。dump_source_location 是打开的,缺的是 span_。 dispatch_call 直接调用 pypto_impl.SetSpan,只改了 C++ 的 Span::Current(),没有加入 _source_location_depth。pypto.mul 接着走进 @op_wrapper,包装器看到计数仍是 0,用 sys._getframe(2) 再写一次 span,位置变成 op_registry.py 里的 dispatch()。返回时 clear_source_location() 在 emit_tensor_stmts() 之前执行 ClearSpan(),写进 IR 的 span 是 unknown。后续 CloneTensorOpStmt 把这个空 span 带到 hidden function,program.json 里就没有 file / line。 嵌套调用还有第二处丢失:外层 dispatch_call 已经把计数加到 1 之后,内层即使传入了自己的文件名和行号,旧逻辑也因为 depth != 0 不再 SetSpan。循环里调用 helper、helper 里再 pypto.mul 时,MUL 会沿用外层调用行。 ## 修改 - dispatch_call 改用 set_source_location / clear_source_location,和 @op_wrapper 共用计数。emit_tensor_stmts() 在 ClearSpan() 之前执行。 - 显式传入的文件名和行号不受计数限制,嵌套调用可以记下自己的位置。从栈上推断位置的逻辑不变,仍然只有最外层生效。 See merge request: cann/pypto!7432 | 20 天前 | |
feat(IR): Add normalized PilCode Co-authored-by: Jie Yin<yinjie27@huawei.com> # message auto-generated for no-merge-commit merge: !5470 merge normalize-ir-compare into master feat(IR): Add normalized PilCode Created-by: yinjie27_ Commit-by: Jie Yin Merged-by: cann-robot Description: feat(IR): Add normalized PilCode See merge request: cann/pypto!5470 | 3 个月前 | |
style(all): Fix ruff-check lint errors across the codebase Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4934 merge style-python-format into master style(all): Fix ruff-check lint errors across the codebase Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Fix ruff-check lint errors across the codebase See merge request: cann/pypto!4934 | 4 个月前 | |
style(all): Fix ruff-check lint errors across the codebase Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4934 merge style-python-format into master style(all): Fix ruff-check lint errors across the codebase Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Fix ruff-check lint errors across the codebase See merge request: cann/pypto!4934 | 4 个月前 | |
style(all): Fix ruff-check lint errors across the codebase Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4934 merge style-python-format into master style(all): Fix ruff-check lint errors across the codebase Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Fix ruff-check lint errors across the codebase See merge request: cann/pypto!4934 | 4 个月前 | |
style(all): Fix ruff-check lint errors across the codebase Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4934 merge style-python-format into master style(all): Fix ruff-check lint errors across the codebase Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Fix ruff-check lint errors across the codebase See merge request: cann/pypto!4934 | 4 个月前 | |
style(all): Fix ruff-check lint errors across the codebase Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4934 merge style-python-format into master style(all): Fix ruff-check lint errors across the codebase Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Fix ruff-check lint errors across the codebase See merge request: cann/pypto!4934 | 4 个月前 | |
style(all): Fix ruff-check lint errors across the codebase Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4934 merge style-python-format into master style(all): Fix ruff-check lint errors across the codebase Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Fix ruff-check lint errors across the codebase See merge request: cann/pypto!4934 | 4 个月前 | |
test(ir): Add text check for test_merge_pass Co-authored-by: tsungl4<lidongsheng4@huawei.com> # message auto-generated for no-merge-commit merge: !5209 merge ir into master test(ir): Add text check for test_merge_pass Created-by: tsungl4 Commit-by: tsungl4 Merged-by: cann-robot Description: 1. support name propgration 2. fix some determine issue 3. add text check for test_merge_pass 4. fix gcov for python ut 5. remove python/pypto/ir folder Related Issue: #2559 See merge request: cann/pypto!5209 | 3 个月前 | |
style(all): Fix ruff-check lint errors across the codebase Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4934 merge style-python-format into master style(all): Fix ruff-check lint errors across the codebase Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Fix ruff-check lint errors across the codebase See merge request: cann/pypto!4934 | 4 个月前 | |
fix(ir): Support SSA full-slice writes and guard consumed sources Co-authored-by: HuYiSheng01<hys123456aaa@163.com> # message auto-generated for no-merge-commit merge: !7097 merge fix/assemble-ssa-outcast into master fix(ir): Support SSA full-slice writes and guard consumed sources Created-by: HuYiSheng01 Commit-by: HuYiSheng01 Merged-by: cann-robot Description: 背景 x[:] = y(全切片写)被前端降级为 move,会消费源张量 y(y 变空);y 之后被再次使用(如 x[8:16, :] = y)时,Assemble 入口对空张量 GetShape() → 空指针段错误(Assemble+0x74)。 同时,在 assemble SSA 模式(AssembleNewLogicalTensor)下,循环内对同一目标多次 assemble 写会触发 F7A007 PARAM_CHECK_FAILED。 影响面分析 FillOriginInOutCast 仅由 Function::EndFunction(function.cpp:1057)在 TENSOR_GRAPH / 静态 TILE_GRAPH 收尾时调用一次;改动只影响「同一 raw tensor 上存在多个非 CALL 生产版本」的 outcast 判定(循环 / SSA assemble 场景),CALL 边界值不受影响。 GetOutCastSlot 共 12 处调用(CleanRedundantOutCast / RedundantOutCastCheck 等);改动仅把越界访问改为返回空集合,合法路径结果不变。 Assemble 被前端绑定(python/src/bindings/operation.cpp)与 TensorMove → Assemble 调用;新增判空仅拦截「空张量」这一原崩溃输入。 Tensor.__setitem__ 是所有全切片/切片写的统一入口;源为空属非法输入,报错不改变合法路径。 See merge request: cann/pypto!7097 | 1 个月前 | |
fix(tensor): Normalize negative SymbolicScalar indices Co-authored-by: KaranocaVe<karanocave@qq.com> # message auto-generated for no-merge-commit merge: !6724 merge fix/2026-09-26-pypto-symbolic-negative-index-01 into master fix(tensor): Normalize negative SymbolicScalar indices Created-by: KaranocaVe Commit-by: KaranocaVe Merged-by: cann-robot Description: # fix(tensor): Normalize negative SymbolicScalar indices Tensor._negative_index_to_positive() normalizes negative Python integers but leaves concrete negative SymbolicScalar indices unchanged. For a length-4 Tensor, this lowers SymbolicScalar(-1) to offset -1 while -1 lowers to 3. Normalize concrete negative symbolic indices using the axis length and preserve dynamic symbolic indices. The Host-lowering comparison produces offset 3 for both forms after the change. Device runtime was not exercised. 关联 Issue: https://gitcode.com/cann/pypto/issues/3455 See merge request: cann/pypto!6724 | 1 个月前 | |
fix(interpreter): Fix verify documentation and remove unsupported UT Co-authored-by: Immutable01<gaoqiancheng@huawei.com> # message auto-generated for no-merge-commit merge: !6859 merge 1010_doc into master fix(interpreter): Fix verify documentation and remove unsupported UT Created-by: Immutable01 Commit-by: Immutable01 Merged-by: cann-robot Description: 1.修改精度工具文档与当前版本不匹配内容 2.增加非jit模式的精度工具测试用例 See merge request: cann/pypto!6859 | 1 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 3 个月前 | ||
| 2 个月前 | ||
| 19 天前 | ||
| 2 个月前 | ||
| 29 天前 | ||
| 4 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 1 个月前 | ||
| 2 个月前 | ||
| 4 个月前 | ||
| 2 个月前 | ||
| 3 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 20 天前 | ||
| 3 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 3 个月前 | ||
| 4 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 |