Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,12 @@ viz/
# Rendered video outputs (only the GIFs in assets/ are committed, via Git LFS)
*.mp4

.cache/

build/
build_tests/

*.pyc

# Design notes are kept locally, not in the repository
docs/design/
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ if(BUILD_TESTING)
tests/factor_manifold_facade_test.cpp
tests/dense_linear_solver_test.cpp
tests/dense_cholesky_solver_test.cpp
tests/block_sparse_cholesky_solver_test.cpp
tests/dense_qr_solver_test.cpp
tests/gauss_newton_test.cpp
tests/so2_manifold_test.cpp
Expand All @@ -235,6 +236,9 @@ if(BUILD_TESTING)
tests/decreasing_scale_minimizer_test.cpp
tests/synthetic_pgo_test.cpp
tests/synthetic_sba_test.cpp
tests/schur_system_test.cpp
tests/stereo_loop_ba_test.cpp
tests/triple_smooth_factor_batch.cu
tests/dense_matrix_ops_test.cpp
tests/utils_test.cpp
tests/device_vector_test.cpp
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ See [`python/examples`](python/examples/README.md) to run them.
| **Built-in factors** | Reprojection, PnP, between (SO(2)/SO(3)/SE(2)/SE(3)/Sim(2)/Sim(3)/SL(4)/vector), point-to-point, point-to-plane, symmetric point-to-plane, prior, constant-velocity/constant-acceleration motion priors (SO(2)/SO(3)/SE(2)/SE(3)) |
| **Custom factors and states** | CuPy / NVIDIA Warp kernels in Python, or user-defined CUDA kernels via `SizedFactorBatch` / `SizedStateBatch` in C++; the same types work with every minimizer, including RANSAC — see [Custom factors and states](docs/sphinx/custom_factors_and_states.rst) |
| **Numeric Jacobians** | Finite-difference Jacobians for any factor batch (manifold-aware, reuses each state's `Plus` retraction), selectable globally (`MinimizerOptions.jacobian_mode`) or per factor group (the `jacobian_mode_override` of `Problem.add_factor_batch`) — write a factor with only a residual and let cuNLS differentiate it; see [Numeric Jacobians](docs/sphinx/numeric_jacobians.rst) |
| **Linear solver** | Block-sparse PCG (variable block-Jacobi preconditioner, default), NVIDIA cuDSS (optional, loaded via `dlopen()` at runtime — see [C++ Installation](docs/sphinx/installation.rst)), dense LDLT, dense Cholesky (cuSOLVER), dense QR (cuSOLVER) |
| **Linear solver** | Supernodal block-sparse Cholesky (built in, default: exact steps; also solves the Schur complement of bundle adjustment), block-sparse PCG (variable block-Jacobi preconditioner), NVIDIA cuDSS (optional, loaded via `dlopen()` at runtime — see [C++ Installation](docs/sphinx/installation.rst)), block-tridiagonal Cholesky, dense LDLT, dense Cholesky (cuSOLVER), dense QR (cuSOLVER). Guide: [Linear systems and solvers](docs/sphinx/linear_solvers.rst) |
| **Safety checks** | Optional runtime validation (linear-solver diagnostics and more), off by default for low-latency solves — enable with `MinimizerOptions::disable_safety_checks = false` when debugging |
| **Execution model** | Fully asynchronous via CUDA streams |

Expand Down
26 changes: 0 additions & 26 deletions cunls/common/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,32 +151,6 @@ using pvector = PinnedVector<T>;
* - col_ids: column indices of non-zero entries (size = num_nonzeros).
* - values: non-zero values (size = num_nonzeros).
*/
/**
* @brief Cached sparse matrix dimensions.
*
* Stores num_rows, num_cols, and num_nonzeros so that repeated GPU scans
* (e.g. thrust::max_element + cudaStreamSynchronize) can be avoided in
* hot loops. Populated once during initialization via ExtractMatrixMetadata
* and reused thereafter.
*/
struct CSRMatrixDimensions {
int num_rows = -1;
int num_cols = -1;
int num_nonzeros = -1;

void Set(int rows, int cols, int nnz) {
num_rows = rows;
num_cols = cols;
num_nonzeros = nnz;
}

void Invalidate() {
num_rows = -1;
num_cols = -1;
num_nonzeros = -1;
}
};

/**
* @brief Compressed Sparse Row (CSR) matrix stored in GPU memory.
*
Expand Down
2 changes: 2 additions & 0 deletions cunls/linear_solver/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
add_library(cunls_linear_solver OBJECT
block_sparse_cholesky_analysis.cpp
block_sparse_cholesky_solver.cu
block_sparse_pcg_solver.cu
block_tridiagonal_solver.cu
dense_cholesky_solver.cu
Expand Down
Loading
Loading