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] Add compatible reshape method for Tensor #37281

Merged

Conversation

chenwhql
Copy link
Contributor

@chenwhql chenwhql commented Nov 17, 2021

PR types

Function optimization

PR changes

APIs

Describe

[PTen] Add compatible reshape method for Tensor

#37122 的TODO事项之一,恢复Tensor的reshape接口支持,确保兼容,目前reshape本质上仍是底层Tensor的Resize功能,由于这里reshape接口的含义和Python端reshape接口含义有出入,所以这里的reshape将会deprecated

@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 18, 2021
"instead. "
"reason: `reshape` means changing the tensor shape without "
"touching underlying data, this requires the total size of "
"the tensor to remains constant.";
Copy link
Contributor

Choose a reason for hiding this comment

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

to remains => to remain

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done, thx

YuanRisheng
YuanRisheng previously approved these changes Nov 18, 2021
zyfncg
zyfncg previously approved these changes Nov 18, 2021
framework::make_ddim(shape));
} else {
PADDLE_THROW(platform::errors::Unimplemented(
"Only supported reshape operation on DenseTensor now."));
Copy link
Contributor

Choose a reason for hiding this comment

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

support?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done, thx

@PaddlePaddle PaddlePaddle locked and limited conversation to collaborators Nov 18, 2021
@PaddlePaddle PaddlePaddle unlocked this conversation Nov 18, 2021
@chenwhql chenwhql merged commit 715fd05 into PaddlePaddle:develop Nov 19, 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.

5 participants