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

Latest Release (v2.51.1) Does NOT Have CUDA Enabled #10911

Closed
luis-camero opened this issue Sep 16, 2022 · 13 comments
Closed

Latest Release (v2.51.1) Does NOT Have CUDA Enabled #10911

luis-camero opened this issue Sep 16, 2022 · 13 comments

Comments

@luis-camero
Copy link

Required Info
Camera Model D400
Firmware Version 5.13.0.50
Operating System & Version Ubuntu 20.04
Kernel Version (Linux Only) 5.4.0-125-generic
Platform PC
SDK Version 2.51.0
Language C++/Python (using realsense-ros)
Segment Robot

Issue Description

With the previous release (v2.50.0), the librealsense2 pre-built binaries would have been built with CUDA (i.e. -DBUILD_WITH_CUDA=True), and building the realsense-ros package with these pre-built binaries and CUDA would result in the Realsense ROS node using the GPU for filters (such as shading pointclouds).

This was confirmed by @dorodnic here.

However, it seems that the latest pre-built binaries of the librealsense2 SDK (v2.51.1) was not built with CUDA enabled.

Previously (2.50.0-0-realsense), whenever the Realsense ROS was started, it would be registered in nvtop, clearly utilizing the GPU.
Now (2.51.1-0-realsense), does not.

If instead, I manually build the latest librealsense SDK (v2.51.1) from source with the -DBUILD_WITH_CUDA=True compiler flag and build the realsense-ros against it, then the Realsense node will utilize the GPU.

Was disabling the BUILD_WITH_CUDA compiler flag deliberate, or an oversight? Should we expect all upcoming pre-built packages to be built without CUDA enabled?

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Sep 17, 2022

Hi @luis-camero The Debian packages should have CUDA support enabled by default (though the packages installed by the RealSense ROS wrapper's 'Method 1' apt-get installation procedure have not had CUDA support included since December 2020).

Let's keep this case open to see whether other RealSense users report the same issue with Debian package installations. Thanks for the report!

@luis-camero
Copy link
Author

Thanks for quick response @MartyG-RealSense. I specifically installed the 2.51.1-librealsense2 package, not the ros-$ROS_DISTRO-librealsense2 package, and built the realsense-ros catkin package, as is outlined in Method2.

I had done this several times with the previous 2.50.0 release of the SDK without any issues. Maybe there's a step I'm missing? Do I need to compile the ROS driver with a certain flag?

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Sep 20, 2022

CUDA support is enabled through the librealsense SDK and does not need to be separately enabled in the ROS wrapper in order to automatically accelerate pointclouds and depth-color alignment generated by the wrapper when CUDA support is enabled in the SDK.

I will consult with my Intel RealSense colleagues about your problem with SDK 2.51.1 packages. Thanks very much for your patience!

@Nir-Az
Copy link
Collaborator

Nir-Az commented Sep 21, 2022

Hi @luis-camero ,

It could be that the configuration that was used to build until version 2.50 is different than the one we used for building 2.51.1 (Sorry for that).

I can confirm that release 2.51.1 was built with this configuration:
JetPack 4.4.1 (L4T 32.4.4)
Which includes CUDA version 10.2 .

I would suggest to verify the installed CUDA version and try to match it, it should work since we do build it with -DBUILD_WITH_CUDA=True.

Good luck,
Nir

@MartyG-RealSense
Copy link
Collaborator

Hi @luis-camero Do you require further assistance with this case, please? Thanks!

@luis-camero
Copy link
Author

Hi @Nir-Az,
I found this issue when using setting up the ROS Realsense Noetic package using the 20.04 version of librealsense2-2.51.1 while using the latest stable release of CUDA (v11.7).

I cannot easily match CUDA v10.2 in Ubuntu 20.04, since v10.2 was not released for 20.04.

However, I have a few questions:

  1. I'm confused as to how the librealsense SDK was built for Ubuntu 20.04 in JetPack; I thought these two platforms had conflicting architectures
  2. Where previous SDK versions built on JetPack as well?

Thanks for the help,
Luis

@Nir-Az
Copy link
Collaborator

Nir-Az commented Sep 27, 2022

Hi @luis-camero ,

  1. The LibRealSense SDK was built using JetPack 4.4.1 which is based on Ubuntu 18.04 (not for Ubuntu 20.04)
  2. Yes, the previous (arm64) SDK Debians were built on a Jetson platform, I am not sure if it was the exact same version.

Since we do not supply prebuilt packages for all JP versions you can always build from source on your platform and it should work (like we saw on your case).

Hope this information helps..
Nir

@MartyG-RealSense
Copy link
Collaborator

Hi @luis-camero Was the information provided in the comment above helpful, please? Thanks!

@MartyG-RealSense
Copy link
Collaborator

Hi @luis-camero Do you require further assistance with this case, please? Thanks!

@luis-camero
Copy link
Author

I understand that I have to build from source. But I am NOT using a Jetson. I am using a standard Ubuntu 20.04 server amd64 install and pulled the compatible librealsense2 amd64, pre-built package from your package server.

I am confused as to how or why you'd build amd64 packages for Focal in Jetpack with 18.04. There must be a different build configuration and different CUDA version for this 2.51.1-0~realsense0.7526 package.

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Oct 11, 2022

Hi @luis-camero If you are installing from packages on an amd64 computer then the instructions on the distribution_linux.md page should be used.

https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md

JetPack is only involved in installations on Jetson boards, not amd64 computers. @Nir-Az referred to arm64 rather than amd64 in his advice above at #10911 (comment) - arm64 refers to computers / computing devices that use CPUs with Arm architecture such as Nvidia Jetson and Raspberry Pi, whilst amd64 usually refers to x86 / x64 CPU architecture like that in desktop and laptop PCs.

@Nir-Az
Copy link
Collaborator

Nir-Az commented Oct 11, 2022

Indeed we had a misunderstanding as your reference link issue and comments were about a Jetson platform.
amd64 prebuild binaries were not built with CUDA enabled (including v2.50.0) as we do not want to enforce the users CUDA installed. (Jetson JP comes with CUDA integrated so that is a different case).

Bottom line, amd64 users that wants to use CUDA features will need to build from source.

@luis-camero
Copy link
Author

I understand, thanks!

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

3 participants