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

Be more careful with tensor references in Hook #13

Merged
merged 1 commit into from
Mar 11, 2021
Merged

Conversation

chr5tphr
Copy link
Owner

The reference to hook.input seems to have retained, possibly due to
cyclic references. This fix now explicitly removes the references to
stored tensors when removing hooks, also the backward wrapper now only
gets a weak reference to the hook itself. This seems to fix the memory
leaks for now.

The reference to hook.input seems to have retained, possibly due to
cyclic references. This fix now explicitly removes the references to
stored tensors when removing hooks, also the backward wrapper now only
gets a weak reference to the hook itself. This seems to fix the memory
leaks for now.
@chr5tphr chr5tphr mentioned this pull request Mar 10, 2021
@chr5tphr chr5tphr merged commit 52284ed into master Mar 11, 2021
@chr5tphr chr5tphr deleted the fix_input_leak branch March 11, 2021 14:27
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.

None yet

1 participant