Repository navigation
Add resident GPU GICP inverse weighting and normal-equation reductions - #171
Merged
Merged
Conversation
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.
GICP's GPU correspondence route still downloaded every match and computed rotated covariance inverses/Hessian/gradient/fitness on CPU. Add
align_with_gpu_reductionunderregister-gicp-gpuand reusableGpuGicpInput/owned normal equations undergpu-wgpu. Five device passes retain positions/covariances, transform originals, reuse unbounded nearest traversal and reduce inverse-weighted equations/error in one submission. Explicit readback is 256 bytes per evaluation; post-update equations serve the next solve/final fitness. CPU k-NN or explicit radius-GPU covariance readback/re-upload remains preparation, with complete receipts.CPU solves centered/scaled 6x6 equations and converts the linearized step to the existing world update/stopping convention. Packed SPD validation, target-inverse trace normalization and relative covariance Cholesky guards reject unsupported numerics, invalidating all result payload without CPU fallback. Device f32 weights and normalized solving can change matching/pose/stopping; ordinary CPU and correspondence GICP source remains unchanged. Private scratch is leased through submission and owned results survive input drops/concurrent calls.
Two isolated release surveys retain 24 conditions and 20 paired samples per stage. Previous-GPU/new point estimates are 1.05-1.73x; two small-gain conditions have intervals including 1. Small inputs remain slower than the ordinary API. At 65,537 points, CPU k-NN preparation drops total D2H from 3,670,072 to 1,024 bytes; radius preparation still includes covariance readback, giving 4,195,392 total bytes versus 7,864,440 previously. Counts, raw fitness, precision differences, timing variability and bootstrap intervals are in the evidence note. Prepared-stage timings consistently use radius covariances and exclude preparation/readback/CPU solving.
Validation passed: 215 GPU tests, 35 registration library tests, two explicitly run adapter integrations covering 108 pose/scale/covariance/stopping conditions and 98,928 points, three existing GICP GPU tests and a facade test. Independent f64 covariance inversion/Jacobian/full H/g comparisons, world-basis conversion, strict conditioning/overflow/status, exact receipts, unequal clouds/outliers and concurrency pass. All-feature/CPU-only Clippy, minimal GPU, WASM and Rustfmt pass. Existing CPU/correspondence GICP and ICP device math is unchanged; current feature-isolation CI covers the new APIs.