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

Mention CMAKE_CUDA_ARCHITECTURES in main documentation or compile for more architectures? #159

Open
VRichardJP opened this issue Feb 20, 2025 · 3 comments
Labels
enhancement New feature or request

Comments

@VRichardJP
Copy link

VRichardJP commented Feb 20, 2025

There is no mention of CMAKE_CUDA_ARCHITECTURES in the main documentation (https://koide3.github.io/glim/installation.html).

If user cmake is recent enough (>= 3.24), then CMAKE_CUDA_ARCHITECTURES=native is used in gtsam_points, which definitely looks like a sensible default. Unfortunatelly, the current cmake on Ubuntu 22.04 is slightly older so gtsam_points falls back to compute capability >= 8.0 here: https://github.com/koide3/gtsam_points/blob/529d1d190067a0c3176275f4cbaeb6bd23575d9c/CMakeLists.txt#L72

Considering the popularity of old Jetson TX2/nano and cie (which support compute <= 5.3), maybe it could be worth to:

  • mention the necessity to set CMAKE_CUDA_ARCHITECTURES for old GPUs in the main documentation
  • compile for older compute version by default
  • or compile for many arch by default (BUILD_WITH_CUDA_MULTIARCH)
  • or stop cmake configuration if CMAKE_CUDA_ARCHITECTURES is unset?

What do you think?

@VRichardJP VRichardJP added the enhancement New feature or request label Feb 20, 2025
@koide3
Copy link
Owner

koide3 commented Feb 21, 2025

OK, I think it would be good do add a few more options to the default CMAKE_CUDA_ARCHITECTURES (53 62 87) to better support Jetson series. I'll make a PR soon. Do you think if we need more architectures?
https://github.com/koide3/gtsam_points/blob/529d1d190067a0c3176275f4cbaeb6bd23575d9c/CMakeLists.txt#L72

@VRichardJP
Copy link
Author

I think these are good defaults

@koide3
Copy link
Owner

koide3 commented Feb 21, 2025

I just added several architectures to the default koide3/gtsam_points#54. I'll soon merge it.

set(CMAKE_CUDA_ARCHITECTURES 53 62 80 87 89 90 CACHE STRING "CUDA architectures" FORCE)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants