Commit Graph

18 Commits

Author SHA1 Message Date
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