Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CUDA links, instructions? #8478

Closed
arothenberg opened this issue Mar 2, 2021 · 8 comments
Closed

CUDA links, instructions? #8478

arothenberg opened this issue Mar 2, 2021 · 8 comments

Comments

@arothenberg
Copy link


Required Info
Camera Model D435
Firmware Version 05.12.02.100
Operating System & Version Win (10)
Platform PC
SDK Version 2.32
Language C++
Segment desktop app

Issue Description

Is there a step by step for setting up CUDA?
I read that I should cmake from a CUDA file? I've been cmaking from the root I think and everything works great. How should I do it for this case?

Also, I read that once the project is made(maked) using the Cuda config there is nothing more that needs to be done, is that right? IOW the code I write stays the same.

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Mar 2, 2021

Hi @arothenberg If you are installing librealsense from packages then CUDA support is built into them. An Nvidia graphics GPU is required to take advantage of CUDA. Nvidia Jetson developer boards have an Nvidia GPU.

If you are building librealsense from source code with CMake then you can enable CUDA support by including the build flag DBUILD_WITH_CUDA:bool=true in the CMake instruction.

When CUDA support is enabled, SDK operations that can benefit from CUDA (pointcloud, alignment and color conversion) should be automatically accelerated.

#1866

@arothenberg
Copy link
Author

ok thanks

@arothenberg
Copy link
Author

I need the developer board, not just an nvidea card like a Gforce?
Also does it affect the standard texture rendering or just the point cloud rendering.

@arothenberg
Copy link
Author

By color conversion, you mean the color mapping of the depth data?

@MartyG-RealSense
Copy link
Collaborator

As far as I know, any detectable Nvidia GPU, including video cards, is usable by librealsense's CUDA support.

The color conversion is about converting a color image from the native image format (YUY2) to another. The formats that have support for conversion speed acceleration include those in the table linked to earlier.

#1866 (comment)

@arothenberg
Copy link
Author

Ah ok. thanks.

@arothenberg
Copy link
Author

Wow, there is almost nothing on realsense and cuda. I'll make it and see what happens. Are there a list of cuda functions?

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Mar 3, 2021

If CUDA support is enabled and an Nvidia GPU is present then you do not need a list of CUDA functions, as the accelerations are applied automatically.


It is different for the SDK's alternate graphics acceleration method, which is called GLSL processing blocks. With GLSL, which works with any brand of GPU instead of just Nvidia as it is 'vendor-neutral', you have to amend script instructions to take advantage of the acceleration - for example, changing rs2::align to rs2::gl::align or changing rs2::pointcloud to rs2::gl::pointcloud

The link below has a very good pros and cons analysis of GLSL processing blocks and when it can be used.

#3654

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants