-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Dynamic shape] Delete SymbolicDimMgr symbolTable and SymbolicDimOp #60933
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
if (lhs == rhs) return true; | ||
// auto lhs_type = lhs.type().dyn_cast<ShapedTypeInterface>(); | ||
// auto rhs_type = rhs.type().dyn_cast<ShapedTypeInterface>(); | ||
|
||
// if (!lhs_type || !rhs_type || !lhs_type.HasRank() || !rhs_type.HasRank()) | ||
// return false; | ||
|
||
// return IsProductEqual(lhs, | ||
// 0, | ||
// static_cast<int>(lhs_type.GetRank()), | ||
// rhs, | ||
// 0, | ||
// static_cast<int>(rhs_type.GetRank())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这些是不是也可以清理了?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里接口需要保留、逻辑相同但是需要使用新的数据结构进行重构,注释掉为是保留了逻辑,后续PR会马上使用dim_expr 完成接口功能
// std::vector<int> lhs_dim_idxs, rhs_dim_idxs; | ||
|
||
// lhs_dim_idxs.reserve(lhs_to - lhs_from); | ||
// rhs_dim_idxs.reserve(rhs_to - rhs_from); | ||
|
||
// for (int i = lhs_from; i < lhs_to; ++i) lhs_dim_idxs.push_back(i); | ||
// for (int i = rhs_from; i < rhs_to; ++i) rhs_dim_idxs.push_back(i); | ||
|
||
// return IsProductEqual(lhs, lhs_dim_idxs, rhs, rhs_dim_idxs); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
auto it = tables_.find(program->module_op().operation()->id()); | ||
|
||
if (it == tables_.end()) { | ||
it = tables_ | ||
.emplace(program->module_op().operation()->id(), | ||
ShapeConstraintIRAnalysis(program->module_op())) | ||
.first; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里会有不同 id 的情况出现吗
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里当时设计时和 liujie 讨论根据 program 作为 key 的,当时这里记了一个 todo
|
||
return val.defining_op()->name() + "_" + std::to_string(op_id) + "_rst_" + | ||
std::to_string(val_idx); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个文件里有些也可以清理掉,GetValueId现在应该也用不到了吧,可以后续PR再删掉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是 zynncg PR 中加的用来debug 的、之前 GetValueId 已经清理过一次了
|
||
void VerifySig() {} | ||
}; | ||
|
||
class IR_API DimOp : public Op<DimOp> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DimOp还需要保留吗
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不需要了、本来想下个PR 清理 刚好 PR 冲突了,我继续在这个 PR 中清理吧
TieProductEqualOp, | ||
TieShapeOp, | ||
FuncOp, | ||
RegisterOps<DimOp, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的其他几个Op是否还有必要保留?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
再check一下,如果只是还有些无用代码未清理的问题,可以先合入,再提PR进行清理
刚好 PR 冲突了,我继续在这个 PR 中清理吧 |
… is_shape_equal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR types
Others
PR changes
Others
Description
Pcard-67164