Commit Graph

38 Commits

Author SHA1 Message Date
Sergiu Deitsch cb02fa2f7b Correct Visual Studio 17 2022 Github workflow runner
Change-Id: I00d55fcd312eab5f8de64e92d9aecee517a5897c
2026-07-27 21:34:08 +02:00
Sergiu Deitsch a2bab5af51 Fix ODR violations
Compiling Ceres with Schur specializations and Link Time Optimization
(LTO) results in warnings such as

    /usr/include/eigen3/Eigen/src/Core/ProductEvaluators.h:31:8: warning: type ‘struct evaluator’ violates the C++ One Definition Rule [-Wodr]
       31 | struct evaluator<Product<Lhs, Rhs, Options>> : public product_evaluator<Product<Lhs, Rhs, Options>> {
          |        ^

due to the redefinition of EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD which
alters internal Eigen class definitions and consequently results in ODR
violations.

Avoid the ODR violation by renaming the Eigen namespace in translation
units that redefine EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD.

While the issue is diagnosed in LTO builds of Ceres only, the problem
exists in non-LTO builds as well and per standard the compiler is not
even required to diagnose ODR issues. ODR violations constitute
undefined behavior.

Change-Id: Idf7c7a30cc8d3a86b0d62cbd33bef58783a62ee4
2026-02-17 10:14:21 -08:00
Sergiu Deitsch 18887f1bd7 Drop removed macos-13 runner
Change-Id: I7f37bb2f71324353a45e39d12792edabfb3956b7
2026-02-01 15:58:57 +01:00
Sergiu Deitsch 4997d0e5b4 Drop removed windows-2019 runner
Change-Id: I75b52ce778f6e74832dbfaf9dc35a99e28c9b51a
2025-08-17 10:51:26 +02:00
Sergiu Deitsch bcca8fbd4f Use ubuntu-24.04 Github runner in Android Github workflow
The ubuntu-20.04 actions runner image is deprecated will be fully
unsupported by 2025-04-01 (see https://github.com/actions/runner-images/issues/11101).

Change-Id: Ib6e25b5eef020aa5f3f183638725f7702903954a
2025-02-17 17:09:44 -08:00
Sergiu Deitsch cd8c1074b2 Avoid GNU linker LTO warnings in Github workflows
Stop linker emitting warnings such as

  lto-wrapper: warning: using serial compilation of n LTRANS jobs

Change-Id: Ic933ef7b45955eabfa5b06e88cd195077ff9fc86
2025-02-17 17:09:13 -08:00
Sergiu Deitsch 5121022789 Update NDK in Android Github workflow to latest LTS
Change-Id: I278fc0faaac764277d6985f0de23e602f1cde766
2025-02-17 17:08:32 -08:00
Sergiu Deitsch 539dffbec3 Use high-speed linker in Linux Github workflow
Using mold instead of GNU ld reduces the total build time by roughly
5-15 min. (depending on the load).

Change-Id: I66feab4e54c248cf92cc379d0085a93bdfdfef69
2025-02-17 17:08:02 -08:00
Sergiu Deitsch 32df9c52c3 Replace macos-12 runner by macos-15
The macos-12 runner is no longer available.

Change-Id: Ib559bf949f423d2bcc350686dbc829b72fe9a9bb
2025-02-16 16:59:40 +01:00
Sameer Agarwal ba6b678b23 Remove glog and gflags from the CI workflows
Change-Id: I94199ddcbd105b33a8401366dd0d952cc79ec755
2024-07-18 15:40:28 -07:00
Sergiu Deitsch 8ef35d0245 Fix CTest build config parameter
Change-Id: I4b7aed9c96c07a4e2b2b58618eb5a2452c845ae2
2024-07-10 00:17:45 +02:00
Mark Shachkov 6fb3dae4ee Add cuDSS as sparse Cholesky solver
cuDSS could be used as an alternative for SuiteSparse and EigenSparse
in case if CUDA capable GPU is available.

Change-Id: I7a567093ce91363478118153e181134ed5804573
2024-07-09 20:23:18 +02:00
Sergiu Deitsch e47a42c295 Fix MSVC builds and test runs
Change-Id: I79f839b22985a6510965559af54209d89c8703a0
2024-07-08 23:48:13 +02:00
Mark Shachkov 540b1f2f7a Checkout git submodules during github CI runs.
Change-Id: Ie4e2d618ee70035004ddcaa40a31725a6a610091
2024-07-07 23:22:53 +02:00
Sergiu Deitsch 7220e1d1e8 Use CUDA 12.5.1 in Windows Github workflow
Change-Id: I48b077d436ad67afd1e3b8bb7472997355965a12
2024-07-07 14:13:11 +02:00
Sergiu Deitsch f8c2994dad Drop Ubuntu 20.04 and add Ubuntu 24.04 support
Change-Id: I34cb0032598c84820ead2cde8e0a083d82d0e1ce
2024-05-21 23:19:10 +02:00
Sergiu Deitsch 1f15197be1 Drop macos-11 runner and support macos-14 instead
Change-Id: Ie2958fa64f8c76ef6cc58af3da62dbc0607ba52a
2024-05-21 21:11:07 +00:00
Sergiu Deitsch 5de0fda0f2 Update Github actions
This avoids nodejs deprecation warnings.

Change-Id: I6f2c63332018c1483ad3c6d37e87970a4d557533
2024-05-21 23:04:32 +02:00
Sergiu Deitsch 715865101c Remove 32-bit MinGW from CI matrix
32-bit MinGW is being phased out:

https://www.msys2.org/news/#2023-12-13-starting-to-drop-some-32-bit-packages

With eigen3 and glog packages now removed, Ceres Solver no longer can be
built using stock MinGW. Therefore, we remove the support altogether.

Change-Id: I42d4ca3d15e7f3a5ddfa2eae409db7d87aed99ea
2024-05-21 22:45:48 +02:00
Sergiu Deitsch 3fd2a72cc5 MinGW no longer provides a 32-bit METIS package
Change-Id: I63b6efd29589b68cf4d16b1ef41c85b3ee437063
2024-01-17 20:48:53 +01:00
Sergiu Deitsch d864d146fd Add macOS 13 runner to Github workflows
Change-Id: Ied8e255bb5d8fbeaa0c43c6af22775dda8aad1e8
2023-09-10 21:05:03 +02:00
Dmitriy Korchemkin 5ba62abecb Add CUDA support to windows CI builds
Change-Id: I0fcadfbc1eef39b8aeaee119f2b42bc8f4a74314
2023-08-16 17:54:15 +00:00
Dmitriy Korchemkin bdee4d6172 Block-sparse to CRS conversion using block-structure
Instead of pre-computing pemutation from block-sparse to CRS order,
index of value in CRS matrix is computed in the process of updating
values using block-sparse structure.

When it is possible to update values via a simple host-to-device copy,
block-sparse structure on GPU is discarded after computing CRS
structure.

Computing index is significantly slower than using pre-computed
permutation, but is still hidden by host-to-device transfer.

On problems from BAL dataset this results into reduction of extra
gpu memory consumption from 33% (permutation stored as 32-bit indices)
to ~10% for storing block-sparse structure.

Benchmark results:

======================= CUDA Device Properties ======================
Cuda version         : 11.8
Device ID            : 0
Device name          : NVIDIA GeForce RTX 2080 Ti
Total GPU memory     :  11012 MiB
GPU memory available :  10852 MiB
Compute capability   : 7.5
Warp size            : 32
Max threads per block: 1024
Max threads per dim  : 1024 1024 64
Max grid size        : 2147483647 65535 65535
Multiprocessor count : 68
====================================================================
Running ./bin/evaluation_benchmark
Run on (112 X 3200 MHz CPU s)
CPU Caches:
  L1 Data 32 KiB (x56)
  L1 Instruction 32 KiB (x56)
  L2 Unified 1024 KiB (x56)
  L3 Unified 39424 KiB (x2)
Load Average: 24.58, 11.75, 8.52

-----------------------------------------------------------------------
Benchmark                                                          Time
-----------------------------------------------------------------------
Using on-the-fly computation of CRS index corresponding to block-sparse
index:

JacobianToCRS<g/final/problem-4585-1324582-pre.txt>             1607 ms
JacobianToCRSView<g/final/problem-4585-1324582-pre.txt>          564 ms
JacobianToCRSMatrix<g/final/problem-4585-1324582-pre.txt>       2226 ms
JacobianToCRSViewUpdate<g/final/problem-4585-1324582-pre.txt>    228 ms
JacobianToCRSMatrixUpdate<g/final/problem-4585-1324582-pre.txt>  400 ms

Using precomputed permutation:
JacobianToCRS</final/problem-4585-1324582-pre.txt>              1656 ms
JacobianToCRSView</final/problem-4585-1324582-pre.txt>           553 ms
JacobianToCRSMatrix</final/problem-4585-1324582-pre.txt>        2255 ms
JacobianToCRSViewUpdate</final/problem-4585-1324582-pre.txt>     228 ms
JacobianToCRSMatrixUpdate</final/problem-4585-1324582-pre.txt>   406 ms

Performance of JacobianToCRSViewUpdate is still limited by
host-to-device transfer, and JacobianToCRSView is faster than computing
CRS structure on CPU.

Change-Id: Ifb6910fb01ae6071400d36c277846fadc5857964
2023-05-26 01:12:47 +03:00
Dmitriy Korchemkin e7bd72d41e Permutation-based conversion from block-sparse to crs
Change-Id: Ic33a6476c033187dff61886deb6d1761524943f0
2023-05-12 03:33:25 +03:00
Sergiu Deitsch 1e2a24a8bd Update Github actions to avoid deprecation warnings
Change-Id: Ifc7b2b2337bbe03ce44649891830f78381b0749d
2023-01-04 17:05:49 +00:00
Sergiu Deitsch 285e5f9f45 Do not update brew formulae upon install
Change-Id: Ifc726b9456f4643b77e9f2eefc1bd37efbc50150
2023-01-03 21:45:50 +01:00
Dmitriy Korchemkin 2fd81de12d Add build configuration with CUDA on Linux
Change-Id: I3144a44692a7a129857b65ed84fb2a5637b25b5d
2022-11-29 18:51:13 +03:00
Sameer Agarwal 06bfe6ffac Remove OpenMP and No threading backends.
Since c++11, we can depend on C++ threads always being available.
With the recent work on the performance of CXX threading, the
additional complexity of maintaining multiple backends for some
minor performance delta is not worth it

https://github.com/ceres-solver/ceres-solver/issues/886

Change-Id: Idee480b22a498daec9c4366da8589aa58eaf36a1
2022-11-27 21:06:33 -08:00
Sergiu Deitsch 37a3cb3841 Update SuiteSparse in MSVC Github workflow
The new SuiteSparse deployment bundles METIS 5.1.0 instead of 5.1.1 to
avoid heap corruption.

Fixes #918

Change-Id: Ie779dc2015c60e928c237529675e21d4635716a2
2022-11-14 03:38:00 +01:00
Sergiu Deitsch 737200ac8d Add macos-12 to Github workflow runners
Change-Id: I7fc01ff5fe8b8a9d4e93e7536ca80a6aa37a870d
2022-08-13 22:28:33 +02:00
Sergiu Deitsch 5fe0bd45a9 Added MinGW to Windows Github workflow
Change-Id: Id2bcd92a5464ac4888295c3dbfe9b806be95a3d9
2022-08-06 23:56:51 +02:00
Sergiu Deitsch 1cf59f61eb Set Github workflow NDK path explicitly
Change-Id: I31115293f4a80ca15a7520814055ee1268d2970f
2022-08-01 18:27:08 +02:00
Sergiu Deitsch 0c88301e66 Provide optional METIS support
* Split `CERES_NO_METIS` into two defines: `CERES_NO_PARTITION` and
  `CERES_NO_METIS`. The former refers to METIS support in SuiteSparse,
  the latter to the Eigen's MetisSupport module. This enables the use of
  sparse matrix reordering independent from SuiteSparse.
* Run Linux, macOS, and macOS Github workflows with METIS enabled
  SuiteSparse.

Fixes #808

Change-Id: I5076b7e1268d32cc3e7e56650edcbaf7fb3b59ce
2022-06-22 16:46:02 +00:00
Sergiu Deitsch d87fd551bc Fix Ubuntu 20.04 workflow tests
Previously, the tests did not run because the CMake version shipped with
Ubuntu 20.04 does not understand the `--test-dir` option and silently
fails.

Change-Id: I335e1d9e3890aa56e66a9dfd0fccd4594a84a08c
2022-05-27 10:47:07 +00:00
Sergiu Deitsch 71717f37c6 Use glog 0.6 release to run Windows Github workflow
Change-Id: I2853ea13c798c6ef05b3a19a2d3986b514caf1ed
2022-05-27 11:43:41 +02:00
Sergiu Deitsch 464abc1983 Run Linux Github workflow on Ubuntu 22.04
Change-Id: I8a404c23d9f38bf9bd538edef933258814a91a67
2022-04-23 13:28:39 +02:00
Sergiu Deitsch 40c1a7e18e Fix Github workflows
* Ubuntu 18.04 GCC does not fully support C++17, hence remove the
  runner.
* Using CMake SuiteSparse in a C++17 project requires a workaround
  implemented in a recent release.

Change-Id: I9985fe12d582dfc9b74e97d670828334e507e9f5
2022-04-01 21:19:54 +02:00
Sergiu Deitsch 0133dada2d Add Github workflows
Change-Id: I74fc45784b1b1d20c22b9e983902aa69fbfa764f
2022-03-13 23:51:40 +01:00