Expose sequence Cholesky solver in PyMomentum (#1397)#1397
Closed
cdtwigg wants to merge 2 commits into
Closed
Conversation
Contributor
|
@cdtwigg has exported this pull request. If you are a Meta employee, you can view the originating Diff in D105079594. |
meta-codesync Bot
pushed a commit
that referenced
this pull request
May 14, 2026
Summary: Expose the sequence Cholesky solver through pymomentum.solver2 on top of the Momentum solver diff. The binding adds SequenceSolverType so Python callers can choose QR or Cholesky through solve_sequence(). It exposes SequenceCholeskySolverOptions including chunk_size, target_rows_per_jtj_chunk, and use_block_ldlt, and exposes SequenceCholeskySolver with read-only last_normal_equation_time_ms and last_linear_solve_time_ms timing properties. This also updates repr/type stubs and keeps common inherited solver options on the base binding rather than duplicating Python properties. Reviewed By: cstollmeta Differential Revision: D105079594
8b4ef79 to
1779963
Compare
meta-codesync Bot
pushed a commit
that referenced
this pull request
May 14, 2026
Summary: Expose the sequence Cholesky solver through pymomentum.solver2 on top of the Momentum solver diff. The binding adds SequenceSolverType so Python callers can choose QR or Cholesky through solve_sequence(). It exposes SequenceCholeskySolverOptions including chunk_size, target_rows_per_jtj_chunk, and use_block_ldlt, and exposes SequenceCholeskySolver with read-only last_normal_equation_time_ms and last_linear_solve_time_ms timing properties. This also updates repr/type stubs and keeps common inherited solver options on the base binding rather than duplicating Python properties. Reviewed By: cstollmeta Differential Revision: D105079594
1779963 to
25a96ad
Compare
meta-codesync Bot
pushed a commit
that referenced
this pull request
May 15, 2026
Summary: Expose the sequence Cholesky solver through pymomentum.solver2 on top of the Momentum solver diff. The binding adds SequenceSolverType so Python callers can choose QR or Cholesky through solve_sequence(). It exposes SequenceCholeskySolverOptions including chunk_size, target_rows_per_jtj_chunk, and use_block_ldlt, and exposes SequenceCholeskySolver with read-only last_normal_equation_time_ms and last_linear_solve_time_ms timing properties. This also updates repr/type stubs and keeps common inherited solver options on the base binding rather than duplicating Python properties. Reviewed By: cstollmeta Differential Revision: D105079594
25a96ad to
b4acdb1
Compare
meta-codesync Bot
pushed a commit
that referenced
this pull request
May 15, 2026
Summary: Expose the sequence Cholesky solver through pymomentum.solver2 on top of the Momentum solver diff. The binding adds SequenceSolverType so Python callers can choose QR or Cholesky through solve_sequence(). It exposes SequenceCholeskySolverOptions including chunk_size, target_rows_per_jtj_chunk, and use_block_ldlt, and exposes SequenceCholeskySolver with read-only last_normal_equation_time_ms and last_linear_solve_time_ms timing properties. This also updates repr/type stubs and keeps common inherited solver options on the base binding rather than duplicating Python properties. Reviewed By: cstollmeta Differential Revision: D105079594
b4acdb1 to
332535b
Compare
meta-codesync Bot
pushed a commit
that referenced
this pull request
May 15, 2026
Summary: Expose the sequence Cholesky solver through pymomentum.solver2 on top of the Momentum solver diff. The binding adds SequenceSolverType so Python callers can choose QR or Cholesky through solve_sequence(). It exposes SequenceCholeskySolverOptions including chunk_size, target_rows_per_jtj_chunk, and use_block_ldlt, and exposes SequenceCholeskySolver with read-only last_normal_equation_time_ms and last_linear_solve_time_ms timing properties. This also updates repr/type stubs and keeps common inherited solver options on the base binding rather than duplicating Python properties. Reviewed By: cstollmeta Differential Revision: D105079594
332535b to
5e07c17
Compare
meta-codesync Bot
pushed a commit
that referenced
this pull request
May 15, 2026
Summary: Expose the sequence Cholesky solver through pymomentum.solver2 on top of the Momentum solver diff. The binding adds SequenceSolverType so Python callers can choose QR or Cholesky through solve_sequence(). It exposes SequenceCholeskySolverOptions including chunk_size, target_rows_per_jtj_chunk, and use_block_ldlt, and exposes SequenceCholeskySolver with read-only last_normal_equation_time_ms and last_linear_solve_time_ms timing properties. This also updates repr/type stubs and keeps common inherited solver options on the base binding rather than duplicating Python properties. Reviewed By: cstollmeta Differential Revision: D105079594
5e07c17 to
ed1182c
Compare
meta-codesync Bot
pushed a commit
that referenced
this pull request
May 15, 2026
Summary: Expose the sequence Cholesky solver through pymomentum.solver2 on top of the Momentum solver diff. The binding adds SequenceSolverType so Python callers can choose QR or Cholesky through solve_sequence(). It exposes SequenceCholeskySolverOptions including chunk_size, target_rows_per_jtj_chunk, and use_block_ldlt, and exposes SequenceCholeskySolver with read-only last_normal_equation_time_ms and last_linear_solve_time_ms timing properties. This also updates repr/type stubs and keeps common inherited solver options on the base binding rather than duplicating Python properties. Reviewed By: cstollmeta Differential Revision: D105079594
9c002bb to
8fdfdea
Compare
meta-codesync Bot
pushed a commit
that referenced
this pull request
May 15, 2026
Summary: Expose the sequence Cholesky solver through pymomentum.solver2 on top of the Momentum solver diff. The binding adds SequenceSolverType so Python callers can choose QR or Cholesky through solve_sequence(). It exposes SequenceCholeskySolverOptions including chunk_size, target_rows_per_jtj_chunk, and use_block_ldlt, and exposes SequenceCholeskySolver with read-only last_normal_equation_time_ms and last_linear_solve_time_ms timing properties. This also updates repr/type stubs and keeps common inherited solver options on the base binding rather than duplicating Python properties. Reviewed By: cstollmeta Differential Revision: D105079594
Summary: Add a separate `SequenceCholeskySolver` for sequence problems where the existing online-QR solver is too expensive. The new solver accumulates compact banded normal equations online, packs frame-local and universal columns contiguously before `J^T J`, supports chunked multithreaded accumulation with deterministic boundary and sequence-error handling, and solves the banded system with block LDLT by default. A scalar banded LDLT path remains user-switchable for debugging and benchmarking. Compact normal-equation accumulation defaults to double precision so float error functions can still evaluate residuals and Jacobians in float without losing precision before the double LDLT solve. This diff also extracts shared sequence-solver helpers into `SequenceSolverBase`, exposes read-only `SequenceSolverFunction` accessors needed by the solver, wires the new solver into Momentum build/fwd generation, adds solver timing counters for normal-equation accumulation and linear solve, and adds a benchmark target that compares QR, block LDLT, scalar LDLT behavior, chunk size, `J^T J` packing, double normal-equation accumulation, and 93-joint larger-character cases. Reviewed By: cstollmeta Differential Revision: D105035576
Summary: Expose the sequence Cholesky solver through pymomentum.solver2 on top of the Momentum solver diff. The binding adds SequenceSolverType so Python callers can choose QR or Cholesky through solve_sequence(). It exposes SequenceCholeskySolverOptions including chunk_size, target_rows_per_jtj_chunk, and use_block_ldlt, and exposes SequenceCholeskySolver with read-only last_normal_equation_time_ms and last_linear_solve_time_ms timing properties. This also updates repr/type stubs and keeps common inherited solver options on the base binding rather than duplicating Python properties. Reviewed By: cstollmeta Differential Revision: D105079594
8fdfdea to
3e83c5f
Compare
Contributor
|
This pull request has been merged in 3e3241e. |
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.
Summary:
Expose the sequence Cholesky solver through pymomentum.solver2 on top of the Momentum solver diff.
The binding adds SequenceSolverType so Python callers can choose QR or Cholesky through solve_sequence(). It exposes SequenceCholeskySolverOptions including chunk_size, target_rows_per_jtj_chunk, and use_block_ldlt, and exposes SequenceCholeskySolver with read-only last_normal_equation_time_ms and last_linear_solve_time_ms timing properties.
This also updates repr/type stubs and keeps common inherited solver options on the base binding rather than duplicating Python properties.
Reviewed By: cstollmeta
Differential Revision: D105079594