Repository navigation
Reduce memory and intermediate work in packing and minimization - #587
Merged
Merged
Conversation
kierandidi
marked this pull request as ready for review
October 11, 2026 04:34
This was referenced Oct 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scoring, repacking, and minimization retain large temporary arrays that can be avoided without changing public APIs or numerical behavior. This combines the performance work from #587, #588 and #589:
Matched measurements: CUDA workspace peak falls by 10.10 MiB in the capacity probe; CPU rotamer construction improves from 120.25 to 111.35 ms (one pose) and 337.01 to 310.95 ms (three poses); ragged forest host peak falls from 22.87 to 10.99 MB. L-BFGS helpers improve 1.09–1.23× at histories 32/128, with operator allocation totals falling from 36.9 to 0.80 MB in the large-history probe. History 8 can be about 3% slower (~2 μs). These are component results: full packing/FastRelax timing did not establish an end-to-end speedup. Separate-process packing results were noisy/slower; alternating same-process comparisons were neutral.
Validation: 405 CPU packing tests and 120 CPU optimization tests passed, plus independent recurrence/autograd and real-minimization parity checks. On L40S / CUDA 13 / PyTorch 2.10.0a0, 136 integrated CUDA tests passed; the final empty-pose fix then passed all 31 streaming-graph CUDA tests and 15 focused CPU tests. Seeded comparisons preserve scores, coordinates, assignments, and subsequent RNG draws. The consolidated components exactly match those tested commits; formatting and diff checks pass. GitHub CI and repository review remain the merge gates.
Companion PRs: #583 for environment/release/docs; #590 for cleanup. This PR absorbs #588 and #589.