alicevision / popsift

PopSift is an implementation of the SIFT algorithm in CUDA.
https://popsift.readthedocs.io
Mozilla Public License 2.0
430 stars 114 forks source link

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

Closed griwodz closed 1 month ago

griwodz commented 1 month ago

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

Implementation remarks

griwodz commented 1 month ago

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 commented 1 month ago

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.