| Files | Last commit | Last update |
|---|---|---|
fix(interface): Fix log wording and unify logging interface Co-authored-by: HuYiSheng01<hys123456aaa@163.com> # message auto-generated for no-merge-commit merge: !5764 merge pr_log_fix_ut into master fix(interface): Fix log wording and unify logging interface Created-by: HuYiSheng01 Commit-by: HuYiSheng01 Merged-by: cann-robot Description: 在 CANN 日志质量评测中发现 framework/src/interface 及 python/src/bindings 多处日志问题:部分日志文案存在英文拼写错误或语法错误,影响排障时按关键字检索;部分业务代码绕过统一日志接口,直接使用 std::cout / std::cerr / printf / py::print / fprintf 输出,不符合统一日志规范(3.1.9 统一英文、3.1.10 统一日志接口)。本 PR 在不改变任何计算逻辑的前提下,对上述日志问题统一收敛修复。 See merge request: cann/pypto!5764 | 2 months 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 | |
feat(ir): Remove eval stmt Co-authored-by: poorwill<wangbing110@huawei.com> # message auto-generated for no-merge-commit merge: !7482 merge rm_eval into master feat(ir): Remove eval stmt Created-by: wangbing110 Commit-by: poorwill Merged-by: cann-robot Description: feat(ir): Remove eval stmt See merge request: cann/pypto!7482 | 15 days ago | |
refactor(ir): Split io_text attr dump/load and separate static/dynamic offsets Co-authored-by: Immutable01<gaoqiancheng@huawei.com> # message auto-generated for no-merge-commit merge: !6932 merge 1014_attr into master refactor(ir): Split io_text attr dump/load and separate static/dynamic offsets Created-by: Immutable01 Commit-by: Immutable01 Merged-by: cann-robot Description: refactor(ir): Split io_text attr dump/load and separate static/dynamic offsets Move the io_text attribute dump/load logic out of io_text_dumper.cpp and io_text_loader.cpp into dedicated attr files sharing a private parser base, and make assemble/view offsets round-trip unambiguous by separating their static and dynamic parts. Changes: - Split attr dump/load logic into io_text_dumper_attr.cpp and io_text_loader_attr.cpp with private header io_text_parser.h - Dump offsets as static #toOffset/#fromOffset (vector<int64_t>) and dynamic #toDynOffset/#fromDynOffset (vector<SymbolicScalar>); all-immediate dyn lists are filtered to avoid duplicate output - Apply tensor op attrs symmetrically on load via ApplyTensorOpAttrs (VIEW/SLICE -> ViewOpAttribute, ASSEMBLE/CONTRACT -> AssembleOpAttribute); legacy text carrying dynamic values under #toOffset/#fromOffset is still accepted - Remove unused OpAttribute::CollectAttrs and refresh golden .pypto snapshots for the new dump format Related Issues: #3555 See merge request: cann/pypto!6932 | 1 month ago | |
fix(ir): Update valueDependDescDict in CurrentDynamicFunction Co-authored-by: zhaojunhan<zhaojunhan1@huawei.com> # message auto-generated for no-merge-commit merge: !4879 merge fix/ir-value-depend-current-dynamic-function into master fix(ir): Update valueDependDescDict in CurrentDynamicFunction Created-by: zhaojunhan Commit-by: zhaojunhan Merged-by: cann-robot Description: 修复新 IR 路径下 valueDependDescDict 没有写入 dynamic function 的问题。 Changes: - 把SetCurrentDynamicFunction(),从 FinalizeDynamicFunction 提前到 createRootFunction。 - FinalizePathFunc/PathFunc 阶段, 在 MakeOutcasts 后生成 valueDepend 信息 See merge request: cann/pypto!4879 | 4 months ago | |
feat(ir): Connect IR with pass component Co-authored-by: Immutable01<gaoqiancheng@huawei.com> # message auto-generated for no-merge-commit merge: !4596 merge 0702_new_ir into master feat(ir): Connect IR with pass component Created-by: Immutable01 Commit-by: Immutable01 Merged-by: cann-robot Description: 将新IR接入pass,同时修复新IR构造rootFunction时丢失op attr的问题 See merge request: cann/pypto!4596 | 4 months ago | |
fix(ir): Preserve dynamic shapes and tile attrs in io_text Co-authored-by: HuYiSheng01<hys123456aaa@163.com> # message auto-generated for no-merge-commit merge: !7792 merge fix/io_text_roundtrip_core into master fix(ir): Preserve dynamic shapes and tile attrs in io_text Created-by: HuYiSheng01 Commit-by: HuYiSheng01 Merged-by: cann-robot Description: ## 背景 测试对 ops/Function/pythonSyntax 的 kernel 做 9 个 stage 的 checkpoint → load → resume 验证,本 PR 处理与 config scope 无关的三类问题: - ISSUE-3:文本缺少 raw tensor 的符号动态 shape,load 后 #dynvalidshape 退化为 [-1,-1],resume 与直跑的 RUNTIME_GetInputShapeDim 绑定不一致; - ISSUE-5:从文本重建后派生函数名可能重复,create_root_functions 直接 abort(xxx_2 already exists in functionmap); - ISSUE-6:算子级 #vec_tile 与 ambient 不一致时,dump→load→dump 会把 ambient 追加进算子 tile(值膨胀,文本不幂等)。 ## 改动 1. 保留 raw tensor 的符号动态 shape(ISSUE-3) - dump:GetDynRawShape() 含非常量表达式时输出 #dynrawshape([...]); - load:解析并 UpdateDynRawShape;旧文本无该属性时回退按 #shape 构造。 2. 派生函数名去重(ISSUE-5) - ir_func_builder.cpp 新增 UniqueMagicName(program, rawName, suffix):候选名被占用时顺延后缀; - 仅用于 dynamic / hidden / PATH 三类派生函数,不改变“冲突时复用已有函数”的语义,也不触碰非 DYNAMIC 函数的 magicName == GetFuncMagic() 合约。 3. 算子级 tile 覆盖而非追加(ISSUE-6) - SetOpTileShape 的 vec_tile 分支先 clear() 再赋值:文本 #vec_tile 表示算子有效 tile,替换 loader 从 ambient 预填的值。 4. 顺带修复:空 ambient tile 导致自身文本不可 reload - program 头在 ambient tile 为空时不再输出 #vec_tile([]) / #cube_tile([]);loader 对旧文本中的空 tile 头视为无覆盖。 5. 代码整理与回归 - EncodeTile/DecodeTile 及尺寸常量从 dumper/loader 各自副本提取到 io_text_config_value.h 共用; - 新增 python/tests/ut/ir/test_resume_dynamic_shape.py:#dynrawshape、load→dump 幂等、resume 与直跑动态调用数一致、#vec_tile 幂等; - 重刷受影响的 v0 golden。 ## 验证 | 项 | 结果 | |---|---| | python/tests/ut/ir | 379 passed(仅基线 test_ir_verify 失败) | | C++ ApplyConfigOpsTest / IoTextDumpRoundTripTest(29) / IoTextDumpTest / MergeStmt / InferToken / RemoveRedundantToken / IoTextTileTest | 全部 PASSED | | syn_cube_kernel、kc_helper_default resume stage 8 | 正常,无回归 | | 动态 kernel checkpoint(0)→load→resume(0) | RUNTIME_GetInputShapeDim 调用数与直跑一致(38/16 → 62/62) | | dump→load→dump | 文本逐字节幂等 | See merge request: cann/pypto!7792 | 2 days ago | |
feat(ir): Add new pass to apply config op Co-authored-by: zhaojunhan<zhaojunhan1@huawei.com> # message auto-generated for no-merge-commit merge: !7084 merge add_config_pass into master feat(ir): Add new pass to apply config op Created-by: zhaojunhan Commit-by: zhaojunhan Merged-by: cann-robot Description: **标题:新增 ApplyConfigOps pass,支持合图后配置重放** 新增 ApplyConfigOps,在 merge 后、create_root_functions 前重放 OP_CONFIG: - 将 tile、scope、atomic scope 应用到各计算 op。 - 为计算段保存最终配置,构建 hidden function 时写入函数参数。 - 支持分支及嵌套 loop 的配置继承与隔离,合入分支的计算使用对应分支配置。 补充 test_apply_config_ops 的 8 个典型用例,通过 IR golden 和最终 op/function 配置断言验证,全部通过。 See merge request: cann/pypto!7084 | 30 days ago | |
fix(token): Preserve tensor read token ownership across branches Co-authored-by: zhaojunhan<zhaojunhan1@huawei.com> # message auto-generated for no-merge-commit merge: !7198 merge fix_if_else_read into master fix(token): Preserve tensor read token ownership across branches Created-by: zhaojunhan Commit-by: zhaojunhan Merged-by: cann-robot Description: ## 问题场景 在 loop 前创建 tensor A,if/else 分支内先读取 A,再通过 assemble 覆盖 A。例如: - then:计算 A + B,随后 assemble 写 A。 - else:计算 A + B,随后 assemble 写 A。 不同分支共享同一个 LogicalTensor,但原实现仅用一个 readToken_ 保存读取 token。推断后一个分支时会覆盖前一个分支的记录,导致 ExpandFunction 无法将前一个分支的 READ 正确匹配到 A 的 SLICE。 这可能使后续写入缺少对实际读取的等待,造成读写乱序和精度异常。原复现中,部分行出现固定偏差;float16 下受调度顺序影响可能偶现。 ## 修复方案 将 LogicalTensor 上单个 READ/WRITE token 改为按身份去重的列表,保留不同访问对应的 token。 保持 InferToken 原有的连续读复用规则: - 连续读取 A 共用同一个 READ,重复登记后列表仍只有一项。 - 不同分支产生不同 READ 时,同时保存,避免相互覆盖。 展开时通过“输入 tensor 的 READ 列表与当前 op 的 result token 的交集”确定归属。对于 A+B 等多输入操作,可准确匹配 A 和 B 各自的读取,无需根据输入数量猜测。 ## 核心修改 1. **保存和匹配访问归属** InferToken 追加登记 token;ExpandFunction 使用列表成员关系匹配 READ,将对应的 NORMAL 挂到实际读取输入的 SLICE 上。 2. **维护克隆后的归属** LogicalTensor Clone 复制访问列表;操作及 token 重映射时,将新 token 登记到对应的新输入、输出 tensor,避免只保留旧 token 指针。 3. **处理 AutoCast** 按当前 op 与输入 tensor 的 token 交集,将 READ 完成信号迁移到实际读取原始输入的 CAST,并同步更新依赖缓存。 4. **保留展开后的依赖** InheritTokenContract 仅追加原操作已有的 NORMAL token,并按身份去重,避免覆盖展开阶段已建立的 SLICE/CONTRACT 依赖。 5. **精确删除及接口清理** 删除无用 token 时仅移除对应元素,保留同一 tensor 上的其他访问记录;移除无生产调用的单 READ getter 和旧 setter 接口。 WRITE 虽改为列表保存,但 if/loop 合并仍沿用逻辑版本最后一次 WRITE 的语义;NextVersion 不继承旧版本的访问列表。 ## 验证情况 - 已验证旧实现会在共享输入的 READ 被覆盖后,无法将前一读取的 token 挂到输入 SLICE。 - 回归测试覆盖连续读复用、双分支 A+B、三种 dtype、AutoCast、尾块、克隆重映射及精确删除。 - 简化前版本通过 128 项 host 测试;正常 NPU 包运行原始 pass_token_issue_7.py ## 范围说明 本次不覆盖同一 op 的两个不同别名输入共享 READ、且需要分别迁移到 CAST 的场景;未新增访问列表的文本 IR 序列化支持。 See merge request: cann/pypto!7198 | 28 days ago | |
fix(token): Preserve tensor read token ownership across branches Co-authored-by: zhaojunhan<zhaojunhan1@huawei.com> # message auto-generated for no-merge-commit merge: !7198 merge fix_if_else_read into master fix(token): Preserve tensor read token ownership across branches Created-by: zhaojunhan Commit-by: zhaojunhan Merged-by: cann-robot Description: ## 问题场景 在 loop 前创建 tensor A,if/else 分支内先读取 A,再通过 assemble 覆盖 A。例如: - then:计算 A + B,随后 assemble 写 A。 - else:计算 A + B,随后 assemble 写 A。 不同分支共享同一个 LogicalTensor,但原实现仅用一个 readToken_ 保存读取 token。推断后一个分支时会覆盖前一个分支的记录,导致 ExpandFunction 无法将前一个分支的 READ 正确匹配到 A 的 SLICE。 这可能使后续写入缺少对实际读取的等待,造成读写乱序和精度异常。原复现中,部分行出现固定偏差;float16 下受调度顺序影响可能偶现。 ## 修复方案 将 LogicalTensor 上单个 READ/WRITE token 改为按身份去重的列表,保留不同访问对应的 token。 保持 InferToken 原有的连续读复用规则: - 连续读取 A 共用同一个 READ,重复登记后列表仍只有一项。 - 不同分支产生不同 READ 时,同时保存,避免相互覆盖。 展开时通过“输入 tensor 的 READ 列表与当前 op 的 result token 的交集”确定归属。对于 A+B 等多输入操作,可准确匹配 A 和 B 各自的读取,无需根据输入数量猜测。 ## 核心修改 1. **保存和匹配访问归属** InferToken 追加登记 token;ExpandFunction 使用列表成员关系匹配 READ,将对应的 NORMAL 挂到实际读取输入的 SLICE 上。 2. **维护克隆后的归属** LogicalTensor Clone 复制访问列表;操作及 token 重映射时,将新 token 登记到对应的新输入、输出 tensor,避免只保留旧 token 指针。 3. **处理 AutoCast** 按当前 op 与输入 tensor 的 token 交集,将 READ 完成信号迁移到实际读取原始输入的 CAST,并同步更新依赖缓存。 4. **保留展开后的依赖** InheritTokenContract 仅追加原操作已有的 NORMAL token,并按身份去重,避免覆盖展开阶段已建立的 SLICE/CONTRACT 依赖。 5. **精确删除及接口清理** 删除无用 token 时仅移除对应元素,保留同一 tensor 上的其他访问记录;移除无生产调用的单 READ getter 和旧 setter 接口。 WRITE 虽改为列表保存,但 if/loop 合并仍沿用逻辑版本最后一次 WRITE 的语义;NextVersion 不继承旧版本的访问列表。 ## 验证情况 - 已验证旧实现会在共享输入的 READ 被覆盖后,无法将前一读取的 token 挂到输入 SLICE。 - 回归测试覆盖连续读复用、双分支 A+B、三种 dtype、AutoCast、尾块、克隆重映射及精确删除。 - 简化前版本通过 128 项 host 测试;正常 NPU 包运行原始 pass_token_issue_7.py ## 范围说明 本次不覆盖同一 op 的两个不同别名输入共享 READ、且需要分别迁移到 CAST 的场景;未新增访问列表的文本 IR 序列化支持。 See merge request: cann/pypto!7198 | 28 days ago | |
feat(ir): Remove eval stmt Co-authored-by: poorwill<wangbing110@huawei.com> # message auto-generated for no-merge-commit merge: !7482 merge rm_eval into master feat(ir): Remove eval stmt Created-by: wangbing110 Commit-by: poorwill Merged-by: cann-robot Description: feat(ir): Remove eval stmt See merge request: cann/pypto!7482 | 15 days ago | |
feat(ir): Remove eval stmt Co-authored-by: poorwill<wangbing110@huawei.com> # message auto-generated for no-merge-commit merge: !7482 merge rm_eval into master feat(ir): Remove eval stmt Created-by: wangbing110 Commit-by: poorwill Merged-by: cann-robot Description: feat(ir): Remove eval stmt See merge request: cann/pypto!7482 | 15 days ago | |
fix(token): Preserve tensor read token ownership across branches Co-authored-by: zhaojunhan<zhaojunhan1@huawei.com> # message auto-generated for no-merge-commit merge: !7198 merge fix_if_else_read into master fix(token): Preserve tensor read token ownership across branches Created-by: zhaojunhan Commit-by: zhaojunhan Merged-by: cann-robot Description: ## 问题场景 在 loop 前创建 tensor A,if/else 分支内先读取 A,再通过 assemble 覆盖 A。例如: - then:计算 A + B,随后 assemble 写 A。 - else:计算 A + B,随后 assemble 写 A。 不同分支共享同一个 LogicalTensor,但原实现仅用一个 readToken_ 保存读取 token。推断后一个分支时会覆盖前一个分支的记录,导致 ExpandFunction 无法将前一个分支的 READ 正确匹配到 A 的 SLICE。 这可能使后续写入缺少对实际读取的等待,造成读写乱序和精度异常。原复现中,部分行出现固定偏差;float16 下受调度顺序影响可能偶现。 ## 修复方案 将 LogicalTensor 上单个 READ/WRITE token 改为按身份去重的列表,保留不同访问对应的 token。 保持 InferToken 原有的连续读复用规则: - 连续读取 A 共用同一个 READ,重复登记后列表仍只有一项。 - 不同分支产生不同 READ 时,同时保存,避免相互覆盖。 展开时通过“输入 tensor 的 READ 列表与当前 op 的 result token 的交集”确定归属。对于 A+B 等多输入操作,可准确匹配 A 和 B 各自的读取,无需根据输入数量猜测。 ## 核心修改 1. **保存和匹配访问归属** InferToken 追加登记 token;ExpandFunction 使用列表成员关系匹配 READ,将对应的 NORMAL 挂到实际读取输入的 SLICE 上。 2. **维护克隆后的归属** LogicalTensor Clone 复制访问列表;操作及 token 重映射时,将新 token 登记到对应的新输入、输出 tensor,避免只保留旧 token 指针。 3. **处理 AutoCast** 按当前 op 与输入 tensor 的 token 交集,将 READ 完成信号迁移到实际读取原始输入的 CAST,并同步更新依赖缓存。 4. **保留展开后的依赖** InheritTokenContract 仅追加原操作已有的 NORMAL token,并按身份去重,避免覆盖展开阶段已建立的 SLICE/CONTRACT 依赖。 5. **精确删除及接口清理** 删除无用 token 时仅移除对应元素,保留同一 tensor 上的其他访问记录;移除无生产调用的单 READ getter 和旧 setter 接口。 WRITE 虽改为列表保存,但 if/loop 合并仍沿用逻辑版本最后一次 WRITE 的语义;NextVersion 不继承旧版本的访问列表。 ## 验证情况 - 已验证旧实现会在共享输入的 READ 被覆盖后,无法将前一读取的 token 挂到输入 SLICE。 - 回归测试覆盖连续读复用、双分支 A+B、三种 dtype、AutoCast、尾块、克隆重映射及精确删除。 - 简化前版本通过 128 项 host 测试;正常 NPU 包运行原始 pass_token_issue_7.py ## 范围说明 本次不覆盖同一 op 的两个不同别名输入共享 READ、且需要分别迁移到 CAST 的场景;未新增访问列表的文本 IR 序列化支持。 See merge request: cann/pypto!7198 | 28 days ago | |
fix(token): Preserve tensor read token ownership across branches Co-authored-by: zhaojunhan<zhaojunhan1@huawei.com> # message auto-generated for no-merge-commit merge: !7198 merge fix_if_else_read into master fix(token): Preserve tensor read token ownership across branches Created-by: zhaojunhan Commit-by: zhaojunhan Merged-by: cann-robot Description: ## 问题场景 在 loop 前创建 tensor A,if/else 分支内先读取 A,再通过 assemble 覆盖 A。例如: - then:计算 A + B,随后 assemble 写 A。 - else:计算 A + B,随后 assemble 写 A。 不同分支共享同一个 LogicalTensor,但原实现仅用一个 readToken_ 保存读取 token。推断后一个分支时会覆盖前一个分支的记录,导致 ExpandFunction 无法将前一个分支的 READ 正确匹配到 A 的 SLICE。 这可能使后续写入缺少对实际读取的等待,造成读写乱序和精度异常。原复现中,部分行出现固定偏差;float16 下受调度顺序影响可能偶现。 ## 修复方案 将 LogicalTensor 上单个 READ/WRITE token 改为按身份去重的列表,保留不同访问对应的 token。 保持 InferToken 原有的连续读复用规则: - 连续读取 A 共用同一个 READ,重复登记后列表仍只有一项。 - 不同分支产生不同 READ 时,同时保存,避免相互覆盖。 展开时通过“输入 tensor 的 READ 列表与当前 op 的 result token 的交集”确定归属。对于 A+B 等多输入操作,可准确匹配 A 和 B 各自的读取,无需根据输入数量猜测。 ## 核心修改 1. **保存和匹配访问归属** InferToken 追加登记 token;ExpandFunction 使用列表成员关系匹配 READ,将对应的 NORMAL 挂到实际读取输入的 SLICE 上。 2. **维护克隆后的归属** LogicalTensor Clone 复制访问列表;操作及 token 重映射时,将新 token 登记到对应的新输入、输出 tensor,避免只保留旧 token 指针。 3. **处理 AutoCast** 按当前 op 与输入 tensor 的 token 交集,将 READ 完成信号迁移到实际读取原始输入的 CAST,并同步更新依赖缓存。 4. **保留展开后的依赖** InheritTokenContract 仅追加原操作已有的 NORMAL token,并按身份去重,避免覆盖展开阶段已建立的 SLICE/CONTRACT 依赖。 5. **精确删除及接口清理** 删除无用 token 时仅移除对应元素,保留同一 tensor 上的其他访问记录;移除无生产调用的单 READ getter 和旧 setter 接口。 WRITE 虽改为列表保存,但 if/loop 合并仍沿用逻辑版本最后一次 WRITE 的语义;NextVersion 不继承旧版本的访问列表。 ## 验证情况 - 已验证旧实现会在共享输入的 READ 被覆盖后,无法将前一读取的 token 挂到输入 SLICE。 - 回归测试覆盖连续读复用、双分支 A+B、三种 dtype、AutoCast、尾块、克隆重映射及精确删除。 - 简化前版本通过 128 项 host 测试;正常 NPU 包运行原始 pass_token_issue_7.py ## 范围说明 本次不覆盖同一 op 的两个不同别名输入共享 READ、且需要分别迁移到 CAST 的场景;未新增访问列表的文本 IR 序列化支持。 See merge request: cann/pypto!7198 | 28 days ago | |
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 | 2 months ago | |
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 | 2 months ago | |
refactor(utils): Refactor file_utils.h Co-authored-by: tsungl4<lidongsheng4@huawei.com> # message auto-generated for no-merge-commit merge: !4130 merge refactor/file_utils1 into master refactor(utils): Refactor file_utils.h Created-by: tsungl4 Commit-by: tsungl4 Merged-by: cann-robot Description: Refactor file_utils.h Related Issue: #1185 See merge request: cann/pypto!4130 | 5 months 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 | |
feat(interface): Support getinputdata for all integral types Co-authored-by: tsungl4<lidongsheng4@huawei.com> # message auto-generated for no-merge-commit merge: !2224 merge refactor/deadcode into master feat(interface): Support getinputdata for all integral types Created-by: tsungl4 Commit-by: tsungl4 Merged-by: cann-robot Description: 1. startArgsSymbolHandlerList of devProg does not used any more 2. Support getinputdata for all integral types Related Issue: [#408](https://gitcode.com/cann/pypto/issues/408) See merge request: cann/pypto!2224 | 7 months ago | |
fix(pil): Compile kernel helpers that accept keyword arguments Co-authored-by: zhaojunhan<zhaojunhan1@huawei.com> # message auto-generated for no-merge-commit merge: !7395 merge fix_compile_syntax_fallback into master fix(pil): Compile kernel helpers that accept keyword arguments Created-by: zhaojunhan Commit-by: zhaojunhan Merged-by: cann-robot Description: kernel 内部调用的子函数如果声明了 **kwargs,解析阶段会抛出SyntaxError: vararg and kwarg not supported,随后退回普通 Python 执行。 本变更让这类 helper 走 PIL 编译,把对不上具名参数的关键字收进 **kwargs 字典,helper 内可以用 kwargs.get 或 kwargs[name] 取到已经解析好的 tensor。 入口 kernel 仍拒绝 *args 和 **kwargs。*args 在所有路径上都不支持。 没有 **kwargs 的函数仍按原有方式绑定参数。 Changes: - 非入口 helper、嵌套 def 和 lambda 允许声明 **kwargs,并记录 positional-only 与可按位置传入的参数个数 - 调用时把多余关键字打包成字典;位置参数过多、重复传参、positional-only 用关键字传入时抛出 TypeError See merge request: cann/pypto!7395 | 20 days ago | |
fix(tensor): Avoid opcode string use-after-free during shutdown Co-authored-by: W4termy<wangmingyang21@huawei.com> # message auto-generated for no-merge-commit merge: !7151 merge bad_alloc into master fix(tensor): Avoid opcode string use-after-free during shutdown Created-by: W4termy Commit-by: W4termy Merged-by: cann-robot Description: Tensor析构时打印析构日志调用GetSymbolicCalcOpcode()取opcode,返回值为string的拷贝,但该string数组的析构先于tensor析构,导致异常抛出 该pr将该数组的元素类型改为char* See merge request: cann/pypto!7151 | 30 days ago | |
fix(interpreter): Fix debug of evaluate symbolic scalar Co-authored-by: dingbo929<dingbo24@h-partners.com> # message auto-generated for no-merge-commit merge: !7082 merge master into master fix(interpreter): Fix debug of evaluate symbolic scalar Created-by: dingbo929 Commit-by: dingbo929 Merged-by: cann-robot Description: 不同的unroll,loopinfo中相同的循环变量会加_0,_1的后缀,例如unroll1的root调用unroll4的leaffunction的时候会导致symboldict注册的和ir表达式里面的循环变量名不一致。修复方式是在 IRContext 中新增原名与去重名的对应查询能力,并在求值失败前增加按“原始名”回查去重名的兜底逻辑 See merge request: cann/pypto!7082 | 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(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 months ago | |
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 months ago | |
feat(operation): Add quant hif4 Co-authored-by: 杨志邈<yangzhimiao@huawei.com> # message auto-generated for no-merge-commit merge: !7229 merge master into master feat(operation): Add quant hif4 Created-by: yangzhimiao Commit-by: 杨志邈 Merged-by: cann-robot Description: 新增算子Quant Hif4。用于A6设备上BF16到Hif4的量化。支持Scale_alg为0/1,尾轴量化。 Related Issue: [#3684](https://gitcode.com/cann/pypto/issues/3684) See merge request: cann/pypto!7229 | 28 days 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 | |
fear(ir): Keep every assemble version of one slot as outcast output Co-authored-by: tsungl4<lidongsheng4@huawei.com> # message auto-generated for no-merge-commit merge: !6322 merge ass into master fear(ir): Keep every assemble version of one slot as outcast output Created-by: tsungl4 Commit-by: tsungl4 Merged-by: cann-robot Description: Related Issue: #2559 See merge request: cann/pypto!6322 | 2 months ago | |
fix(operator): Make ScatterUpdate update dst inplace and preserve slot symbol Co-authored-by: gaoxingwang<camuel.gao@huawei.com> # message auto-generated for no-merge-commit merge: !6028 merge scatterupdate-inplace into master fix(operator): Make ScatterUpdate update dst inplace and preserve slot symbol Created-by: gaoxingwang Commit-by: gaoxingwang Merged-by: cann-robot Description: fix(operator): Make ScatterUpdate update dst inplace and preserve slot symbol ScatterUpdate returned a new tensor while leaving dst unchanged, which broke inplace semantics and lost dst ARG symbol in codegen when the src slot (nameless inplace-view SSA) took over dst registration. Changes: - Change ScatterUpdate dst parameter to a mutable reference and assign result back to dst so the caller-side tensor reflects the update - Register input names at param-declaration time via the new TensorSlotManager::MarkInputName (called in RootFunctionBuilder::InitDynFunc and RecordFunc::RecordDynFuncInner), so inputNameList keeps the original ARG symbols before any SetSameSlot migration - Keep slot marking and startArgs fill in BuildDynSlotScope unchanged - Register pypto.scatter_update in _patch_methods so inplace slot tracking covers it Related Issues: #3260 See merge request: cann/pypto!6028 | 2 months ago | |
fix(ir): Fix liveness not correct in canonicalize pass Co-authored-by: tsungl4<lidongsheng4@huawei.com> # message auto-generated for no-merge-commit merge: !5334 merge shape into master fix(ir): Fix liveness not correct in canonicalize pass Created-by: tsungl4 Commit-by: tsungl4 Merged-by: cann-robot Description: Related Issue: #2559 See merge request: cann/pypto!5334 | 3 months 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 |
| Files | Last commit | Last update |
|---|---|---|
| 2 months ago | ||
| 4 months ago | ||
| 15 days ago | ||
| 1 month ago | ||
| 4 months ago | ||
| 4 months ago | ||
| 2 days ago | ||
| 30 days ago | ||
| 28 days ago | ||
| 28 days ago | ||
| 15 days ago | ||
| 15 days ago | ||
| 28 days ago | ||
| 28 days ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 5 months ago | ||
| 7 months ago | ||
| 7 months ago | ||
| 20 days ago | ||
| 30 days ago | ||
| 1 month ago | ||
| 4 months ago | ||
| 2 months ago | ||
| 3 months ago | ||
| 28 days ago | ||
| 4 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 3 months ago | ||
| 4 months ago |