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

[CINN] Add Expr<Dim> to describe the shape of Tensor #58602

Merged
merged 10 commits into from
Nov 15, 2023

Conversation

ZzSean
Copy link
Contributor

@ZzSean ZzSean commented Nov 2, 2023

PR types

Others

PR changes

Others

Description

[CINN] Add Expr to describe the shape of Tensor and to support dynamic shape.

In order to pass CI, CINN does not use pir::shape::SymbolicDimOp for now.
When pir is completely integrated, the fake class will be replaced by pir::shape::SymbolicDimOp.

card-77050

Copy link

paddle-bot bot commented Nov 2, 2023

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.


std::string GetSymbolName() const;

int64_t GetRealDimSize() const;
Copy link
Member

Choose a reason for hiding this comment

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

What does it return when it is unknown?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the default value
static constexpr int64_t kDynamic = std::numeric_limits<int64_t>::min();

@ZzSean ZzSean closed this Nov 14, 2023
@ZzSean ZzSean reopened this Nov 14, 2023
Copy link
Member

@zhhsplendid zhhsplendid left a comment

Choose a reason for hiding this comment

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

LGTM

@ZzSean ZzSean merged commit f327256 into PaddlePaddle:develop Nov 15, 2023
28 checks passed
SecretXV pushed a commit to SecretXV/Paddle that referenced this pull request Nov 28, 2023
)

* [CINN] Add Expr<Dim> to describe the shape of Tensor

* fix conflict

* Use fake symbolic dim

* build cinn only

* spell error

* fix compile

* add sym_shape in ir::Tensor
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.

None yet

2 participants