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

fix DataLoader memory leak #34140

Merged
merged 2 commits into from
Jul 21, 2021
Merged

fix DataLoader memory leak #34140

merged 2 commits into from
Jul 21, 2021

Conversation

heavengate
Copy link
Contributor

@heavengate heavengate commented Jul 13, 2021

PR types

Bug fixes

PR changes

APIs

Describe

fix DataLoader memory leak introduced by #32550

  • register __del__ to atexit may remain a link to DataLoader object, which make DataLoader cannot be GCed when epoch finish
  • simply add __del__ to release resource can also work to fix DataLoader exit error, for __del__ will be called when DataLoader object GCed, so remove atexit register here

@paddle-bot-old
Copy link

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

@PaddlePaddle PaddlePaddle locked and limited conversation to collaborators Jul 19, 2021
@PaddlePaddle PaddlePaddle unlocked this conversation Jul 19, 2021
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

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.

2 participants