Skip to content

Parallelize exact KD-tree construction and resident GICP preparation - #176

Merged
rsasaki0109 merged 1 commit into
mainfrom
codex/parallel-kdtree-build
Oct 13, 2026
Merged

rsasaki0109 merged 1 commit into
mainfrom
codex/parallel-kdtree-build

Conversation

@rsasaki0109

Copy link
Copy Markdown
Owner

Resident GPU GICP still builds KD-trees serially before staging. Add explicit KdTree::from_slices_parallel / from_point_cloud_parallel under search parallel, and use that preparation in resident GICP methods. Large native trees use bounded scoped workers over disjoint point/node ranges in one exact-sized preorder array; canonical axis/partition code retains point permutation, split bits and query ties.

Below 32,768 points, one useful worker or WASM uses the existing serial constructor. Ordinary constructors and CPU GICP keep serial placement. No unsafe, per-worker trees, node merge, production dependency or GPU shader changes are introduced. Workers are bounded per call by available CPUs and one per 16,384 points; this is not a process-wide thread budget.

Validation:

  • 405 exact complete layouts and 30,375 ordered query results with forced 1/2/6 worker budgets, including NaN payloads, infinities, signed zeros, ties and threshold/odd boundaries. Node planning agrees with an independent recursive-count table for 131,099 sizes.
  • 216 completed GICP conditions preserve complete diagnostics exactly across legacy, resident k-NN, bounded radius and grid covariance modes: 1,230,012 compared points, unchanged poses/fitness/history/counts/stopping/receipts.
  • Search all-feature suite: 58 passing tests; registration library: 35 passing tests. Facade smoke, all-target Clippy, minimal search parallel, CPU-only GICP, optional WASM builds and Rustfmt pass.
  • Two isolated release surveys per family, three warmups and 20 alternating pairs. At 65,537 points, complete tree construction improves 1.88–2.55x and complete GPU GICP 1.16–1.27x. At 262,145 points, complete GICP improves 1.36–1.48x. Corresponding within-survey 95% intervals exceed one in both repeats. Small calls remain serial; no portable/global crossover claim is made.

Full methodology, every timing result and limitations: parallel KD-tree evidence.

@rsasaki0109
rsasaki0109 merged commit 1196896 into main Oct 13, 2026
241 of 242 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant