Repository navigation
[CINN]Add more infer shape funcs - #65889
Merged
Hongqing-work merged 5 commits intoJul 25, 2024
Merged
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
zyfncg
approved these changes
Jul 24, 2024
Comment on lines
+405
to
+421
| bool FillDiagonalOpInferSymbolicShape( | ||
| pir::Operation *op, pir::InferSymbolicShapeContext *infer_context) { | ||
| const auto &x_shape_or_data = | ||
| infer_context->GetShapeOrDataForValue(op->operand_source(0)); | ||
| std::vector<symbol::DimExpr> x_dims = x_shape_or_data.shape(); | ||
|
|
||
| infer_context->SetShapeOrDataForValue( | ||
| op->result(0), | ||
| symbol::ShapeOrDataDimExprs{symbol::TensorShapeOrDataDimExprs(x_dims)}); | ||
|
|
||
| return true; | ||
| } | ||
|
|
||
| bool FillDiagonal_OpInferSymbolicShape( | ||
| pir::Operation *op, pir::InferSymbolicShapeContext *infer_context) { | ||
| return FillDiagonalOpInferSymbolicShape(op, infer_context); | ||
| } |
Collaborator
There was a problem hiding this comment.
这个是不就算same input result类型的算子了?
Collaborator
Author
There was a problem hiding this comment.
算,但是它其实还有一个输入,只不过没建立约束关系,我认为多输入的最好还是不要放在same input这类里面,感觉稍微有点歧义
Collaborator
Author
There was a problem hiding this comment.
确认了下,FillDiagonalTensor为两个输入,FillDiagonal为单个输入
Closed
lixcli
pushed a commit
to lixcli/Paddle
that referenced
this pull request
Aug 5, 2024
* [CINN]Add more infer_symbol_shape * add interface in yaml * fix
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
Improvements
Description
Pcard-67164
This PR adds InferSymbolicShapeInterface for
fft_c2c,fft_c2r,fft_r2c,fill,fill_diagonal,fill_diagonal_tensor