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

Clean-up CUDA cache. #6325

Merged
merged 2 commits into from
Jan 19, 2024
Merged

Clean-up CUDA cache. #6325

merged 2 commits into from
Jan 19, 2024

Conversation

ysiraichi
Copy link
Collaborator

This PR clears CUDA cache on 2 cases:

  • benchmark instance was deleted (i.e. it was first instantiated with cuda as device, but it's not needed anymore)
  • inner model has to be moved to an XLA device

Additionally, it also fixes a bug where the instantiated benchmark wouldn't be deleted if it didn't have a default precision set (in default_precision_flag property).

@ysiraichi ysiraichi merged commit 423bb0b into master Jan 19, 2024
18 checks passed
@vanbasten23
Copy link
Collaborator

Sorry for the late review. What issue do we get if we don't clean up the CUDA cache? @ysiraichi

@ysiraichi
Copy link
Collaborator Author

I was getting OOM when training llama_v2_7b_16h with both inductor and openxla backends.

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.

3 participants