已合并
fix: 符号表达式反序列化健壮性修复、tile对齐占位符合法化与Broadcast int64放开 #2164
xiebangrui2025创建于 13 天前
fix: 符号表达式反序列化健壮性修复、tile对齐占位符合法化与Broadcast int64放开 #2164
已合并
Pull Request已成功合入, 合并人@CANN-robot
(感谢 xiebangrui2025 的贡献)13 天前 创建了 pull request,commit c3953652
13 天前 添加了label:cann-cla/yes
CANN-robot
13 天前 评论:
13 天前 评论:
Thanks for your pull-request.
The full list of commands accepted by me can be found at here.
You can get sig-info at here.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
For more, you also can visit HICANN.
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| repo-cann/graph-autofusion | ✅ yangyongqiang0606, xchu42 (2/2) | ✅ yangyongqiang0606 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
xiebangrui2025, thanks for your pull request. All authors of the commits have signed the CLA. 👍


13 天前 将niuyuhu,yangyongqiang0606,liyuewei,xchu42,zhang_shengjie,depeng1994,wqtshg_wt,peiyang,shengnan666,XuebinYang,sjtulxh,zhanj,zhujingjing,xuyafei,wangxiaotian995设为评审人
13 天前 将niuyuhu,yangyongqiang0606,liyuewei,xchu42,zhang_shengjie,depeng1994,wqtshg_wt,peiyang,shengnan666,XuebinYang,sjtulxh,zhanj,zhujingjing,xuyafei,wangxiaotian995设为评审人
13 天前 将niuyuhu,yangyongqiang0606,liyuewei,xchu42,zhang_shengjie,depeng1994,wqtshg_wt,peiyang,shengnan666,XuebinYang,sjtulxh,zhanj,zhujingjing,xuyafei,wangxiaotian995设为审查人
13 天前 将niuyuhu,yangyongqiang0606,liyuewei,xchu42,zhang_shengjie,depeng1994,wqtshg_wt,peiyang,shengnan666,XuebinYang,sjtulxh,zhanj,zhujingjing,xuyafei,wangxiaotian995设为审查人
此处折叠了83条消息 查看更多
yangyongqiang
12 天前 评论:
12 天前 评论:
/lgtm


12 天前 添加了label:lgtm
yangyongqiang
12 天前 评论:
12 天前 评论:
/approve


12 天前 添加了label:approved
12 天前 合入了pull request
描述
本 PR 为单 commit,包含四项内容:
1. 符号表达式反序列化三段式/Exp-Sqrt往返/替换环检测修复(同步 cann/ge PR 5005,适配本仓 af 命名空间)
ExpressionImpl::Deserialize三段式重写:完整解析(IsAtEnd拒绝截断串)、字节相等直通、规范树比较语义等价接受,修复 guard 序列化因 SymEngine 规范打印重排负系数 Add 项被误拒返回空、上层集合比较解引用空表达式的问题Exp(x)/Sqrt(x)序列化-反序列化 token 注册与解析,单参函数统一走分发表派发CheckReplacementCycle重写:逐表达式枚举自由符号解析替换根并与对方根比较,覆盖复合表达式对盲区与间接环2. tile内轴运行时对齐占位符改名为合法标识符并新增ST用例
Symbol("get_g_basen_basem_align()")改名为合法标识符:轴属性经CopyAttrFrom/CloneAscGraphs拷贝时走SerializeAttr -> DeserializeAttr中转,带函数调用语法的名字无法被 scanner/parser 解析,导致拷贝图 align 丢失并产生Parse expression str ... failed or incompleteERRORaxes_reorder_solver_gen.cpp的 InitiateArgs/SetVarCons、general_solver_gen.cpp的 GenAlignInput)统一走RuntimeAlignExprToCode还原为函数调用形态,保证生成代码中运行时求值TileInnerAxisRuntimeAlignPlaceholderSurvivesClone固化占位符 align 经序列化 round-trip 后的保留性3. v1/v35 Broadcast IR 注册放开 DT_INT64
BroadcastInt64与 codegen 路径早已就绪,uint64 已在同一路径运行,并有 codegen UT/E2E 佐证)4. 清理
ExpressionImpl::Deserialize中冗余的条件括号(if ((ret == nullptr) || ...)、if ((reparsed != nullptr) && (...))两处,无语义变化)变更类型
关联的Issue
如何测试
sh build.sh -s --module=common -j 8,38 个用例全部 PASS(含新增TileInnerAxisRuntimeAlignPlaceholderSurvivesClone)sh build.sh -s --module=optimize -j 8,213 个用例全部 PASSut_expression):3 个用例全部 PASSascir_builtin_ops增量构建通过;codegen UT(test_codegen_broadcast_api_call.cppint64 场景)与 E2E(load_broadcast_store_int64)为既有覆盖核对清单
其他信息
Parse expression str get_g_basen_basem_align() failed or incomplete的模型验证:该 ERROR 消失且 cube 融合图克隆后 tile 内轴 align 完整