Update features.rst and solving_faqs.rst for current solvers Mention CUDA_SPARSE (NVIDIA cuDSS), mixed-precision CUDA solves, and SCHUR_POWER_SERIES_EXPANSION in features.rst and solving_faqs.rst. Update the Solver::Summary::FullReport example and -ordering_type flag in solving_faqs.rst, and replace Mac OS X with macOS in features.rst. Change-Id: I889a0e68425b98ff6d29dc4b92f3c52fa47887a3
diff --git a/docs/source/features.rst b/docs/source/features.rst index 6a962fa..171fa3a 100644 --- a/docs/source/features.rst +++ b/docs/source/features.rst
@@ -8,7 +8,7 @@ .. _chapter-features: * **Code Quality** - Ceres Solver has been used in production at - Google since 2011. It is clean, extensively tested and well + Google since 2010. It is clean, extensively tested and well documented code that is actively developed and supported. * **Modeling API** - It is rarely the case that one starts with the @@ -48,9 +48,9 @@ solvers - dense QR and dense Cholesky factorization (using `Eigen`_, `LAPACK`_ or `CUDA`_) for dense problems, sparse Cholesky factorization (`SuiteSparse`_, `Apple's Accelerate`_, - `Eigen`_) for large sparse problems, custom Schur complement based - dense, sparse, and iterative linear solvers for `bundle - adjustment`_ problems. + `Eigen`_, `NVIDIA cuDSS`_) for large sparse problems, custom Schur + complement based dense, sparse, and iterative linear solvers for + `bundle adjustment`_ problems. - **Line Search Solvers** - When the problem size is so large that storing and factoring the Jacobian is not feasible or a low @@ -63,8 +63,10 @@ threads based multithreading of the Jacobian evaluation and the linear solvers. -* **GPU Acceleration** If your system supports `CUDA`_ then Ceres - Solver can use the Nvidia GPU on your system to speed up the solver. +* **GPU Acceleration** - If your system supports `CUDA`_ then Ceres + Solver can use the NVIDIA GPU on your system to speed up both dense + and sparse linear solvers (including mixed-precision solves and + `NVIDIA cuDSS`_ sparse Cholesky factorization). * **Solution Quality** Ceres is the `best performing`_ solver on the NIST problem set used by Mondragon and Borchers for benchmarking @@ -79,7 +81,7 @@ has developed an active developer community that contributes new features, bug fixes and support. -* **Portability** - Runs on *Linux*, *Windows*, *Mac OS X*, *Android* +* **Portability** - Runs on *Linux*, *Windows*, *macOS*, *Android* *and iOS*. * **BSD Licensed** The BSD license offers the flexibility to ship your @@ -93,4 +95,5 @@ .. _automatic: https://en.wikipedia.org/wiki/Automatic_differentiation .. _numeric: https://en.wikipedia.org/wiki/Numerical_differentiation .. _CUDA : https://developer.nvidia.com/cuda/toolkit +.. _NVIDIA cuDSS: https://developer.nvidia.com/cudss .. _Apple's Accelerate: https://developer.apple.com/documentation/accelerate/sparse-solvers-library
diff --git a/docs/source/solving_faqs.rst b/docs/source/solving_faqs.rst index 17373f2..c06635e 100644 --- a/docs/source/solving_faqs.rst +++ b/docs/source/solving_faqs.rst
@@ -21,11 +21,16 @@ way to reason about it. 1. For small (a few hundred parameters) or dense problems use - ``DENSE_QR``. + ``DENSE_QR`` (or ``DENSE_NORMAL_CHOLESKY``). On systems with an + NVIDIA GPU, setting + :member:`Solver::Options::dense_linear_algebra_library_type` to + ``CUDA`` can accelerate larger dense problems. 2. For general sparse problems (i.e., the Jacobian matrix has a substantial number of zeros) use - ``SPARSE_NORMAL_CHOLESKY``. + ``SPARSE_NORMAL_CHOLESKY`` (backed by ``SUITE_SPARSE``, + ``ACCELERATE_SPARSE``, ``EIGEN_SPARSE``, or ``CUDA_SPARSE`` via + NVIDIA ``cuDSS``). 3. For bundle adjustment problems with up to a hundred or so cameras, use ``DENSE_SCHUR``. @@ -33,13 +38,14 @@ 4. For larger bundle adjustment problems with sparse Schur Complement/Reduced camera matrices use ``SPARSE_SCHUR``. - If you do not have access to these libraries for whatever + If you do not have access to a sparse Cholesky library for whatever reason, ``ITERATIVE_SCHUR`` with ``SCHUR_JACOBI`` is an excellent alternative. 5. For large bundle adjustment problems (a few thousand cameras or more) use the ``ITERATIVE_SCHUR`` solver. There are a number of - preconditioner choices here. ``SCHUR_JACOBI`` offers an + preconditioner choices here. ``SCHUR_JACOBI`` (or + ``SCHUR_POWER_SERIES_EXPANSION``) offers an excellent balance of speed and accuracy. This is also the recommended option if you are solving medium sized problems for which ``DENSE_SCHUR`` is too slow but ``SuiteSparse`` is not @@ -53,9 +59,10 @@ If you are not satisfied with ``SCHUR_JACOBI``'s performance try ``CLUSTER_JACOBI`` and ``CLUSTER_TRIDIAGONAL`` in that - order. They require that you have ``SuiteSparse`` - installed. Both of these preconditioners use a clustering - algorithm. Use ``SINGLE_LINKAGE`` before ``CANONICAL_VIEWS``. + order. They require that you have a sparse Cholesky library such as + ``SuiteSparse`` installed. Both of these preconditioners use a + clustering algorithm. Use ``SINGLE_LINKAGE`` before + ``CANONICAL_VIEWS``. Use :func:`Solver::Summary::FullReport` to diagnose performance problems ========================================================================= @@ -76,13 +83,13 @@ 4 1.803857e+04 5.58e+02 2.69e+04 8.66e+01 9.93e-01 3.69e+05 1 1.61e-01 1.03e+00 5 1.803391e+04 4.66e+00 3.11e+02 1.02e+01 1.00e+00 1.11e+06 1 1.49e-01 1.18e+00 - Ceres Solver v1.12.0 Solve Report + Solver Summary (v 2.3.0-eigen-(3.4.0)-lapack-suitesparse-(7.1.0)-metis-(5.1.0)-acceleratesparse-eigensparse) ---------------------------------- Original Reduced Parameter blocks 22122 22122 Parameters 66462 66462 Residual blocks 83718 83718 - Residual 167436 167436 + Residuals 167436 167436 Minimizer TRUST_REGION @@ -92,7 +99,6 @@ Given Used Linear solver SPARSE_SCHUR SPARSE_SCHUR Threads 1 1 - Linear solver threads 1 1 Linear solver ordering AUTOMATIC 22106, 16 Cost: @@ -107,9 +113,9 @@ Time (in seconds): Preprocessor 0.283 - Residual evaluation 0.061 - Jacobian evaluation 0.361 - Linear solver 0.382 + Residual only evaluation 0.061 (5) + Jacobian & residual evaluation 0.361 (6) + Linear solver 0.382 (5) Minimizer 0.895 Postprocessor 0.002 @@ -125,9 +131,9 @@ Time (in seconds): Preprocessor 0.283 - Residual evaluation 0.061 - Jacobian evaluation 0.361 - Linear solver 0.382 + Residual only evaluation 0.061 (5) + Jacobian & residual evaluation 0.361 (6) + Linear solver 0.382 (5) Minimizer 0.895 Postprocessor 0.002 @@ -148,7 +154,7 @@ Which indicates that we are using automatic ordering for the ``SPARSE_SCHUR`` solver. This can be expensive at times. A straight forward way to deal with this is to give the ordering manually. For ``bundle_adjuster`` this can be done by -passing the flag ``-ordering=user``. Doing so and looking at the timing block of +passing the flag ``-ordering_type=user``. Doing so and looking at the timing block of the full report gives us .. code-block:: console @@ -156,9 +162,9 @@ Time (in seconds): Preprocessor 0.051 - Residual evaluation 0.053 - Jacobian evaluation 0.344 - Linear solver 0.372 + Residual only evaluation 0.053 (5) + Jacobian & residual evaluation 0.344 (6) + Linear solver 0.372 (5) Minimizer 0.854 Postprocessor 0.002