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

Replace EagerTensor with Tensor #39376

Merged
merged 13 commits into from
Feb 9, 2022

Conversation

JiabinYang
Copy link
Contributor

PR types

Function optimization

PR changes

Others

Describe

This PR using Tensor to replace EagerTensor to optimize eager performance in most cases.
Some important changes:

  1. Make EagerTensor a simple wrapper of variable (with name and framework::Variable )
  2. Support pten::SelectedRows in Tensor and support grad accumulation of pten::SelectedRows and pten::DenseTensor
  3. Make new EagerTensor a friend class of pten::SelectedRows to reconstruct it from framework::Variable to Tensor
  4. Adjust all supported API with Tensor
  5. Update code gene for mid and final state
  6. Optimize some utils method in EagerUtils to adjust new data structure.

@paddle-bot-old
Copy link

paddle-bot-old bot commented Feb 7, 2022

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

Copy link
Contributor

@chenwhql chenwhql 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 PADDLE_ENFORCE

Copy link
Contributor

@XieYunshen XieYunshen 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 set_tests_properties(test_imperative_lod_tensor_to_selected_rows PROPERTIES TIMEOUT 200) set_tests_properties(test_imperative_optimizer_v2 PROPERTIES TIMEOUT 150)

@JiabinYang JiabinYang merged commit 945a3ce into PaddlePaddle:develop Feb 9, 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.

5 participants