Skip to content

Add stable resident GPU trimming for ICP - #177

Merged
rsasaki0109 merged 1 commit into
mainfrom
codex/gpu-icp-resident-trimming
Oct 13, 2026
Merged

rsasaki0109 merged 1 commit into
mainfrom
codex/gpu-icp-resident-trimming

Conversation

@rsasaki0109

Copy link
Copy Markdown
Owner

Trimmed ICP currently transfers query/match payload per iteration and sorts retained pairs on CPU. Add explicit align_with_gpu_trimmed_reduction and owned GpuIcpTrimmedMoments: GPU transforms, matches, stably selects by distance/source index, and reduces retained-pair moments. Fitness and stopping continue to use all gated pairs, with 176 bytes downloaded per evaluation.

Integer device limbs reproduce binary64 retained-count multiplication/rounding/floor. Fraction one delegates to canonical untrimmed kernels. Original inputs and private selection scratch stay resident through one submission; CPU target-tree construction, Horn pose solving and convergence remain.

Validation:

  • 11 native ICP primitive tests, including seven new selection/math/ownership/status tests and 443,827 exact fraction/count checks.
  • 486 native trimmed registration conditions plus three rotated initial guesses; existing 54 untrimmed conditions, error/concurrency tests, two facade smoke tests, and all-feature registration library tests.
  • Clippy all targets/features, CPU-only ICP build, optional ICP WASM build, formatting and privacy checks.
  • Two isolated release surveys with three warmups and 20 alternating paired rounds per condition. At 65,537 points, full calls improve 2.61–3.32x over CPU and 1.34–1.53x over previous GPU. At 262,145 points, pose-qualified unique/duplicate cases improve 4.19–5.36x and 1.67–1.77x respectively; D2H falls from 14,680,120 to 704 bytes. Small 257-point calls remain substantially faster on CPU.

Precision limit: the 262,145-point partially gated, trim-0.8 case has a CPU pose-coordinate difference of 0.0008154977, exceeding the unchanged 3e-5 agreement threshold. Both successful surveys retain it with within_pose_tolerance=false; it is excluded from pose-qualified speedup ranges. Counts/stopping and independent all-gated fitness checks agree, but its timing is not evidence of CPU-equivalent pose accuracy. Device f32 rounding can change retained subsets near ties; further precision investigation remains on the roadmap.

Full measurement evidence and limits.

Depends on #176.

@rsasaki0109
rsasaki0109 changed the base branch from codex/parallel-kdtree-build to main October 13, 2026 02:59
@rsasaki0109
rsasaki0109 merged commit a22bf28 into main Oct 13, 2026
125 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