Skip to content

Clean up memory management in impl_func_norm #155432

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

skotapati
Copy link
Collaborator

@skotapati skotapati commented Jun 9, 2025

Explicitly allocating & autoreleasing the various data structures in impl_func_norm reduces memory growth. Should help mitigate #154329

Copy link

pytorch-bot bot commented Jun 9, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/155432

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 8089abf with merge base 3040ca6 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot bot added ciflow/mps Run MPS tests (subset of trunk) release notes: mps Release notes category labels Jun 9, 2025
@skotapati skotapati changed the title Expiremental fixes for memory leaks Experimental fixes for memory leaks Jun 9, 2025
@skotapati skotapati changed the title Experimental fixes for memory leaks Clean up memory management in ReduceOps.mm Jun 11, 2025
@skotapati skotapati changed the title Clean up memory management in ReduceOps.mm Clean up memory management in impl_func_norm Jun 11, 2025
@skotapati skotapati marked this pull request as ready for review June 11, 2025 21:16
@skotapati
Copy link
Collaborator Author

When combined with #155602, resolves 95% of memory growth seen in #154329. Checking torchbench to ensure speed hasn't regressed

@skotapati
Copy link
Collaborator Author

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Successfully rebased dev/skotapati/leak_fixes onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout dev/skotapati/leak_fixes && git pull --rebase)

@pytorchmergebot pytorchmergebot force-pushed the dev/skotapati/leak_fixes branch from 4c417f5 to 8089abf Compare June 11, 2025 22:25
@janeyx99 janeyx99 added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Jun 13, 2025
@djphoenix djphoenix mentioned this pull request Jul 19, 2025
Copy link
Contributor

Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as Stale.
Feel free to remove the Stale label if you feel this was a mistake.
If you are unable to remove the Stale label please contact a maintainer in order to do so.
If you want the bot to never mark this PR stale again, add the no-stale label.
Stale pull requests will automatically be closed after 30 days of inactivity.

@github-actions github-actions bot added the Stale label Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/mps Run MPS tests (subset of trunk) open source release notes: mps Release notes category Stale triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants