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

First-order CUDA followup fix: explicit CC list for Jetson and Tegra platforms #163

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

griwodz
Copy link
Member

@griwodz griwodz commented Aug 12, 2024

Description

Using CUDA as a language in CMake projects requires a CC selection in the variable CMAKE_CUDA_ARCHITECTURES.

The default here is the oldest CC supported by the installed nvcc. To have a better but not complete CC list for discrete GPUs, set CMAKE_CUDA_ARCHITECTURES to "all-major". Both fails for Tegras and Jetson because CMake guesses that these are ARM platforms with discrete GPUs.

Therefore, we test if the file /etc/nv_tegra_release exists. In this case, we guess that the intention is to compile for Tegras or Jetsons and set CMAKE_CUDA_ARCHITECTURES="53;62;72;87".

Features list

  • Select sensible CCs when PopSift is configured on a Tegra/Jetson to compile for a Tegra/Jetson.

Implementation remarks

  • We are not adding CC 32 to the list since it is deprecated. The current CUDA code may still work on CC32 platforms.

@griwodz griwodz self-assigned this Aug 12, 2024
@griwodz griwodz added type:bug ready cuda issues related to cuda versions labels Aug 12, 2024
@griwodz griwodz changed the title First-order CUDA followup fit: explicit CC list for Jetson and Tegra platforms First-order CUDA followup fix: explicit CC list for Jetson and Tegra platforms Aug 12, 2024
@griwodz griwodz requested a review from simogasp August 12, 2024 09:46
@griwodz
Copy link
Member Author

griwodz commented Aug 12, 2024

Waiting to hhackbarth to confirm that it works on their Jetson version as well.
I also learned that CMAKE_CUDA_ARCHITECTURES belongs before project() and not after.

@griwodz
Copy link
Member Author

griwodz commented Aug 13, 2024

Hi @simogasp ,
the fix is confirmed in the bug report #160. I don't know if I'm able to follow up on the Python wrapper, but I'll try. I think that this fix is only beneficial for the develop branch in any case.

Copy link
Member

@simogasp simogasp left a comment

Choose a reason for hiding this comment

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

Beside a small comment it seems ok to me (but I cannot test it atm)

CMakeLists.txt Show resolved Hide resolved
@griwodz griwodz merged commit 66f1ed6 into develop Aug 13, 2024
6 checks passed
@griwodz griwodz deleted the dev/cmake-native-cuda-jetson branch August 13, 2024 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

runtime error: cudaMemcpyToSymbol failed for Gauss kernel initialization
2 participants