Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
342 commits
Select commit Hold shift + click to select a range
202716c
Make CMake section header printing more legible
varunagrawal Jan 11, 2026
6d54d25
Merge branch 'develop' into NavState-LieGroup
varunagrawal Jan 11, 2026
bebf3f2
Merge pull request #2347 from borglab/feature/parrallelUpdate
dellaert Jan 12, 2026
053d613
Merge pull request #2348 from borglab/minor-fixes
varunagrawal Jan 12, 2026
6d367c5
Minimize the number of workflows
varunagrawal Jan 12, 2026
961258b
Merge pull request #2349 from borglab/update-ci
dellaert Jan 12, 2026
6324391
trajectory aligner class and unit tests
akshay-krishnan Jan 12, 2026
40cb697
Apply suggestion from @Copilot
akshay-krishnan Jan 12, 2026
0f3a1d2
Initial plan
Copilot Jan 12, 2026
d305ea7
Address review comments: fix style, add documentation, remove unused …
Copilot Jan 12, 2026
c942319
Merge pull request #2352 from borglab/copilot/sub-pr-2351
akshay-krishnan Jan 12, 2026
f7f4914
Allow for an external rng
dellaert Jan 12, 2026
53788a2
change to bSa
akshay-krishnan Jan 12, 2026
14ca1d9
Define and use perturb template
dellaert Jan 12, 2026
d6e8ca9
Document and add perturbPose3
dellaert Jan 12, 2026
f540f1b
unary measurement docs
akshay-krishnan Jan 12, 2026
369cb1f
Merge pull request #2353 from borglab/feature/nlSampler
dellaert Jan 12, 2026
8ddaeb6
address review comments
akshay-krishnan Jan 12, 2026
077de56
Merge branch 'develop' of github.com:borglab/gtsam into sim2
akshay-krishnan Jan 12, 2026
4072433
use perturbPose3
akshay-krishnan Jan 13, 2026
fcd343e
fix wrapper
akshay-krishnan Jan 13, 2026
cc19dac
python tests
akshay-krishnan Jan 13, 2026
f1b1bcc
fix default arg
akshay-krishnan Jan 13, 2026
a65f821
add marginals with a test
akshay-krishnan Jan 13, 2026
a326382
add docs
akshay-krishnan Jan 13, 2026
54ada1f
Merge pull request #2351 from borglab/sim3
akshay-krishnan Jan 13, 2026
ed5788d
Restore vcpkg builds in PRs
dellaert Jan 16, 2026
f61a4d8
Restore main readme
dellaert Jan 16, 2026
311feac
Fixed-size constructors
dellaert Jan 15, 2026
989a4f1
Fast Value accessor
dellaert Jan 15, 2026
12c9db4
Merge pull request #2357 from borglab/fix/readme
dellaert Jan 16, 2026
be20bdb
perf: parallelize NonlinearFactorGraph::error computation.
tzvist Jan 16, 2026
7675db2
Merge pull request #2355 from tzvist/feature/tzvist/parallel-Nonlinea…
dellaert Jan 17, 2026
aa5e42b
switch Hat/Vee to orthonormal sl(4) basis and update adjoint/tests
yluo5820 Jan 17, 2026
8c98eef
Merge pull request #2358 from borglab/feature/small_improvements
dellaert Jan 17, 2026
f0b04c1
GTSAM changes
dellaert Jan 16, 2026
f8ab5e1
sbm_ -> info_, damping
dellaert Jan 16, 2026
d4fa268
New Nonlinear MF Solver
dellaert Jan 16, 2026
d41f771
Use new Solver in optimizers
dellaert Jan 16, 2026
cdb7450
Solver deltaError
dellaert Jan 17, 2026
554ca49
deltaError
dellaert Jan 17, 2026
dbc0624
Review Comments
dellaert Jan 17, 2026
a581d64
Remove std in header
dellaert Jan 18, 2026
1404892
Create Unit noise model by default
dellaert Jan 18, 2026
216ba05
work around dimension mismatch
dellaert Jan 18, 2026
973f2c5
New noiseModel methods
dellaert Jan 18, 2026
a21bf63
Restrict KarcherMean templating
dellaert Jan 18, 2026
07d47cc
Merge pull request #2361 from borglab/feature/deltaError
dellaert Jan 18, 2026
653d1aa
Fix python unit test
dellaert Jan 18, 2026
9d77f34
Merge pull request #2363 from borglab/fix/dimensions
dellaert Jan 18, 2026
d456060
Improve whitening performance
dellaert Jan 18, 2026
a8bce21
Add test coverage (AI)
dellaert Jan 18, 2026
50ec407
New `sigmasRef` method
dellaert Jan 18, 2026
e902180
cache rowOffsets + tests
dellaert Jan 18, 2026
f331dbb
Default Unit Models for all nonlinear factors
dellaert Jan 18, 2026
479f970
Fix all nonlinear models
dellaert Jan 19, 2026
80ac1ff
refactor Hat/Vee to use SO4 helpers and symmetric split
yluo5820 Jan 19, 2026
a32dfc1
add more documentation
yluo5820 Jan 19, 2026
6609bb7
Merge pull request #2364 from borglab/fix/whitenHotPath
dellaert Jan 19, 2026
3f6c69d
Merge branch 'develop' into feature/NLMFSolver
dellaert Jan 19, 2026
039faa8
Merge pull request #2360 from yluo5820/feature/sl4_hat
dellaert Jan 19, 2026
dcf7aa9
Throw informative exception
dellaert Jan 19, 2026
5dd300d
Fix all tests
dellaert Jan 19, 2026
ef12d6c
Merge pull request #2362 from borglab/feature/NLMFSolver
dellaert Jan 19, 2026
dc216d6
Add vcpkg mkl
talregev Jan 7, 2026
414ac53
Merge pull request #2359 from talregev/TalR/mkl
dellaert Jan 20, 2026
0d996d8
Move back to multifrontal cholesky
akshay-krishnan Jan 20, 2026
8605e73
Merge pull request #2365 from borglab/cholesky-switch
dellaert Jan 20, 2026
2fbdf36
sccache for all os in vcpkg
talregev Jan 21, 2026
413e196
Merge pull request #2367 from talregev/TalR/sccache
dellaert Jan 21, 2026
8cad617
expose unit3/rot3 symmetry, abc python bindings for EqF
rohan-bansal Jan 22, 2026
6b5de20
Run Windows CI on push again for caching
Gold856 Jan 24, 2026
3f81b4a
Merge pull request #2370 from Gold856/ci-speed
dellaert Jan 25, 2026
7e5dfde
Added reset, and update now does this by default
dellaert Jan 12, 2026
c10fbe3
condense
rohan-bansal Jan 25, 2026
6ed6846
Notebook
dellaert Jan 25, 2026
b925aa8
Fix tests/notebooks
dellaert Jan 26, 2026
c624518
Expose/use gal3
dellaert Jan 26, 2026
e155fe6
Merge pull request #2373 from borglab/feature/reset
dellaert Jan 26, 2026
a83a13e
WIP: initial pseudorange factor.
Jan 19, 2026
6c9a1e1
WIP: Add wrapper for pseudorange factor. Initial stab at example/docu…
Jan 21, 2026
86a3818
Forgot to commit jupyter notebook lol.
Jan 21, 2026
56f2df6
MVP single-point-positioning jupyter notebook example.
Jan 22, 2026
c837c39
Fleshed out single-point-positioning example.
Jan 24, 2026
f466aad
cleanup notebooks
Jan 24, 2026
c486bdc
Apply suggestions from code review
masoug Jan 26, 2026
99c88cd
wip: addressing reviewer comments
Jan 26, 2026
f24d748
Incorporating reviewer comments, and tidying tests.
Jan 27, 2026
9f65ed7
Merge pull request #2369 from masoug/feature/psedorange-factor
dellaert Jan 27, 2026
76246bf
restructure
rohan-bansal Jan 28, 2026
0c159a6
create AbcEqFilter which inherits from EqFilter, template on N, and s…
rohan-bansal Jan 29, 2026
956d322
clang format
rohan-bansal Jan 29, 2026
caa4763
Codex-generated docs
dellaert Jan 30, 2026
7a140bb
Python usage
dellaert Jan 30, 2026
1e32c74
Example notebook
dellaert Jan 30, 2026
aed1715
Merge pull request #2375 from borglab/doc/basis
dellaert Jan 30, 2026
6678145
Remove all Cephes source files except those needed for igami
Gold856 Jan 24, 2026
d028ae3
Make chi_squared_quantile camelCase
Gold856 Jan 25, 2026
0a4175d
Rename functions and update README
Gold856 Jan 30, 2026
9f995fb
Merge pull request #2371 from Gold856/trim-down-cephes
dellaert Jan 31, 2026
8dbd786
add filter notebook
rohan-bansal Jan 31, 2026
136835a
fix wording
rohan-bansal Jan 31, 2026
cf7d79d
run cells
rohan-bansal Jan 31, 2026
5eb4785
remove summary
rohan-bansal Jan 31, 2026
b892005
Small issues in examples
dellaert Jan 31, 2026
c333fc2
Merge pull request #2376 from borglab/fix/examples
dellaert Jan 31, 2026
f446238
Standardize on KeySet
dellaert Jan 31, 2026
97668cc
removed notebook, moving to awesome eqf
rohan-bansal Jan 31, 2026
a9442cb
Fixed some set<Key> leftovers
dellaert Jan 31, 2026
49eb819
Merge pull request #2368 from rohan-bansal/eqf_python
dellaert Jan 31, 2026
e4fdf5b
Merge pull request #2377 from borglab/fix/KeySet
dellaert Jan 31, 2026
3e42abe
Fixed to use @rpath
dellaert Feb 1, 2026
e215830
Merge pull request #2378 from borglab/fix/mac_install_path
dellaert Feb 1, 2026
be18e64
Add comment
dellaert Feb 1, 2026
9fec242
Fix seg-faulting bug
dellaert Feb 1, 2026
2c50db9
Merge pull request #2379 from borglab/fix/constraint_bug
dellaert Feb 1, 2026
1c5ddc7
Add some docs on python wheels
dellaert Feb 1, 2026
4c7b219
Fix uninitialized Jacobian
dellaert Feb 1, 2026
0f3bb20
Fix Eigen issue in PseudorangeFactor
varunagrawal Feb 1, 2026
63a4782
Better assignment.
varunagrawal Feb 1, 2026
29679ea
= instead of <<
varunagrawal Feb 1, 2026
ce84c8c
support robust noise model in translation recovery
akshay-krishnan Feb 1, 2026
370474e
Merge remote-tracking branch 'origin/fix/pseudorange-factor' into fix…
dellaert Feb 1, 2026
d23848e
Merge pull request #2380 from borglab/fix/pseudorange-factor
dellaert Feb 2, 2026
0cb02a8
Merge pull request #2381 from borglab/fix/small_issues
dellaert Feb 2, 2026
3bdfb71
test w vector-valued equality constraint
dellaert Feb 3, 2026
ff45bcb
Fix bug
dellaert Feb 3, 2026
bf9913a
Merge pull request #2382 from borglab/fix/constraint
dellaert Feb 3, 2026
38f7112
Add continuous benchmarking workflow
ProfFan Feb 3, 2026
57bc310
Merge pull request #2385 from borglab/fan/benchmark_action
ProfFan Feb 4, 2026
2cd89f7
Add Compile-time option to limit TBB memory growth.
tzvist Dec 29, 2025
5013e2a
perf: TBB parallelization for HessianFactor.
tzvist Dec 29, 2025
87098f7
perf: Enable TBB parallelization unconditionally in HessianFactor
tzvist Feb 1, 2026
4a4b06c
Merge pull request #2356 from tzvist/feature/tzvist/tbb-mem-opt
ProfFan Feb 5, 2026
0287893
Introducing DifferentialPseudorangeFactor [skip ci]
Jan 30, 2026
2cf30d6
Merge pull request #2383 from masoug/feature/differential-pseudorange
dellaert Feb 7, 2026
d6ea20c
Fix a deadlock under Windows
ProfFan Feb 7, 2026
cd7e6af
Format
dellaert Feb 7, 2026
6f054ef
Spelling
dellaert Feb 7, 2026
f882146
docs phase 1
dellaert Feb 7, 2026
8dcba19
docs phase 2: notebooks
dellaert Feb 7, 2026
f2f6254
phase 3: wire
dellaert Feb 7, 2026
4578f01
standardize dividers
dellaert Feb 7, 2026
b0522e6
Merge pull request #2393 from borglab/fan/fix_deadlock
dellaert Feb 7, 2026
d3992f4
Merge pull request #2394 from borglab/feature/format_docs_spelling
dellaert Feb 7, 2026
fff8eb3
dummy
dellaert Feb 8, 2026
ff302b7
rename
dellaert Feb 8, 2026
3466c12
Don't use {doc}
dellaert Feb 8, 2026
055a358
Merge pull request #2395 from borglab/fix/constrained
dellaert Feb 8, 2026
bde2850
Update SFMBAL benchmark script
ProfFan Feb 8, 2026
28eac58
Add missing wrapping for NavState
dellaert Feb 8, 2026
6ac5c5e
NavState guide
dellaert Feb 8, 2026
05b822f
Add missing headers [skip-ci]
dellaert Feb 9, 2026
34eaa45
Merge pull request #2398 from borglab/feature/navstate_doc
dellaert Feb 9, 2026
562f32e
Merge pull request #2397 from borglab/fan/sfmbal_bench_new
dellaert Feb 9, 2026
44c0d14
removed unnecessary DiscreteKeys constructor
aminoh Feb 9, 2026
cbb107f
Fix templates
dellaert Feb 9, 2026
e77c0c3
Fix test for non-serialization case
dellaert Feb 9, 2026
a9f1a8b
Add non-boost-python to CI
dellaert Feb 9, 2026
69d12dd
Merge pull request #2403 from borglab/fix/wrap_wo_boost
dellaert Feb 10, 2026
367e89f
Clean up Boost dependencies
Gold856 Jan 30, 2026
83fb926
Disable Pybind11 LTO
Gold856 Jan 25, 2026
1040ad4
Reorganize sccache config
Gold856 Feb 9, 2026
2df02cf
Disable sccache timeout
Gold856 Feb 9, 2026
f9429cb
Remove unnecessary source directory argument
Gold856 Feb 9, 2026
133bb5d
Consistently use `-G Ninja` to specify Ninja as the generator
Gold856 Feb 9, 2026
46ba170
Remove unncessary --config flag
Gold856 Feb 9, 2026
8c84f59
Remove CMake and Ninja installs
Gold856 Feb 9, 2026
2f19f96
Replace incorrect MSBuild terminology with MSVC
Gold856 Feb 9, 2026
72e15d3
Remove unused trigger-python workflow
Gold856 Feb 10, 2026
5f0e65a
Merge pull request #2400 from Gold856/ci-cleanups
dellaert Feb 10, 2026
b072571
Merge pull request #2399 from Gold856/clean-up-boost-dependencies
dellaert Feb 10, 2026
0792b04
Use vcpkg manifest
Gold856 Feb 5, 2026
0d350ec
Merge pull request #2402 from aminoh/rm_rptd_discretekey_cnstr
dellaert Feb 11, 2026
65256a3
Add more swap space
Gold856 Feb 11, 2026
32a880d
Merge pull request #2388 from Gold856/pin-vcpkg
dellaert Feb 11, 2026
1c9e8ea
Remove macOS 14 from CI
Gold856 Feb 12, 2026
18fe968
Merge pull request #2406 from Gold856/drop-macos-14-ci
dellaert Feb 12, 2026
0ba676e
Fix Linux cibuildwheel jobs
Gold856 Feb 12, 2026
a534bf5
Fix warnings
Gold856 Feb 12, 2026
4ef562f
Only build required Boost libraries
Gold856 Feb 12, 2026
2e34669
Build universal Mac binaries
Gold856 Feb 12, 2026
a7bdc4b
Silence annoying Doxygen messages
Gold856 Feb 13, 2026
66fa39d
Install and test built wheel
Gold856 Feb 13, 2026
76d3d2b
Merge pull request #2407 from Gold856/optimize-cibw
dellaert Feb 14, 2026
a7ba213
Allowing Non Noise Model Factors
Feb 16, 2026
9e48dcf
Adding unit tests for updated GncOptimizer
Feb 16, 2026
f2ede7a
Adding allow_non_noisemodel_factors Gnc parameter
Feb 16, 2026
908d1d4
Resolving gnc comments
Feb 17, 2026
ce24300
Refactor rowCounts out of Multifrontal SymbolicJunctionTree.
tzvist Jan 31, 2026
8633b7b
Optimize multifrontal elimination by caching JunctionTree.
tzvist Feb 1, 2026
737461f
Adding a vector of enums with Types for each factor
Feb 18, 2026
1048686
Remove redundant type
dellaert Feb 18, 2026
1cc5dec
Add parallel elimination in EliminateableFactorGraph.
tzvist Feb 18, 2026
e6686a6
[skip ci] overloading SfmTrack
Feb 18, 2026
4b652bf
Making Gnc NonNoiseModel Factor updates available in python wrapper
Feb 18, 2026
afff38a
Merge pull request #2410 from hkhanuja/fix/gncoptimizer
dellaert Feb 18, 2026
aabb068
Weight update in Gnc GM through static function is LossFunctions
Feb 21, 2026
0574a68
Removing redundant code for GM Weight calculation
Feb 21, 2026
1965238
Merge pull request #2340 from tzvist/feature/tzvi/JunctionIndexElimin…
dellaert Feb 22, 2026
f0d8bc7
ExtendedPose3 class
dellaert Feb 22, 2026
81f8bf7
Pose3 now SE_1(3)
dellaert Feb 22, 2026
81cc498
NavState now SE_2(3)
dellaert Feb 22, 2026
7b2e055
Move definitions
dellaert Feb 22, 2026
7c3f7ef
CRTP
dellaert Feb 22, 2026
243c76e
Python wrapper
dellaert Feb 22, 2026
5b234da
Add math
dellaert Feb 22, 2026
52c0ae1
Review
dellaert Feb 22, 2026
8627df9
Harden Vee
dellaert Feb 22, 2026
502f867
Rename to t_
dellaert Feb 22, 2026
605067d
Remove cache hack
dellaert Feb 22, 2026
787f8e9
Refactor rowCounts out of Multifrontal SymbolicJunctionTree.
tzvist Jan 31, 2026
ef72cbb
Optimize multifrontal elimination by caching JunctionTree.
tzvist Feb 1, 2026
4c28bb7
Add parallel elimination in EliminateableFactorGraph.
tzvist Feb 18, 2026
ed13661
Export
dellaert Feb 22, 2026
231f797
Review comments
dellaert Feb 22, 2026
e7a7b52
Try windows fix
dellaert Feb 22, 2026
ba9028a
Merge branch 'feature/ExtendedPose' into NavState-LieGroup
dellaert Feb 22, 2026
a8dc187
improving design choices
Feb 22, 2026
37c58b7
removed redundant scalar factor
Feb 23, 2026
ddadc04
Added doxygen block
Feb 23, 2026
4250bbf
fixing convention in doxygen block
Feb 23, 2026
5aea998
Fix tests
dellaert Feb 23, 2026
4990582
Comment retract [slip ci]
dellaert Feb 23, 2026
6b20718
Merge pull request #1613 from borglab/NavState-LieGroup
dellaert Feb 23, 2026
1e90026
Merge in 'develop' [skip ci]
dellaert Feb 23, 2026
45488d3
Tiny perf issues [skip ci]
dellaert Feb 23, 2026
c37d510
Expmap fast path [skip ci]
dellaert Feb 23, 2026
1df996f
Merge pull request #2415 from hkhanuja/fix/gmlossfunctions
dellaert Feb 23, 2026
fc993a2
Custom Pose3::Expmap [skip ci]
dellaert Feb 23, 2026
3611155
Added TLS loss in LossFunction
Feb 23, 2026
64fad34
Added SuperLinear Schedule for TLS
Feb 23, 2026
de538af
Added SuperLinear Schedule for TLS
Feb 23, 2026
9f9ba85
Address review comments
dellaert Feb 23, 2026
13cc819
transposes
dellaert Feb 23, 2026
3ea927f
Generic adjointTranspose
dellaert Feb 24, 2026
c3abd6b
Clean up entire Ad/ad API
dellaert Feb 24, 2026
303c38a
Wrapper
dellaert Feb 24, 2026
fd66571
Rot3 -> MatrixLieGroup
dellaert Feb 24, 2026
152d65d
Remove generics
dellaert Feb 24, 2026
c12a51f
Initial plan
Copilot Feb 25, 2026
5515f78
Apply review feedback: restore Jacobian overloads, use trait-based di…
Copilot Feb 25, 2026
0eefe97
Merge pull request #2419 from borglab/copilot/sub-pr-2418
dellaert Feb 25, 2026
cc0141e
Merge pull request #2418 from borglab/feature/transposes
varunagrawal Feb 25, 2026
0eaa797
Merge pull request #2416 from borglab/feature/ExtendedPose
dellaert Feb 25, 2026
64ac174
Resolving TLS PR comments
Feb 25, 2026
5c38f3e
Adding a muMax param for TLS
Feb 26, 2026
57aada7
Making TLS Scheduler available in Python wrapper
Feb 27, 2026
9d72d1e
Making TLS loss available in python wrapper
Feb 27, 2026
f7dddec
Merge pull request #2417 from hkhanuja/feature/tlsloss
dellaert Feb 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ For reviewing PRs:
* Use meaningful variable names, e.g. `measurement` not `msm`, avoid abbreviations.
* Flag overly complex or long/functions: break up in smaller functions
* On Windows it is necessary to explicitly export all functions from the library which should be externally accessible. To do this, include the macro `GTSAM_EXPORT` in your class or function definition.
* When adding or modifying public classes/methods, always review and follow `Using-GTSAM-EXPORT.md` before finalizing changes, including template specialization/export rules.
* If we add a C++ function to a `.i` file to expose it to the wrapper, we must ensure that the parameter names match exactly between the declaration in the header file and the declaration in the `.i`. Similarly, if we change any parameter names in a wrapped function in a header file, or change any parameter names in a `.i` file, we must change the corresponding function in the other file to reflect those changes.
* Classes are Uppercase, methods and functions lowerMixedCase.
* Public fields in structs keep plain names (no trailing underscore).
* Apart from those naming conventions, we adopt Google C++ style.
* Notebooks in `*/doc/*.ipynb` and `*/examples/*.ipynb` should follow the standard preamble:
1) title/introduction markdown cell,
2) copyright markdown cell tagged `remove-cell`,
3) Colab badge markdown cell,
4) Colab install code cell tagged `remove-cell`,
5) imports/setup code cell.
Use the same `remove-cell` tagging convention as existing notebooks so docs build and Colab behavior stay consistent.
* After any code change, always run relevant tests via `make -j6 testXXX.run` in the build folder $WORKSPACE/build. If in VS code, ask for escalated permissions if needed.
139 changes: 139 additions & 0 deletions .github/scripts/compare_time_sfmbal_benchmarks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
#!/usr/bin/env python3
"""Compare timeSFMBAL benchmark JSON files and render a PR-friendly markdown body."""

from __future__ import annotations

import argparse
import json
from pathlib import Path
from typing import Dict


def _load_result(path: Path) -> Dict[str, float]:
with path.open("r", encoding="utf-8") as f:
payload = json.load(f)
if not isinstance(payload, list):
raise ValueError(f"{path} is not a JSON array")

metrics: Dict[str, float] = {}
for item in payload:
if not isinstance(item, dict):
continue
name = item.get("name")
value = item.get("value")
if not isinstance(name, str):
continue
if not isinstance(value, (int, float)):
continue
metrics[name] = float(value)
return metrics


def _collect_results(folder: Path) -> Dict[str, Dict[str, float]]:
if not folder.exists():
return {}

results: Dict[str, Dict[str, float]] = {}
for path in sorted(folder.glob("*.json")):
runner_id = path.stem
results[runner_id] = _load_result(path)
return results


def _fmt_seconds(value: float | None) -> str:
if value is None:
return "N/A"
return f"{value:.6f}"


def _fmt_delta(head: float | None, base: float | None) -> str:
if head is None or base is None:
return "N/A"
delta = head - base
return f"{delta:+.6f}"


def _fmt_percent(head: float | None, base: float | None) -> str:
if head is None or base is None or base == 0.0:
return "N/A"
pct = (head - base) / base * 100.0
return f"{pct:+.2f}%"


def render_markdown(
head_results: Dict[str, Dict[str, float]],
base_results: Dict[str, Dict[str, float]],
head_sha: str,
base_sha: str,
) -> str:
lines = ["<!-- time-sfmbal-benchmark -->", "## timeSFMBAL benchmark", ""]
lines.append(f"- Head: `{head_sha}`")
if base_sha:
lines.append(f"- Base: `{base_sha}`")
lines.append("")

if not head_results:
lines.append("No head benchmark results were found.")
return "\n".join(lines) + "\n"

lines.append(
"| Runner | Metric | Base (s) | Head (s) | Delta (s) | Change |"
)
lines.append("| --- | --- | ---: | ---: | ---: | ---: |")

missing_base_runners = []
for runner_id in sorted(head_results):
head_metrics = head_results[runner_id]
base_metrics = base_results.get(runner_id, {})
if not base_metrics:
missing_base_runners.append(runner_id)

metric_names = sorted(set(head_metrics) | set(base_metrics))
for metric_name in metric_names:
head_value = head_metrics.get(metric_name)
base_value = base_metrics.get(metric_name)
lines.append(
"| "
+ f"{runner_id} | `{metric_name}` | {_fmt_seconds(base_value)} | "
+ f"{_fmt_seconds(head_value)} | {_fmt_delta(head_value, base_value)} | "
+ f"{_fmt_percent(head_value, base_value)} |"
)

