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

Add support for CUDA versions through 12.1. #146

Merged
merged 2 commits into from
Mar 24, 2023

Conversation

BillyONeal
Copy link
Contributor

Description

CUDA 12 dropped support for hardware level 3.5.

I filled out values for all the CUDA versions based on when the hardware level appears in the table at:

https://docs.nvidia.com/cuda/archive/11.<N>.0/cuda-c-programming-guide/index.html#compute-capabilities

@BillyONeal
Copy link
Contributor Author

This failed in the vcpkg build lab; drafted for now:

dbg/src/CMakeFiles/popsift.dir/popsift/common/./popsift_generated_debug_macros.cu.obj D:/buildtrees/popsift/x64-windows-dbg/src/CMakeFiles/popsift.dir/popsift/common/./popsift_generated_device_prop.cu.obj -o D:/buildtrees/popsift/x64-windows-dbg/src/CMakeFiles/popsift.dir/./popsift_intermediate_link.obj"
nvlink error   : Undefined reference to '__cudaCDP2GetErrorString' in 'D:/buildtrees/popsift/x64-windows-dbg/src/CMakeFiles/popsift.dir/popsift/./popsift_generated_s_filtergrid.cu.obj' (target: sm_87)
nvlink error   : Undefined reference to '__cudaCDP2LaunchDevice' in 'D:/buildtrees/popsift/x64-windows-dbg/src/CMakeFiles/popsift.dir/popsift/./popsift_generated_s_filtergrid.cu.obj' (target: sm_87)
nvlink error   : Undefined reference to '__cudaCDP2GetLastError' in 'D:/buildtrees/popsift/x64-windows-dbg/src/CMakeFiles/popsift.dir/popsift/./popsift_generated_s_filtergrid.cu.obj' (target: sm_87)
nvlink error   : Undefined reference to '__cudaCDP2GetDevice' in 'D:/buildtrees/popsift/x64-windows-dbg/src/CMakeFiles/popsift.dir/popsift/./popsift_generated_s_filtergrid.cu.obj' (target: sm_87)
nvlink error   : Undefined reference to '__cudaCDP2GetErrorName' in 'D:/buildtrees/popsift/x64-windows-dbg/src/CMakeFiles/popsift.dir/popsift/./popsift_generated_s_filtergrid.cu.obj' (target: sm_87)
nvlink error   : Undefined reference to '__cudaCDP2DeviceGetAttribute' in 'D:/buildtrees/popsift/x64-windows-dbg/src/CMakeFiles/popsift.dir/popsift/./popsift_generated_s_filtergrid.cu.obj' (target: sm_87)
nvlink error   : Undefined reference to '__cudaCDP2PeekAtLastError' in 'D:/buildtrees/popsift/x64-windows-dbg/src/CMakeFiles/popsift.dir/popsift/./popsift_generated_s_filtergrid.cu.obj' (target: sm_87)
nvlink error   : Undefined reference to '__cudaCDP2GetParameterBuffer' in 'D:/buildtrees/popsift/x64-windows-dbg/src/CMakeFiles/popsift.dir/popsift/./popsift_generated_s_filtergrid.cu.obj' (target: sm_87)

@simogasp
Copy link
Member

target: sm_87 is the Jetson Orin, @griwodz I don't remember if we skipped that kind of architecture in the past because it was not compiling as well?

@simogasp simogasp added the cuda issues related to cuda versions label Mar 20, 2023
@simogasp simogasp added this to the v0.9.1 milestone Mar 20, 2023
@simogasp
Copy link
Member

simogasp commented Mar 20, 2023

@BillyONeal I think we can remove the 87 architecture as it is not supported for debugging, here is the old discussion I was referring to
#74 (comment)

If that works, we can accept this PR and make a 0.9.1 release that contains this and the other patch you added in vcpkg about the missing headers. That is actually already merged in the develop branch through #144 . Like that, you can avoid patches on vcpkg

elseif(CUDA_VERSION VERSION_GREATER_EQUAL 11.8)
set(CUDA_MIN_CC 35)
set(CUDA_MAX_CC 90)
elseif(CUDA_VERSION VERSION_GREATER_EQUAL 11.6)
Copy link
Member

Choose a reason for hiding this comment

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

according to this https://en.wikipedia.org/wiki/CUDA#GPUs_supported it was since 11.5 (but it's Wikipedia, so I don't know how reliable it is ;-) )

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://docs.nvidia.com/cuda/archive/11.5.0/cuda-c-programming-guide/index.html#compute-capabilities <-- I extracted all these values by looking at Table 15 here, which doesn't list an 8.7 until 11.6. But if 8.7 was a specific Jetson board or whatever I guess that could make sense.

Of course, the 87 probably has to die anyway given other discussion here...

@simogasp simogasp linked an issue Mar 20, 2023 that may be closed by this pull request
@BillyONeal
Copy link
Contributor Author

If that works, we can accept this PR and make a 0.9.1 release that contains this and the other patch you added in vcpkg about the missing headers. That is actually already merged in the develop branch through #144 . Like that, you can avoid patches on vcpkg

I'll fix up our patch to validate that it's actually fixed and update this PR with that once it's so. Then we can take an update to your official copy which will drop the patch.

@BillyONeal BillyONeal marked this pull request as ready for review March 21, 2023 19:13
@BillyONeal
Copy link
Contributor Author

OK dropping 87 passed in our lab.

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.

LGTM

@simogasp simogasp merged commit fd21d35 into alicevision:develop Mar 24, 2023
@simogasp
Copy link
Member

Thanks for your contribution!

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

Successfully merging this pull request may close these issues.

[request] Support CUDA SDK 12.X
2 participants