Skip to content

Accelerate GPU voxel dispatch#66

Merged
rsasaki0109 merged 1 commit into
mainfrom
agent/accelerate-gpu-voxel
Jul 16, 2026
Merged

Accelerate GPU voxel dispatch#66
rsasaki0109 merged 1 commit into
mainfrom
agent/accelerate-gpu-voxel

Conversation

@rsasaki0109

Copy link
Copy Markdown
Owner

What changed

  • prefer a high-performance wgpu adapter by default while exposing an explicit low-power preference
  • batch GPU bitonic-sort and prefix-scan stages into fewer command submissions
  • replace large host zero-vector uploads with device-side buffer clears
  • fix recycled voxel-key buffers so equal-sized later uploads retain COPY_DST compatibility
  • keep centroid Auto on CPU until a new measured GPU crossover exists
  • replace stale performance claims and charts with the 2026-07-16 receipt

Why

The previous runtime unconditionally requested a low-power adapter on hybrid systems. The end-to-end benchmark also exposed a 2M-point validation panic from incompatible pooled-buffer usage and substantial command-submission and host-allocation overhead. Meanwhile, later CPU fast paths invalidated the old README crossover claim.

Performance

Isolated Criterion GPU medians after the final batching change:

  • 500k: 51.816 ms -> 35.829 ms (-30.9%)
  • 1M: 78.258 ms -> 65.890 ms (-15.8%)
  • 2M: 129.57 ms -> 104.82 ms (-19.1%)

The current CPU path remains faster through 2M, so Auto now stays on CPU for centroid mode. Explicit GPU and GPU-resident paths remain available. Public receipts intentionally omit the GPU model name.

Validation

  • cargo test -p spatialrust-gpu --features gpu-wgpu (26 passed)
  • cargo test -p spatialrust-filtering --features filter-voxel-gpu (18 passed)
  • cargo clippy -p spatialrust-gpu --features gpu-wgpu --all-targets -- -D warnings
  • cargo clippy -p spatialrust-filtering --features filter-voxel-gpu --all-targets -- -D warnings
  • cargo fmt --all --check
  • regenerated README benchmark and social SVGs

@rsasaki0109
rsasaki0109 merged commit 6e97d58 into main Jul 16, 2026
88 checks passed
@rsasaki0109
rsasaki0109 deleted the agent/accelerate-gpu-voxel branch July 16, 2026 12:48
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