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

Fix adjoint memory leak in ExpressionGraph #486

Conversation

calcmogul
Copy link
Member

There was a circular reference between adjoints and their parent expressions that prevented them from being freed. The adjoints are now unlinked when they're no longer needed.

The Hessian tests were instrumented to confirm all Expressions were freed at the end of each test.

PoolResource and PoolAllocator were restructured to take the chunk size at runtime for ease of use, and the default chunk size was reduced to 16384.

@calcmogul calcmogul force-pushed the fix-adjoint-memleak-in-expression-graph branch 4 times, most recently from 0dc407a to f15c9b0 Compare April 5, 2024 01:30
There was a circular reference between adjoints and their parent
expressions that prevented them from being freed. The adjoints are now
unlinked when they're no longer needed.

The Hessian tests were instrumented to confirm all Expressions were
freed at the end of each test.

PoolResource and PoolAllocator were restructured to take the chunk size
at runtime for ease of use, and the default chunk size was reduced to
16384.
@calcmogul calcmogul merged commit ad884ed into SleipnirGroup:main Apr 5, 2024
28 checks passed
@calcmogul calcmogul deleted the fix-adjoint-memleak-in-expression-graph branch April 5, 2024 01:43
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.

1 participant