Skip to content

[dynamo][guards] Fix mem leak in tensor subclass metadata guard#167352

Closed
anijain2305 wants to merge 1 commit intogh/anijain2305/949/basefrom
gh/anijain2305/949/head
Closed

[dynamo][guards] Fix mem leak in tensor subclass metadata guard#167352
anijain2305 wants to merge 1 commit intogh/anijain2305/949/basefrom
gh/anijain2305/949/head

Conversation

@anijain2305
Copy link
Contributor

@anijain2305 anijain2305 commented Nov 7, 2025

Stack from ghstack (oldest at bottom):

Use cls instead of the object. Earlier the metadata guard was holding on
to the Dtensor causing mem leak.

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @amjames @Lucaskabela

Use cls instead of the object. Earlier the metadata guard was holding on
to the Dtensor causing mem leak.

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Nov 7, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit fa78e2e with merge base 2f52235 (image):
💚 Looks good so far! There are no failures yet. 💚

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

anijain2305 added a commit that referenced this pull request Nov 7, 2025
Use cls instead of the object. Earlier the metadata guard was holding on
to the Dtensor causing mem leak.

ghstack-source-id: aebdaf4
Pull Request resolved: #167352
@anijain2305 anijain2305 added ciflow/trunk Trigger trunk jobs on your pull request topic: not user facing topic category labels Nov 7, 2025
@anijain2305
Copy link
Contributor Author

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@ruomingp
Copy link

ruomingp commented Nov 8, 2025

Thanks! Is there a test that can be added?

Silv3S pushed a commit to Silv3S/pytorch that referenced this pull request Nov 18, 2025
…rch#167352)

Use cls instead of the object. Earlier the metadata guard was holding on
to the Dtensor causing mem leak.

Pull Request resolved: pytorch#167352
Approved by: https://github.com/Skylion007
@github-actions github-actions bot deleted the gh/anijain2305/949/head branch December 8, 2025 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants