Skip to content
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

[PIR][DynamicShape] Add InferSymbolicShape interfaces for llama ops #61439

Merged
merged 2 commits into from
Feb 2, 2024

Conversation

lanxianghit
Copy link
Contributor

PR types

Others

PR changes

Others

Description

Pcard-67164
先一次性添加LLaMA中可能用到算子的InferSymbolicShape interfaces,以免每次都需要更改yaml

Comment on lines +189 to +197
bool ArangeOpInferSymbolicShape(pir::Operation *op,
pir::ShapeConstraintIRAnalysis *shape_analysis);

bool EmbeddingOpInferSymbolicShape(
pir::Operation *op, pir::ShapeConstraintIRAnalysis *shape_analysis);

bool SparseWeightEmbeddingOpInferSymbolicShape(
pir::Operation *op, pir::ShapeConstraintIRAnalysis *shape_analysis);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这些函数后续可以排个序,找起来更方便一些

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是的,有这个计划,,而且一个文件里算子太多了,编译和冲突的问题也越来越多,后面考虑统一拆分和整理一下

@@ -77,6 +77,7 @@
backend : place
data_transform :
support_trans_dtype : start, end, step
interfaces : paddle::dialect::InferSymbolicShapeInterface
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不太确定legacy_ops.yaml里的算子在动转静流程里还会不会生效,可能需要确认下

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个跟陈卓确认过,但具体可能还要具体测试一下看看

@lanxianghit lanxianghit merged commit 519f89c into PaddlePaddle:develop Feb 2, 2024
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants