-
Notifications
You must be signed in to change notification settings - Fork 9
Winter 2025 linops #115
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
base: main
Are you sure you want to change the base?
Winter 2025 linops #115
Conversation
…ration of orthonormality loss in the code itself
…now); modified ABRIK testing to expose an inefficiency
rileyjmurray
left a comment
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.
You should just make a CompositeOperator class that accepts two abstract linear operators as template parameters. That would be much more flexible.
Yeah, you're right. |
…or. This allowed me to significantly simplkify the composite operator (which no longer is hardcoded to have sparse right side).
|
Riley says "I strongly dislike this densification. I'd ask that we log a warning to std::cerr when this codepath is hit. Later on we can figure out when's okay to be quiet about densifying." I guess I dont need the sparse * sparse case rn, so I'l comment the densification out and add a cerr for now. |
…ding how regular CQRRT should properly function for low-rank cases
…now is said to only accept full-rank inputs
…omposit operator because Eigen's solvers are column-major
…n cholsolver kills us
|
For the past couple of days, I was working on figuring out an issue where CQRRT_linop with nested compisut operator input (cholsolver op, sparse op, dense op) was exhibiting poor orthogonality in the Q factor upon any sparse inputs into the cholsolver_linop (dense cases worked fine). The solution was to disable Eigen's use of fill-reduce pertmutations in sparse cholsolver. Root Cause: Eigen's Solution: Force natural ordering (no permutations) by specifying |
|
At the moment, there is lots of diagnostic code in the repo. |
|
This PR is completed; I will brgin breaking it up into multiple smaller PRs now. |
This PR is a part of of #115, which will be broken up into more digestible parts and closed. This PR intoduces refined abstract linear operator support (with testing) and adds a new "composite" linear operator type. Core changes: 1. Linear Operators (rl_linops.hh): - Extended DenseLinOp and SparseLinOp with full multiplication support (both Side::Left and Side::Right) - Added row-major layout support for dense operators - Added CompositeLinOp class for operator composition (e.g., A = B * C) - Added tests for each linop type 2. Matrix Generation (rl_gen.hh) - Added gen_random_dense() with layout support - Added gen_sparse_coo() and gen_sparse_csc() for sparse matrix generation - New matrix generation functions do not rely on "mat_info" struct so that the matrices can be generated straightforwardly 3. Utilities (rl_util.hh, rl_util_test.hh) - Reorganized utility functions used specifically in tests into separate header (rl_util_test.hh) - Added sparse_to_dense_summing_duplicates() for sparse-to-dense conversion 4. Drivers - Minor updates to rl_abrik and its benchmarks for linop compatability (unsure why the whole driver file appears reworked) - rl_cqrrt is refactored to make sure it only processes full-rank matrices
WIP