add op tinsert#765
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for the TInsertMode attribute and extends the TInsertOp and TInsertFPOp operations with optional arguments and attributes (such as fp, preQuantScalar, accToVecMode, reluPreMode, and tinsertMode). It updates the corresponding verifiers, EmitC lowering patterns, and intrinsic folding passes, and adds a comprehensive TileLang DSL template alongside LIT and ST tests. The code review feedback highlights several critical issues: a parsing bug in VPTO.cpp where parseOptionalKeyword is used without checking has_value(), an incorrect stride calculation in tinsert_template.py for ACC sources, a missing layout validation for VEC destinations in the TInsertFPOp verifier, and namespace inconsistencies in the EmitC lowering of ReluPreMode tokens.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Codex Review该评论由 review 机器人自动更新。
SummaryReview failed at stage Findings未生成结构化 findings,因为 review 过程提前失败。 Log Tail |
04929f2 to
7ceb447
Compare
修复 PR #765 Codex Review 两个 P1 问题问题 1 (P1): Vec→Mat NZ 模板优先级冲突根源:
其他路径( 修复方案文件:
def _vec_to_mat_nz_basic_constraint(src, dst, tinsert_mode=None) -> bool:
if tinsert_mode in ("split2", "split4"):
return False
return _vec_to_mat_nz_constraint(src, dst)
def _vec_to_mat_nz_split2_constraint(src, dst, tinsert_mode=None) -> bool:
if tinsert_mode != "split2":
return False
return _vec_to_mat_nz_constraint(src, dst)
def _vec_to_mat_nz_split4_constraint(src, dst, tinsert_mode=None) -> bool:
if tinsert_mode != "split4":
return False
return _vec_to_mat_nz_constraint(src, dst)
问题 2 (P1): ExpandTileOp 属性未透传根源: 修复方案文件: 在 if (auto tinsert = dyn_cast<pto::TInsertOp>(op)) {
attrs.emplace_back("relu_pre_mode",
stringifyReluPreMode(tinsert.getReluPreMode()).str());
if (auto accAttr = tinsert.getAccToVecModeAttr())
attrs.emplace_back("acc_to_vec_mode",
stringifyAccToVecMode(accAttr.getValue()).str());
if (auto insAttr = tinsert.getTinsertModeAttr())
attrs.emplace_back("tinsert_mode",
stringifyTInsertMode(insAttr.getValue()).str());
}
if (auto tinsertFp = dyn_cast<pto::TInsertFPOp>(op)) {
attrs.emplace_back("relu_pre_mode",
stringifyReluPreMode(tinsertFp.getReluPreMode()).str());
if (auto accAttr = tinsertFp.getAccToVecModeAttr())
attrs.emplace_back("acc_to_vec_mode",
stringifyAccToVecMode(accAttr.getValue()).str());
}设计要点:
属性 ↔ Python 字符串对应关系
修改文件清单
|
3e58ad5 to
69425d1
Compare
aa86ed9 to
31575d8
Compare
No description provided.