Skip to content
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

Eigen, cuSparse and SuiteSparse solvers #1396

Open
wants to merge 97 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
801bc71
Update tests
dellaert Jun 28, 2019
15279c3
Update creation of triplets and test
dellaert Jun 30, 2019
21a13ed
Removed redundant Scatter method
dellaert Jul 2, 2019
f0f250f
Sparse Eigen solver prototype
dellaert Aug 2, 2019
877904c
Use emplace for LM prior
dellaert Aug 2, 2019
953c4ec
Modernize example to c+11 standards
dellaert Aug 2, 2019
7ad3875
fix bug in using SparseQR of Eigen
Aug 3, 2019
47b53c7
test Eigen with GaussNewton
Aug 3, 2019
b1dd8db
fix problem:y zero terms in sparseJacobian
Aug 4, 2019
3be59ed
add eigenSparseQR method to solve Ax=b
Aug 4, 2019
2c91751
if params.isEigen(), can eigenSparseQR() to solve Ax=b
Aug 4, 2019
ebf3c25
rename eigenQR method
Aug 6, 2019
9403181
add unittest for eigen choleskey solver
Aug 6, 2019
77e2223
create separate files for eigen sparse solver
Aug 6, 2019
03a73a6
add flag for eigen sparseQR and eigen cholesky, use this in nonlinear…
Aug 6, 2019
65be4d7
add ordering type argument
Aug 9, 2019
c41bad3
use param.orderingType when call eigenOptimizer
Aug 9, 2019
14ab6e5
add metis ordering, and use string as argument type
Aug 9, 2019
fedd538
add solveCholesky method
Aug 9, 2019
ee2f03e
change GN to LM in unittest
Aug 9, 2019
1b6d9f0
add tictoc to eigen solver
Aug 9, 2019
5a7634a
profile
Aug 11, 2019
362a4f2
add optional ordering to sparseJacobian
Aug 12, 2019
d9f1fe9
use ordering in obtainSparseMatrix, and add tic for A transpose
Aug 13, 2019
4e40d1b
add unit test for eigenOptimizer
Aug 14, 2019
351e962
use optional ordering in obtainSparseMatrix
Aug 15, 2019
b558225
Initialize Refactoring
ProfFan Sep 9, 2019
10ac7f7
Rename LinearOptimizer to LinearSolver
ProfFan Sep 9, 2019
6ae60a8
Fix typo
ProfFan Sep 9, 2019
0aa0d9b
WIP with EigenSolver
ProfFan Sep 9, 2019
08c487f
Make the tests happy again!
ProfFan Sep 9, 2019
af4c944
Fix docs and cleanup
ProfFan Sep 9, 2019
3ef6112
Make the examples happy again!
ProfFan Sep 9, 2019
e848d0a
More indentation fixes
ProfFan Sep 9, 2019
f3f299f
Order should be in the constructor of SparseEigenSolver
ProfFan Sep 10, 2019
084a25b
Added test, renamed testEigenOptimizer to testSparseEigenSolver
ProfFan Sep 11, 2019
34eb369
Refactoring to disentangle linear and nonlinear
ProfFan Nov 18, 2019
d9ee814
Revert "Removed redundant Scatter method"
ProfFan Dec 31, 2019
4551b65
Build fixes for rebasing to develop
ProfFan Dec 31, 2019
9320912
Merge remote-tracking branch 'origin/develop' into feature/fan/Eigen
ProfFan May 13, 2020
ede5feb
Slight refactor
ProfFan May 13, 2020
7df1be0
Removed obsolete optional<Ordering &>s
ProfFan May 13, 2020
d9958f9
Add string option
ProfFan May 17, 2020
9d8e8cc
Formatting and filename
dellaert May 21, 2020
d211166
Use boost::shared_ptr
dellaert May 21, 2020
552168a
Merge remote-tracking branch 'origin/fix/solver_formatting' into feat…
dellaert May 21, 2020
59bf77a
Swiched to boost::shared_ptr
dellaert May 21, 2020
b7b5274
Make Nonlinear Subclass of Linear
ProfFan May 23, 2020
5c445e1
Revert API change
ProfFan May 28, 2020
c0dd826
Fix examples
ProfFan May 28, 2020
a44b07a
Fixed the Sparse Eigen Solver
ProfFan May 31, 2020
5d4cc6d
More optimization
ProfFan Jun 1, 2020
9dc0029
Typos
ProfFan Jun 1, 2020
dff2385
Remove redundant check
ProfFan Jun 1, 2020
ec7c91b
Reduce overhead in SparseLDLT with ordering
ProfFan Jun 2, 2020
be6dac5
Merge branch 'develop' into feature/fan/Eigen
ProfFan Jun 4, 2020
b1912a5
Add SuiteSparse (CHOLMOD) solver
ProfFan Jun 7, 2020
30ac4a1
Working SuiteSparse solver
ProfFan Jun 7, 2020
3302205
Merge remote-tracking branch 'origin/develop' into feature/fan/Eigen
ProfFan Jun 7, 2020
6f57e0e
Fix linking on Linux with SuiteSparse
ProfFan Jun 7, 2020
988556b
Add CUDA cuSparse solver
ProfFan Jun 8, 2020
cc273e6
typo
ProfFan Jun 8, 2020
c5d8c26
Fix CUDA detection
ProfFan Jun 8, 2020
80abeb2
Push WIP on doing AtA on GPU
ProfFan Jun 8, 2020
112be21
fix comment typos and variable names
gchenfc Nov 12, 2020
d6dfee8
fix CUDA runtime cmake link
gchenfc Nov 12, 2020
083544a
add wrapper for elimination-based linear solvers
gchenfc Nov 12, 2020
d4c3ce1
inline elimination solver
gchenfc Nov 12, 2020
c6a2101
extend iterative solvers to inherit from LinearSolver
gchenfc Nov 13, 2020
e27d02b
test Nonlinear Solver with different linear backends
gchenfc Nov 13, 2020
76ba028
nonlinear solver linear solve - use LinearSolver
gchenfc Nov 13, 2020
832391a
NonlinearOptimizerParams no longer inherits from LinearSolverParams
gchenfc Nov 13, 2020
c7805e1
fromLinearSolverParams -> uppercase: FromLinearSolverParams
gchenfc Nov 13, 2020
7619643
ifdef guards on suitesparse and cusparse compile flags
gchenfc Nov 13, 2020
d2b0c80
LinearSolverParams constructor and extra unit test
gchenfc Nov 13, 2020
e5aa981
linearSolverType variable - backwards compatibility
gchenfc Nov 13, 2020
bd50301
copy-move semantics on NonlinearOptimizerParams
gchenfc Nov 13, 2020
6800c4c
Merge branch 'develop' into feature/fan/Eigen
gchenfc Nov 14, 2020
99ef899
readme information for SuiteSparse and cuSPARSE
gchenfc Nov 14, 2020
4f897b2
comments about METIS/SuiteSparse in CMakeLists files
gchenfc Nov 15, 2020
f4a403e
const methods, variable _ convention, and minor formatting
gchenfc Nov 15, 2020
05d52f2
comments about variable ordering for sparse matrix generation
gchenfc Nov 15, 2020
82b579f
remove unused "LinearSolver::linearSolverType_"
gchenfc Nov 23, 2020
ac33127
LinearSolver abstract class change impls. to pure virtual
gchenfc Nov 23, 2020
9972f9b
EOF newlines
gchenfc Nov 23, 2020
c203774
Remove "isIterative" and "isSequential" functions from Solver
gchenfc Nov 23, 2020
29597eb
comments and formatting
gchenfc Nov 23, 2020
9560f9c
rename "FromLinearSolver" -> "CreateFromParameters"
gchenfc Nov 23, 2020
2dd1bee
Cholmod test - should throw error
gchenfc Nov 23, 2020
98262b3
clean up LinearSolver interface
gchenfc Nov 23, 2020
d9958d4
split SparseEigen Solve
gchenfc Nov 23, 2020
216e1df
Add authors
gchenfc Nov 23, 2020
51c1503
undo unnecessary change due to imperfect merge
gchenfc Nov 23, 2020
13437c6
Organize Sparse Jacobian functions to be only in GaussianFactorGraph
gchenfc Nov 23, 2020
2ffad88
Eigen index type fix
gchenfc Nov 23, 2020
00f6f9f
Merge branch 'develop' into feature/fan/Eigen
yetongatech Jan 20, 2023
09038e8
WIP
yetongatech Jan 20, 2023
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
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ include(cmake/HandleEigen.cmake) # Eigen3
include(cmake/HandleMetis.cmake) # metis
include(cmake/HandleMKL.cmake) # MKL
include(cmake/HandleOpenMP.cmake) # OpenMP
include(cmake/HandleSuiteSparse.cmake) # SuiteSparse sparse linear solver
include(cmake/HandleCuSparse.cmake) # cuSPARSE sparse linear solver
include(cmake/HandlePerfTools.cmake) # Google perftools
include(cmake/HandlePython.cmake) # Python options and commands
include(cmake/HandleTBB.cmake) # TBB
Expand Down
2 changes: 2 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ $ make install
`GTSAM_WITH_EIGEN_MKL_OPENMP` to `ON`; however, best performance is usually
achieved with MKL disabled. We therefore advise you to benchmark your problem
before using MKL.
- SuiteSparse is an alternate sparse matrix solver, but it is rarely faster than GTSAM's default variable elimination implementation. Once enabled by toggling `GTSAM_WITH_SUITESPARSE`, it can be specified as the solver with `LinearSolverParams::linearSolverType`.
- cuSPARSE is the CUDA (GPU-accelerated) sparse matrix solver but is also rarely faster than GTSAM's default variable elimination implementation. Once enabled by toggling `GTSAM_WITH_CUSPARSE`, it can be specified as the solver with `LinearSolverParams::linearSolverType`.

Tested compilers:

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ Optional prerequisites - used automatically if findable by CMake:
- [Intel Math Kernel Library (MKL)](http://software.intel.com/en-us/intel-mkl) (Ubuntu: [installing using APT](https://software.intel.com/en-us/articles/installing-intel-free-libs-and-python-apt-repo))
- See [INSTALL.md](INSTALL.md) for more installation information
- Note that MKL may not provide a speedup in all cases. Make sure to benchmark your problem with and without MKL.
- [SuiteSparse](https://people.engr.tamu.edu/davis/suitesparse.html) (Ubuntu: `sudo apt-get install libsuitesparse-dev`)
- [cuSPARSE](https://docs.nvidia.com/cuda/cusparse/index.html) (comes with [CUDA Toolkit](https://developer.nvidia.com/cuda-toolkit))

## GTSAM 4 Compatibility

Expand Down
Loading