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

[PTen] change infershape dir to infermeta #37107

Merged

Conversation

chenwhql
Copy link
Contributor

PR types

Function optimization

PR changes

Others

Describe

[PTen] change infershape dir to infermeta

在目前计算库的设计中,InferShape函数的输入需要是TensorMeta,包括但不限于以下考虑:

  1. 我们的infershape函数还会包含LoD的设置等操作,并不是存粹地只对dims进行设置
  2. InferDataType在原fluid设计中存在漏洞,大部分InferDataType操作实际上是通过mutable_data完成的,导致原先的VarTypeInference组件定位模糊,而新的计算库由于Kernel注册了对应的输出数据类型,大部分场景不需要InferDataType操作,对于少数有此需求的kernel,我们将在InferMeta方法中一并完成

因此,InferShape函数整体改为InferMeta,本PR仅对目录结构进行了更改,会在后续PR更新具体的函数名

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Shixiaowei02
Shixiaowei02 previously approved these changes Nov 11, 2021
zyfncg
zyfncg previously approved these changes Nov 11, 2021
Copy link
Contributor

@MingMingShangTian MingMingShangTian left a comment

Choose a reason for hiding this comment

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

LGTM

@chenwhql chenwhql dismissed stale reviews from zyfncg and Shixiaowei02 via 001ff55 November 12, 2021 02:29
@chenwhql chenwhql merged commit 0fc9919 into PaddlePaddle:develop Nov 12, 2021
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.

4 participants