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

Dtensor oom #1395

Merged
merged 10 commits into from
Jul 25, 2024
Merged

Dtensor oom #1395

merged 10 commits into from
Jul 25, 2024

Conversation

dakinggg
Copy link
Collaborator

@dakinggg dakinggg commented Jul 25, 2024

Previously we were accidentally keeping extra copies of dtensors in GPU memory, which would cause an OOM. This bug was introduced in #1384. This PR fixes it by not creating extra copies of the full tensor on GPU.

Manual tests:

  • [Done] Tested a previous run with dtensors that would OOM
  • [Done] Tested a normal run with fp32 and bf16 and confirmed checkpoint sizes were correct to make sure the dtype conversion is still getting applied (there are also unit tests for this)

@dakinggg dakinggg marked this pull request as ready for review July 25, 2024 02:24
@dakinggg dakinggg requested a review from a team as a code owner July 25, 2024 02:25
Copy link
Contributor

@bigning bigning left a comment

Choose a reason for hiding this comment

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

thanks for the fix!

@dakinggg dakinggg merged commit e882658 into mosaicml:main Jul 25, 2024
9 checks passed
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