Skip to content

Implement CUDA-style voxel grid pruning benchmark#80

Merged
seanwevans merged 1 commit intomainfrom
codex/implement-cuda-spatial-hashing-algorithm
Apr 1, 2026
Merged

Implement CUDA-style voxel grid pruning benchmark#80
seanwevans merged 1 commit intomainfrom
codex/implement-cuda-spatial-hashing-algorithm

Conversation

@seanwevans
Copy link
Copy Markdown
Owner

Motivation

  • Naive all-pairs close-approach search is O(N^2) and the roadmap specifies a GPU cell-grid pruning approach to reduce candidates.
  • Provide a concrete, testable model of the roadmap’s pruning pipeline inside the benchmark backend to guide CUDA implementation and validate hashing/adjacency semantics.

Description

  • Replaced the previous CUDA benchmark stub with simulate_cuda_cell_grid_conjunctions which models a uniform 3D voxel grid and per-object voxel hashing.
  • Added GridConfig and Cartesian types plus coords_to_linear_hash and quantize_axis to assign stable voxel IDs to propagated positions.
  • Implemented sorted voxel bucketing (analogue of a Thrust radix sort), compact voxel range construction, and candidate generation restricted to the same voxel and its 26 neighbors via are_neighbor_voxels and unflatten_hash.
  • Wired the new path into the benchmark runner by calling the new simulation from CudaRunner and added focused unit tests for neighbor adjacency and hash round-trip stability.

Testing

  • Ran cargo test -p openastrovizd and all unit tests passed (22 passed, 0 failed).
  • Ran cargo fmt to format the changes and it completed successfully.

Codex Task

@seanwevans seanwevans merged commit 1bed259 into main Apr 1, 2026
2 checks passed
@seanwevans seanwevans deleted the codex/implement-cuda-spatial-hashing-algorithm branch April 1, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant