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 all InferMeta functions #39222

Merged
merged 20 commits into from
Jan 30, 2022

Conversation

chenwhql
Copy link
Contributor

@chenwhql chenwhql commented Jan 25, 2022

PR types

Function optimization

PR changes

Others

Describe

[PTen] Change all InferMeta functions

为了统一fluid和pten的InferShape(Meta)函数,将所有之前pten实现的InferMeta函数统一升级为新的写法:

旧写法(仅能用于参数DenseTensor的InferMeta):

DenseTensorMeta DotInferMeta(const DenseTensorMeta& x_meta, const DenseTensorMeta& y_meta);

新写法(可以支持DenseTensor、SelectedRows、SparseTensor、VarDesc、Variable作为输入输出):

void DotInferMeta(const MetaTensor& x, const MetaTensor& y, MetaTensor* out);

TODO:移除相应原先fluid Op的InferShape函数,接入对应的pten InferMeta函数

@paddle-bot-old
Copy link

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

paddle/pten/api/lib/api_utils.h Outdated Show resolved Hide resolved
paddle/pten/core/meta_tensor.cc Outdated Show resolved Hide resolved
paddle/pten/core/meta_tensor.cc Outdated Show resolved Hide resolved
Copy link
Contributor

@ZzSean ZzSean left a comment

Choose a reason for hiding this comment

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

LGTM for ci op benchmark

Copy link
Contributor

@XiaoguangHu01 XiaoguangHu01 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 merged commit 7e29cea into PaddlePaddle:develop Jan 30, 2022
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.

6 participants