| 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): Represent configuration changes as ConfigStmt Co-authored-by: zhaojunhan<zhaojunhan1@huawei.com> # message auto-generated for no-merge-commit merge: !6899 merge add_configStmt into master feat(ir): Represent configuration changes as ConfigStmt Created-by: zhaojunhan Commit-by: zhaojunhan Merged-by: cann-robot Description: 使用 OP_CONFIG 记录配置变更,统一配置的 IR 文本序列化 - 使用 TensorOpStmt 承载 OP_CONFIG,显式记录配置变更,为后续 token 依赖支持打基础,本次暂不添加 token。 - 实现各类 Tile 与 vector<int64_t> 的双向转换,复用整数列表的 Load/Dump,并校验长度、布尔值及数值范围。 - 字符串 key 的 map 使用嵌套属性 #name(value),整数 key 的 map 使用二元整数列表 [[key, value], ...],移除独立的 map 文法和冒号 token。 - 补充配置记录、序列化往返及典型异常场景测试,同步更新 IR 快照和中英文文档。 See merge request: cann/pypto!6899 | 1 month 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(tensor): Restore SetSameMemId on extra loop incast Co-authored-by: zhaojunhan<zhaojunhan1@huawei.com> # message auto-generated for no-merge-commit merge: !7486 merge restore_extra_incast_same_memid into master fix(tensor): Restore SetSameMemId on extra loop incast Created-by: zhaojunhan Commit-by: zhaojunhan Merged-by: cann-robot Description: !7431 在 BindExtraIncastStorage 中删除了 hiddenFunc->SetSameMemId(incast, output)。incast 和 outcast 已经共享同一个 RawTensor,但 SetSameMemId 同时写入 outIncastLinkMap。 需要回退代码,原因如下: 1. subgraph_to_function 的 partial-update 输入补登记依赖这条 map。找不到条目时补登记被跳过,设备调度遗漏读取依赖,出现精度问题。 2. 当outIncastLinkMap中incast 和 outcast 的rawtensor相同时,machine会为incast分配内存,outcast实现复用。 See merge request: cann/pypto!7486 | 18 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 | 1 month 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 | 1 month 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 | 1 month ago | |
fix(ir): Emit lexable names and dump attrs in canonical order Co-authored-by: HuYiSheng01<hys123456aaa@163.com> # message auto-generated for no-merge-commit merge: !7011 merge fix/io_text-basic into master fix(ir): Emit lexable names and dump attrs in canonical order Created-by: HuYiSheng01 Commit-by: HuYiSheng01 Merged-by: cann-robot Description: 自动生成的临时变量名是 "$0"、"$1"…(带 '$' 前缀),None 哨兵名为 "None";而 IR 文本的 varname 文法只接受 '%<name>' / '%<name>@<magic>' 且首字符为'[A-Za-z0-9_]'。 for 语句的属性按内存容器(插入)顺序打印,而 loader 会把属性归一化到 std::map(按 key字典序)。于是同一个 IR 在 load 之后 re-dump 的属性顺序会变,破坏 dump→load→dump 稳定性。 修改内容:生成的临时变量名去掉 '$' 前缀;None 哨兵命名为 'none'。 varname 文法允许数字开头(含去重后缀如 "0_0"):同步更新文法文档与词法正则。 解析每个函数前 Reset IRContext,使续跑后的 IR 保持文本中的精确变量名(不再被进程级去重器 污染出 "_N" 后缀)。 for 语句属性按规范化(字典序)顺序打印,集中在 IRTextDumper::PrintAttrsCanonical。 See merge request: cann/pypto!7011 | 1 month 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 | |
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 | 1 month 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 | 1 month 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 | 3 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 | 3 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 | 23 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 | 1 month 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 | 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 | |
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 | ||
| 1 month ago | ||
| 1 month ago | ||
| 4 months ago | ||
| 4 months ago | ||
| 18 days ago | ||
| 1 month ago | ||
| 1 month ago | ||
| 1 month ago | ||
| 1 month ago | ||
| 1 month ago | ||
| 1 month ago | ||
| 1 month ago | ||
| 3 months ago | ||
| 3 months ago | ||
| 5 months ago | ||
| 7 months ago | ||
| 7 months ago | ||
| 23 days ago | ||
| 1 month ago | ||
| 1 month ago | ||
| 4 months ago | ||
| 2 months ago | ||
| 3 months ago | ||
| 1 month ago | ||
| 4 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 3 months ago | ||
| 4 months ago |