Skip to content

CUDA pointcloud optimizations - #15118

Merged
OhadMeir merged 5 commits into
realsenseai:developmentfrom
OhadMeir:cuda
Jun 4, 2026
Merged

OhadMeir merged 5 commits into
realsenseai:developmentfrom
OhadMeir:cuda

Conversation

@OhadMeir

Copy link
Copy Markdown
Contributor

Tracked on [RSDSO-21414]

Copilot AI review requested due to automatic review settings May 28, 2026 12:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the CUDA pointcloud implementation to reduce per-frame GPU allocation overhead by introducing a per-instance helper that caches device buffers and intrinsics across frames (RSDSO-21414).

Changes:

  • Add rscuda::pointcloud_cuda_helper to own persistent device buffers and cache uploaded intrinsics.
  • Switch the pointcloud CUDA kernel launch to a 2D grid/block mapping (one thread per pixel) to avoid 1D striding/division.
  • Wire the helper into librealsense::pointcloud_cuda so buffers are reused across frames.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/proc/cuda/cuda-pointcloud.h Adds forward declaration and persistent helper member to keep CUDA headers out of the public processor header.
src/proc/cuda/cuda-pointcloud.cpp Instantiates the helper and routes depth deprojection through it.
src/cuda/cuda-pointcloud.cuh Defines the helper class and new constants used by the CUDA pointcloud path.
src/cuda/cuda-pointcloud.cu Implements persistent-buffer deprojection and replaces 1D striding kernel with a 2D kernel launch.

Comment thread src/cuda/cuda-pointcloud.cu Resolved
Comment thread src/cuda/cuda-pointcloud.cu Resolved
Comment thread src/cuda/cuda-pointcloud.cuh Resolved

@Nir-Az Nir-Az left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[rs-agentic-bot] Automated code review for CUDA pointcloud optimizations. See inline comments for details.

Comment thread src/cuda/cuda-pointcloud.cu Resolved
Comment thread src/cuda/cuda-pointcloud.cu Resolved
Comment thread src/cuda/cuda-pointcloud.cu Resolved
Comment thread src/cuda/cuda-pointcloud.cu Resolved
Comment thread src/cuda/cuda-pointcloud.cu Resolved
Comment thread src/cuda/cuda-pointcloud.cuh Resolved
Comment thread src/proc/cuda/cuda-pointcloud.cpp Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Comment thread src/proc/cuda/cuda-align.cu Resolved
Comment thread src/proc/cuda/cuda-align.cu Resolved
Comment thread src/proc/cuda/cuda-align.cu Resolved
Comment thread src/cuda/cuda-pointcloud.cu Resolved
@OhadMeir
OhadMeir merged commit 991e4d5 into realsenseai:development Jun 4, 2026
30 checks passed
@OhadMeir
OhadMeir deleted the cuda branch November 3, 2026 10:31
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.

3 participants