Repository navigation
Report executed RANSAC trials - #4974
Merged
Merged
Conversation
aswanth-07
marked this pull request as ready for review
November 8, 2026 12:25
Replace the OpenMP reduction counter with an undo of the reservation: if a thread's fetch_add fails the trial-budget or abort check, it decrements trial_counter before breaking, so the counter counts only executed trials. A reused index fails the gate again, since the abort flag is never cleared and a budget failure means max_num_trials was already reached. Also add a dynamic-stopping test asserting the reported count never exceeds the trial budget.
ahojnnes
approved these changes
Nov 8, 2026
ahojnnes
enabled auto-merge (squash)
November 8, 2026 15:04
fringehush-gif
added a commit
to fringehush-gif/colmap
that referenced
this pull request
Nov 8, 2026
Report RANSAC trials that actually passed the budget and abort checks, rather than reservations that never reached sampling. The upstream correction leaves sampling, stopping conditions and model-selection logic unchanged. ## Upstream commits - b5ff5c3 — Report executed RANSAC trials (colmap#4974) ## Validation - The maintained suites passed all 8 RANSAC and 11 LO-RANSAC tests. Both new counter regressions fail with the original fork headers. - An instrumented estimator matched reported totals to actual calls for budgets of 0, 1, 5 and 2,000 with one and four requested threads. A four-thread OpenMP team and participation by all four workers were observed. - Reused nine source/header-matched SDK archive members in private incremental test builds. Runtime dependencies resolved; configured clang-tidy 18 and clang-format 23 checks passed, with recorded suppressions. - Local qualification used OpenMP. It did not exercise a separate no-OpenMP build or prove a dynamic-abort interleaving occurred. AI disclosure: Totally vibe coded
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RANSAC::Report::num_trialscurrently includes reservations that fail the trial-budget or abort check before sampling. For example, a one-trial budget reports two iterations with one thread and five with four threads. A zero-trial budget also reports work that never ran.LORANSACshares the same reporting error.I count the iterations that pass both checks with an OpenMP reduction. The reservation counter, sampling, stopping conditions and model selection remain unchanged. This also gives accurate trial totals to the existing fundamental-matrix benchmark.
The two regression tests cover zero, one and five trials with one and four threads. All 12 count assertions fail on pristine production; all 12 tests across both native modules pass with the fix, both with OpenMP and with it disabled. A separate 900-call counting matrix confirms that each report equals the actual minimal-estimator calls. All 108 seeded similarity-transform model, mask and support controls match pristine output exactly.
I validated MSVC Release on Windows. Six alternating timing rounds show median changes from -3.4% to +5.8% across the serial paths, including a +4.4 us/call no-OpenMP LORANSAC diagnostic. The per-round timings are noisy; this is a reporting correction without a speed claim. Changed-file formatting, scoped Clang-Tidy and whitespace checks pass. Full application, reconstruction-dataset, GPU and other-platform validation remain unrun.
AI assistance disclosure: AI-assisted development tools were used during investigation and implementation. The reported tests were run against the final diff.