Repository navigation
【BUAA】【Infer Symbolic Shape】add mv, shadow_feed, share_data_ - #66956
Merged
Merged
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
gongshaotian
reviewed
Aug 6, 2024
|
|
||
| bool MvOpInferSymbolicShape(pir::Operation *op, | ||
| pir::InferSymbolicShapeContext *infer_context) { | ||
| const auto &input_shape = |
Contributor
There was a problem hiding this comment.
命名不规范,这里是shape_or_data 类型,规范命名:x_shape_or_data
gongshaotian
reviewed
Aug 6, 2024
| pir::InferSymbolicShapeContext *infer_context) { | ||
| const auto &input_shape = | ||
| infer_context->GetShapeOrDataForValue(op->operand_source(0)); | ||
| const auto &vec_shape = |
Contributor
There was a problem hiding this comment.
同上,取出shape域的值后再用shape后缀
gongshaotian
reviewed
Aug 6, 2024
| phi::errors::InvalidArgument( | ||
| "The rank of input Vec should be 1, but is %d", | ||
| vec_shape.shape().size())); | ||
| PADDLE_ENFORCE_EQ(input_shape.shape()[1], |
Contributor
There was a problem hiding this comment.
这里添加的是 DimExpr 之间的约束,应该使用:infer_context->Addequalcst()
gongshaotian
reviewed
Aug 6, 2024
| OP_DECLARE_INFER_SYMBOLIC_SHAPE(Select) | ||
| OP_DECLARE_INFER_SYMBOLIC_SHAPE(ShadowFeed) | ||
| OP_DECLARE_INFER_SYMBOLIC_SHAPE(ShareData_) | ||
| OP_DECLARE_INFER_SYMBOLIC_SHAPE(ShareData__) |
Contributor
There was a problem hiding this comment.
带下划线的算子inplace名和原算子一致,删掉 ShareData__
Contributor
There was a problem hiding this comment.
🎉恭喜触发了隐藏bug,麻烦在周会时跟大家分享
Contributor
|
mv op coverage 流水线通过;sharedata_ op 有对应单测,check_pir flag为默认关闭状态;shadowfeed op 较为特殊,先不添加单测; |
gongshaotian
approved these changes
Aug 7, 2024
Contributor
|
LGTM |
luotao1
approved these changes
Aug 7, 2024
35 of 38 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Category
CINN
PR Types
Others
Description
添加 mv, shadow_feed, share_data_ 算子符号推导接口实现。