Skip to content

Fix memory leak#20

Open
fiedorowicz1 wants to merge 1 commit into
LBANN:mainfrom
fiedorowicz1:fix-ref-count-leak
Open

Fix memory leak#20
fiedorowicz1 wants to merge 1 commit into
LBANN:mainfrom
fiedorowicz1:fix-ref-count-leak

Conversation

@fiedorowicz1
Copy link
Copy Markdown
Contributor

As noted in #17, the custom to/from dctensor autograd functions can create memory leaks due to circular references being created and the garbage collector being unable to properly account for internal torch c++ references.

This PR fixes the reproducer in the issue and passes existing tests.

Co-authored-by: Josh Williams <josh.williams@stfc.ac.uk>
@fiedorowicz1 fiedorowicz1 requested a review from benson31 May 28, 2026 18:06
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