Repository navigation
Add resident GPU ICP transforms and centered moment reductions - #170
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.
ICP's GPU correspondence route still uploaded transformed queries and downloaded every match each iteration. Add
align_with_gpu_reductionunderregister-icp-gpuand reusableGpuIcpInput/owned moments undergpu-wgpu: retain original source/target/tree, transform originals, match and reduce centered centroid/cross-covariance/fitness on GPU in six passes sharing one submission. Only 176 bytes of moments/status are explicitly downloaded per evaluation. CPU Horn solving and convergence remain; reuse post-update moments for the next update/final fitness. Four updates use five evaluations and 880 D2H bytes, compared with nine match batches and 4,718,664 bytes for 65,537 source points on the previous route.The new API requires untrimmed ICP, finite extents and supported normalization/device limits; the existing CPU and GPU-correspondence routes retain their math and trimming support. Private scratch is leased through submission, pipeline caches belong to the runtime, and owned results outlive inputs. GPU overflow/malformed-match/numerical status invalidates all payload. f32 transforms/reductions can change matches, poses and stopping near gates or degenerate geometry; this is an explicit precision path, without automatic CPU fallback or CPU parity guarantees.
Two isolated release surveys retain all 24 conditions and 20 paired samples per stage. Complete calls improve 1.61-2.49x over the previous GPU route; at 65,537 points, CPU/new ratios are 5.01-7.14x. Small calls remain slower than CPU and the 4,097-point crossover varies between surveys. Benchmark pose-coordinate differences are at most 0.0000019073486; counts, raw fitness, transfer bytes, adverse timing cases and bootstrap intervals accompany the evidence note. Prepared resident timings exclude upload/readback/CPU solving and the iterative loop.
Validation passed: 211 GPU tests, 35 registration library tests, three new explicitly run adapter integration tests covering 54 scale/geometry/unequal-cloud cases and 41,067 transformed points, three existing correspondence GPU tests, and a facade adapter test. Independent f64 moments, exact receipts, overflow/zero-match/ownership/concurrency and convergence/configuration guards pass. CPU centroid/covariance/Horn/eigensolver arithmetic and ICP update/fitness/trimming loops are unchanged after shared helper extraction. All-feature/CPU-only Clippy, minimal GPU, WASM and Rustfmt passed. Existing feature-isolation CI cases cover the new entry point.