GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add Schur completment and its mat-free mode by zitongzhan · Pull Request #35 · pypose/bae

Conversation

@zitongzhan

@zitongzhan zitongzhan commented May 24, 2026

Copy link
Copy Markdown
Collaborator

This pull request introduces significant improvements to the optimizer infrastructure, focusing on enhanced memory profiling, a new Schur complement optimizer, and better support for matrix-free operations.

Optimizer Enhancements

  • Added a new Schur optimizer class in bae.optim.optimizer, implementing the Schur complement method with support for both standard and matrix-free normal equations, block Jacobi preconditioning, and efficient memory usage.

  • Updated the LM optimizer to support a matrix_free_normal mode, allowing for more efficient computation and memory usage in large-scale problems.

  • Add a custom TrustRegion class that supports Warp, especially for use with the Schur optimizer.

Sparse Matrix and PyOps Improvements

  • Improved sparse matrix operations, including fixes to inv_op for correct tensor creation and a new test block in py_ops.py for diagonal operations on CUDA.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gemini-code-assist[bot] reacted with eyes emoji
All reactions
  • 👀 1 reaction
zitongzhan and others added 25 commits December 15, 2025 03:12
@zitongzhan
add normal matvec and memory profiler
9490ff8
@zitongzhan
print peak cuda allocation
9c90aca
@zitongzhan
add warp memory pool report
6256e79
@zitongzhan
use A._get_Jt when matrix_free_normal
3a5ce9b
@zitongzhan
add back schur by warp's matmul
0064146
@zitongzhan
safely import cudss
acd1b3c
@zitongzhan
Add future plans section to README
91c8ade
Added a section for future plans including a new backend for distributed solver.
@zitongzhan
add normal matvec and memory profiler
19774c3
@zitongzhan
print peak cuda allocation
4ca9c86
@zitongzhan
add warp memory pool report
b71f1a3
@zitongzhan
use A._get_Jt when matrix_free_normal
d678867
@zitongzhan
add back schur by warp's matmul
d127b88
@zitongzhan
Merge branch 'schur-matmul' of github.com:zitongzhan/bae_private into…
fa9ab70
… schur-matmul
@SEOKWOOPARK
Merge remote-tracking branch 'upstream/release' into schur-matmul
6619808
@SEOKWOOPARK
Preventing TrustRegion from accepting diverging steps
3e4761d
@SEOKWOOPARK
fix(optimizer/LM): Remove redundant solver calls so matrix_free_norma…
5d9e2b2
…l path runs
@SEOKWOOPARK
feat(optim/Schur): Add Matrix-Free path and matrix_free_normal branch
e34bea2
@SEOKWOOPARK
Resolving conflict with release branch in README
5f4f093
@SEOKWOOPARK
Version up to 0.2.1
f64d00b
@SEOKWOOPARK
Fix deprecated function in Warp
40798f1
@SEOKWOOPARK
Replace Warp with Triton kernels and adjust corresponding codes
165104d
@SEOKWOOPARK
Remove codes relevant to Chunk
b305f81
@SEOKWOOPARK
Merge branch 'release' into memory-issue-swp
3a97f9e
@SEOKWOOPARK
Remove ba_helpers.py
a0b4b8b
@SEOKWOOPARK
Fix a conflict in ba_example.py
f46fb74
github-code-quality[bot]
github-code-quality Bot found potential problems May 24, 2026
View reviewed changes
Comment thread bae/sparse/warp_wrappers.py Fixed

Uh oh!

There was an error while loading. Please reload this page.

Comment thread bae/optim/optimizer.py Fixed

Uh oh!

There was an error while loading. Please reload this page.

Comment thread bae/sparse/py_ops.py Fixed

Uh oh!

There was an error while loading. Please reload this page.

gemini-code-assist[bot]
gemini-code-assist Bot reviewed May 24, 2026
View reviewed changes

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces high-performance Triton kernels for sparse BSR operations, including matrix-vector multiplication, matrix-matrix multiplication, and transposition. It also implements a matrix-free NormalMatVec operator and a new Schur complement-based optimizer to improve the efficiency of bundle adjustment tasks. The bundle adjustment example was updated with CUDA memory snapshotting and Warp mempool reporting. Review feedback highlights a critical issue where in-place diagonal modifications in the LM and Schur optimizers cause damping factors to accumulate incorrectly during step rejections. Additionally, the reviewer recommends removing performance-hindering torch.cuda.empty_cache() calls, addressing potential divisions by zero in the Conjugate Gradient solver, and cleaning up redundant or commented-out code.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread bae/optim/optimizer.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread bae/optim/optimizer.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread bae/optim/optimizer.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread bae/optim/triton_kernel.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread bae/optim/triton_kernel.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread bae/sparse/warp_wrappers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread bae/utils/pysolvers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

zitongzhan and others added 3 commits May 23, 2026 20:35
@zitongzhan @github-code-quality
Potential fix for pull request finding 'Variable defined multiple times'
48ad787
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
@zitongzhan @github-code-quality
Potential fix for pull request finding 'Unused local variable'
8cc6eb3
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
@zitongzhan
minimize diff
074b931
SEOKWOOPARK added 3 commits May 30, 2026 22:19
@SEOKWOOPARK
Rollback unnecessary changes in gitignore
dff7575
@SEOKWOOPARK
Rollback single quote to double quote in ba_example.py
2bf5e62
@SEOKWOOPARK
Rollback the optimizer's default class from Schur to LM and adjust up…
50075ec
…date function in TrustRegion to make it run in LM
github-code-quality[bot]
github-code-quality Bot found potential problems May 30, 2026
View reviewed changes
Comment thread ba_example.py Fixed

Uh oh!

There was an error while loading. Please reload this page.

SEOKWOOPARK added 7 commits May 30, 2026 23:43
@SEOKWOOPARK
Remove class Reproj and use Residual
0ced1df
@SEOKWOOPARK
Rollback single to double quote in Time print
ba6dc25
@SEOKWOOPARK
Remove overlapped torch.synchronize
13dc2a2
@SEOKWOOPARK
Single quote -> double quote in dataset's key
ec3262e
@SEOKWOOPARK
Rollback dataset's declaration in main
f5c1751
@SEOKWOOPARK
Remove rotate_quat
90b14f8
@SEOKWOOPARK
Rollback least_square_error's parameter name
6bb75ee
github-code-quality[bot]
github-code-quality Bot found potential problems May 31, 2026
View reviewed changes
Comment thread ba_example.py Fixed

Uh oh!

There was an error while loading. Please reload this page.

SEOKWOOPARK added 4 commits May 31, 2026 00:25
@SEOKWOOPARK
Remove unused variable 'USE_QUATERNIONS'
a55f607
@SEOKWOOPARK
Retrieve print for Initial loss
d7f9ebc
@SEOKWOOPARK
Retrieve the decorator
077dce4
@SEOKWOOPARK
Remove overlapped import
fb41830
github-code-quality[bot]
github-code-quality Bot found potential problems May 31, 2026
View reviewed changes
Comment thread ba_example.py Fixed

Uh oh!

There was an error while loading. Please reload this page.

SEOKWOOPARK added 3 commits May 31, 2026 03:04
@SEOKWOOPARK
Remove empty_cache()
60a9530
@SEOKWOOPARK
Rollback variable names in class LM
7adb46e
@SEOKWOOPARK
Transfer TrustRegion and Adaptive into strategy.py in the optim direc…
49a18f1
…tory
github-code-quality[bot]
github-code-quality Bot found potential problems Jun 1, 2026
View reviewed changes
Comment thread ba_example.py Fixed

Uh oh!

There was an error while loading. Please reload this page.

SEOKWOOPARK and others added 2 commits May 31, 2026 22:04
@SEOKWOOPARK @github-code-quality
Potential fix for pull request finding 'Unused import'
8196c03
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
@SEOKWOOPARK
Store ba_example.py in a new file temporaily and retrieve it into the…
1ef56b4
… release's version
github-code-quality[bot]
github-code-quality Bot found potential problems Jun 1, 2026
View reviewed changes
Comment thread examples/schur.py Dismissed

Uh oh!

There was an error while loading. Please reload this page.

@SEOKWOOPARK
SEOKWOOPARK self-requested a review June 1, 2026 21:44
@zitongzhan
zitongzhan requested review from SEOKWOOPARK and removed request for SEOKWOOPARK June 1, 2026 23:41
SEOKWOOPARK
SEOKWOOPARK approved these changes Jun 2, 2026
View reviewed changes
@zitongzhan
zitongzhan merged commit 9f28349 into release Jun 2, 2026
3 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@zitongzhan
zitongzhan deleted the memory-issue-swp branch July 19, 2026 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@SEOKWOOPARK SEOKWOOPARK SEOKWOOPARK approved these changes
+2 more reviewers
@gemini-code-assist gemini-code-assist[bot] gemini-code-assist[bot] left review comments
@github-code-quality github-code-quality[bot] github-code-quality[bot] left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@zitongzhan @SEOKWOOPARK
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.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.