if missing_base_runners:
lines.append("")
lines.append(
"Missing base benchmark cache for: "
+ ", ".join(f"`{runner}`" for runner in missing_base_runners)
+ "."
)

return "\n".join(lines) + "\n"


def main() -> int:
parser = argparse.ArgumentParser(
description="Compare per-runner timeSFMBAL benchmark JSON files."
)
parser.add_argument("--head-dir", required=True, help="Directory with head JSON files")
parser.add_argument("--base-dir", required=True, help="Directory with base JSON files")
parser.add_argument("--head-sha", required=True, help="Head commit SHA")
parser.add_argument("--base-sha", default="", help="Base commit SHA")
parser.add_argument("--output", required=True, help="Output markdown file")
args = parser.parse_args()

head_dir = Path(args.head_dir)
base_dir = Path(args.base_dir)
output = Path(args.output)

head_results = _collect_results(head_dir)
base_results = _collect_results(base_dir)
markdown = render_markdown(head_results, base_results, args.head_sha, args.base_sha)

output.parent.mkdir(parents=True, exist_ok=True)
output.write_text(markdown, encoding="utf-8")
print(markdown, end="")
return 0


if __name__ == "__main__":
raise SystemExit(main())
57 changes: 47 additions & 10 deletions .github/scripts/python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ if [ -z ${PYTHON_VERSION+x} ]; then
fi

export PYTHON="python${PYTHON_VERSION}"
NO_BOOST_BUILD=OFF

function install_dependencies()
{
Expand All @@ -43,20 +44,26 @@ function install_dependencies()

function build()
{
export CMAKE_GENERATOR=Ninja
BUILD_PYBIND="ON"
USE_BOOST_FEATURES="ON"
ENABLE_BOOST_SERIALIZATION="ON"

if [ "${NO_BOOST_BUILD}" == "ON" ]; then
USE_BOOST_FEATURES="OFF"
ENABLE_BOOST_SERIALIZATION="OFF"
fi

# Add Boost hints on Windows
BOOST_CMAKE_ARGS=""
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" || "$OSTYPE" == "cygwin" ]]; then
if [ "${NO_BOOST_BUILD}" != "ON" ] && [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" || "$OSTYPE" == "cygwin" ]]; then
if [ -n "${BOOST_ROOT}" ]; then
BOOST_ROOT_UNIX=$(echo "$BOOST_ROOT" | sed 's/\\/\//g')
BOOST_CMAKE_ARGS="-DBOOST_ROOT=${BOOST_ROOT_UNIX} -DBOOST_INCLUDEDIR=${BOOST_ROOT_UNIX}/include -DBOOST_LIBRARYDIR=${BOOST_ROOT_UNIX}/lib"
fi
fi

cmake $GITHUB_WORKSPACE \
-B build \
-B build -G Ninja \
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
-DGTSAM_BUILD_TESTS=OFF \
-DGTSAM_BUILD_UNSTABLE=${GTSAM_BUILD_UNSTABLE:-ON} \
Expand All @@ -68,20 +75,28 @@ function build()
-DGTSAM_UNSTABLE_BUILD_PYTHON=${GTSAM_BUILD_UNSTABLE:-ON} \
-DGTSAM_PYTHON_VERSION=$PYTHON_VERSION \
-DPYTHON_EXECUTABLE:FILEPATH=$(which $PYTHON) \
-DGTSAM_USE_BOOST_FEATURES=ON \
-DGTSAM_ENABLE_BOOST_SERIALIZATION=ON \
-DGTSAM_USE_BOOST_FEATURES=${USE_BOOST_FEATURES} \
-DGTSAM_ENABLE_BOOST_SERIALIZATION=${ENABLE_BOOST_SERIALIZATION} \
-DGTSAM_ALLOW_DEPRECATED_SINCE_V43=OFF \
-DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/gtsam_install \
$BOOST_CMAKE_ARGS

# Set to 2 cores so that Actions does not error out during resource provisioning.
cmake --build build -j2

cmake --build build --target python-install
if [ "${NO_BOOST_BUILD}" == "ON" ]; then
# Build only wrapper targets for the no-Boost verification lane.
cmake --build build -j2 --target gtsam_py gtsam_unstable_py
else
# Set to 2 cores so that Actions does not error out during resource provisioning.
cmake --build build -j2
cmake --build build --target python-install
fi
}

function test()
{
if [ "${NO_BOOST_BUILD}" == "ON" ]; then
export PYTHONPATH="$GITHUB_WORKSPACE/build/python:$PYTHONPATH"
fi

cd $GITHUB_WORKSPACE/python/gtsam/tests
$PYTHON -m unittest discover -v
cd $GITHUB_WORKSPACE
Expand All @@ -94,8 +109,30 @@ function test()
# cmake --build build --target python-test-unstable
}

# Parse optional flags.
if [ $# -lt 1 ]; then
echo "Usage: $0 {-d|-b|-t} [--no-boost]"
exit 2
fi

ACTION="$1"
shift

while [ $# -gt 0 ]; do
case "$1" in
--no-boost)
NO_BOOST_BUILD=ON
;;
*)
echo "Unknown option: $1"
exit 2
;;
esac
shift
done

# select between build or test
case $1 in
case $ACTION in
-d)
install_dependencies
;;
Expand Down
21 changes: 18 additions & 3 deletions .github/scripts/python_wheels/cibw_before_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ set -x

PYTHON_VERSION="$1"
PROJECT_DIR="$2"
ARCH=$(uname -m)

export PYTHON="python${PYTHON_VERSION}"

Expand All @@ -33,11 +32,26 @@ BOOST_PREFIX="$HOME/opt/boost"
./bootstrap.sh --prefix=${BOOST_PREFIX}

if [ "$(uname)" == "Linux" ]; then
./b2 install --prefix=${BOOST_PREFIX} --with=all -d0
./b2 install --prefix=${BOOST_PREFIX} -d0 --with-graph \
--with-move --with-optional --with-program_options --with-random \
--with-serialization --with-smart_ptr --with-timer --with-chrono
elif [ "$(uname)" == "Darwin" ]; then
./b2 install --prefix=${BOOST_PREFIX} --with=all -d0 \
./b2 install --prefix=${BOOST_PREFIX} -d0 --with-graph \
--with-move --with-optional --with-program_options --with-random \
--with-serialization --with-smart_ptr --with-timer --with-chrono \
architecture=arm \
cxxflags="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}" \
linkflags="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}"
./b2 install --prefix=${BOOST_PREFIX}/x86 -d0 --with-graph \
--with-move --with-optional --with-program_options --with-random \
--with-serialization --with-smart_ptr --with-timer --with-chrono \
architecture=x86 \
cxxflags="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}" \
linkflags="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}"
for dylib in ${BOOST_PREFIX}/lib/*.dylib; do
lipo -create -output $dylib $dylib ${BOOST_PREFIX}/x86/lib/$(basename $dylib)
done
rm -r ${BOOST_PREFIX}/x86
fi
cd ..

Expand Down Expand Up @@ -67,6 +81,7 @@ rm -rf CMakeCache.txt CMakeFiles
cmake $PROJECT_DIR \
-B build \
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
-DGTSAM_BUILD_TESTS=OFF \
-DGTSAM_BUILD_UNSTABLE=${GTSAM_BUILD_UNSTABLE:-ON} \
-DGTSAM_USE_QUATERNIONS=OFF \
Expand Down
3 changes: 1 addition & 2 deletions .github/scripts/unix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ function configure()

# GTSAM_BUILD_WITH_MARCH_NATIVE=OFF: to avoid crashes in builder VMs
# CMAKE_CXX_FLAGS="-w": Suppress warnings to avoid IO latency in CI logs
export CMAKE_GENERATOR=Ninja
cmake $GITHUB_WORKSPACE \
-B build \
-B build -G Ninja \
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-Debug} \
-DCMAKE_CXX_FLAGS="-w" \
-DGTSAM_BUILD_TESTS=${GTSAM_BUILD_TESTS:-OFF} \
Expand Down
Loading