- Add methods to aceess the cached residuals and jacobian computed in
the optimization process in TinySolver. Usage of such methods will
retrieve the corresponding values associated with the converged
parameter.
- Reorder the Update() call to ensure that the jacobian/residuals
associated with the converged parameter are computed and cached.
Change-Id: If82e19d67d28b057833357f2c9a75b2d0fd139af
Using preprocessor directives in a macro expansion is a (non-standard)
language extension that is not supported by MSVC.
Change-Id: I6e158b108a9c13cd277afb96cab2017ac192e3a2
Previously these classes in analogy with ceres::Problem's interface
had interfaces to allow bare pointers as well as unique_ptrs. This
CL changes the API to always use unique_ptr, this is less error prone
and makes the default ownership semantics clearer.
Change-Id: I7577a90761f341c7e009c248c820f0fec2e6f32d
Starting with SuiteSparse version 7.4.0 CHOLMOD has support for single
precision matrices. This allows us to have single precision and mixed
precision solves when using the SUITE_SPARSE backend.
This CL also fixes sparse_cholesky_test which was completely broken for
single precision testing.
Sample performance on my Mac.
/usr/bin/time -l ./bin/bundle_adjuster --input=../../Downloads/problem-3068-310854-pre.txt
<SNIP>
Cost:
Initial 9.099334e+07
Final 4.161838e+06
Change 8.683150e+07
Minimizer iterations 6
Successful steps 4
Unsuccessful steps 2
Time (in seconds):
Preprocessor 2.528222
Residual only evaluation 0.142804 (5)
Jacobian & residual evaluation 0.424014 (4)
Linear solver 54.083396 (5)
Minimizer 54.895752
Postprocessor 0.024564
Total 57.448539
Termination: NO_CONVERGENCE (Maximum number of iterations reached. Number of iterations: 5.)
59.04 real 341.24 user 5.49 sys
5776375808 maximum resident set size
<SNIP>
616329634071 instructions retired
929475980510 cycles elapsed
5375034560 peak memory footprint
/usr/bin/time -l ./bin/bundle_adjuster --input=../../Downloads/problem-3068-310854-pre.txt -mixed_precision_solves
<SNIP>
Cost:
Initial 9.099334e+07
Final 4.148930e+06
Change 8.684441e+07
Minimizer iterations 6
Successful steps 4
Unsuccessful steps 2
Time (in seconds):
Preprocessor 2.580217
Residual only evaluation 0.144098 (5)
Jacobian & residual evaluation 0.396723 (4)
Linear solver 23.636074 (5)
Minimizer 24.427163
Postprocessor 0.023790
Total 27.031170
Termination: NO_CONVERGENCE (Maximum number of iterations reached. Number of iterations: 5.)
28.58 real 128.53 user 2.37 sys
4818386944 maximum resident set size
<SNIP>
395186936091 instructions retired
368802808856 cycles elapsed
4327029824 peak memory footprint
Change-Id: I1f137b0dd12da8da7f9ced338dd8f20f4bbdf99d
If the user has checked out the submodules in third_party, they will be
used, otherwise we will try and find the system installed versions of
these dependencies and use them if they are modern enough.
Change-Id: I52164bc48a6ea804b85cdda05fee9cb94632f6c0
Generator expressions were introduced in CMake version 3.24. Without
them including absl::log_flags as an internal dependency causes
linking problems on some platforms. So for platforms with an older
CMake version we make absl::log_flags a public dependency.
Change-Id: I686f41e76b0ac17a03f1cd1d614372a7f130dfd9
Previously this header was included in absl/log/log.h
but going forward this header will not be included.
Change-Id: Ie663b221d90e32a852fb00dfe20f731dcd1dcf6b
Replace WallTimeInSeconds with absl::Now and use
absl::Time and absl::Duration objects instead of doubles.
wall_time.h/cc -> event_logger.h/cc
Change-Id: I41279961368840fbdf6bb3456ffdbdf2f9bfb85b
Replace ceres::String* with their more modern and performant
absl strings library equivalent and delete our string
manipulation library.
Change-Id: Iecbdba9864e0abf329778f81fdc0708f78f7594f
Ceres Solver was using an old forked version of FixedArray,
now that we are using absl, we can use the official version
that ships with it.
Change-Id: Ic88d7f6e8a49b928d611f7cbb04172452b322b01
1. Add abseil-cpp as a submodule. We are tracking the latest LTS
release, which is lts_2024_01_16.
2. Replace glog/gflags with absl::log and absl::flags.
3. Remove miniglog
4. Also take a whack at making the bazel build work with
abseil-cpp and gtest.
There are a number of TODOs in this CL that still need to be resolved.
Change-Id: I39355ed7d61375be4ebcbc8596d9cc70acc1c678
cuDSS could be used as an alternative for SuiteSparse and EigenSparse
in case if CUDA capable GPU is available.
Change-Id: I7a567093ce91363478118153e181134ed5804573
We now use googletest as a git submodule instead
of the old way of converting it into a single header
and including it in the source.
This removes the dependence on googleflags for tests
to be enabled.
Change-Id: If25ea3ba7a39c2b8ba9c6effbed3e7173361b6b1
The CellInfo struct contains a mutex, which interacts poorly
with some standard library containers which may move things around.
As a result we were using std::unique_ptr<CellInfo> in these
containers, but this change gets rid of that level of indirection
as std::unordered_map can construct CellInfo in place and we can
replace the use of std::vector with an array we know will not be
resized.
This improves the performance of the schur eliminator a bit but
also the performance of the block diagonal preconditioners.
Change-Id: If3ccd1273a754d9c5112e6e611ce31066b6b27b5
This avoids warnings such as
D:\a\ceres-solver\ceres-solver\internal\ceres\cuda_kernels_bsm_to_crs.cu.cc(143): warning #550-D: variable "row_nnz_e" was set but never used [D:\a\ceres-solver\ceres-solver\build_Release\internal\ceres\ceres_cuda_kernels.vcxproj]
int row_nnz_e = 0;
^
detected during instantiation of "void ceres::internal::RowBlockIdAndNNZ(int, int, int, const int *, const ceres::internal::Cell *, const ceres::internal::Block *, const ceres::internal::Block *, int *, int *, int *) [with partitioned=false]" at line 240
Remark: The warnings can be suppressed with "-diag-suppress <warning-number>"
that is caused by compile-time conditional use of the variable.
Change-Id: I041b076a5208eeb662b8c7500d7b238965be833c
std::copy_n is defined in <algorithm>, which is not explicitly included
and therefore causes compilation errors with the recent GCC 14.1 and/or
CUDA 12.4.1.
Change-Id: I9fcab48770ccfc5ec195dca5a190ceaad9debe81
Fixes the following two warnings:
preconditioner.h:64:11: warning: field 'f_block_size' will be initialized after field 'elimination_groups' [-Wreorder-ctor]
block_sparse_matrix.cc:70:19: warning: unused parameter 'values' [-Wunused-parameter]
Change-Id: I5cc55ca387b3f12259096c1531c263279650bd49