-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Upgrade stdgpu to latest version #7083
Conversation
Thanks for submitting this pull request! The maintainers of this repository would appreciate if you could update the CHANGELOG.md based on your changes. |
Failing CI runs look unrelated to this PR. Furthermore, the more relevant CUDA runs were skipped since this PR is from my fork. But I got positive replies from Windows users and tested the fix myself on Ubuntu 22.04, so I hope that's fine. |
Big +1 from me for this PR - this is critical. Without it, Open3D doesn't compile on a recent CUDA version on MSVC. @ssheorey would you be able to review this or assign a reviewer to it, so that it can get merged? @stotko I think you may also want to put |
8e39f23
to
0c0bea4
Compare
0c0bea4
to
cb788ee
Compare
Good catch, thanks. Should be included now. |
Thanks @stotko ! Are you also planning to update the docs / CUDA version checks? |
I can update them if you would like to have that in this PR as well. I first wanted some feedback on the fix itself before going too deep. Because, technically, this breaks compatibility with very old CUDA versions < 11.5. |
Upgrading to CUDA 11.5+ sounds good. Please go ahead with the docs / cmake updates and we will gladly merge it. |
Done. While updating the main CUDA version check within CMake, I have also checked for further occurrences and simplified some code that now does not need a version check anymore. Furthermore, I have set the "recommended" CUDA version to 12+ since recent versions of PyTorch and TensorFlow require it (or at least recommend it as well). |
Type
stdgpu
target fails the CMake configure step with CUDA 12.4 due to changes in Thrust version header #6743Motivation and Context
See detailed description below.
Checklist:
python util/check_style.py --apply
to apply Open3D code styleto my code.
updated accordingly.
results (e.g. screenshots or numbers) here.
Description
Compilation with CUDA 12.4 and newer will fail due to breaking changes in thrust 2.3.0 (bundled with CUDA 12.4). In particular, there are 2 independent changes in thrust that broke compatibility with stdgpu:
The previous hand-crafted and limited implementation of
thrust::pair
has been replaced by the more compliantcuda::std::pair
implementation (see https://github.com/NVIDIA/cccl/releases/tag/v2.3.0). This has been fixed upstream in utility: Add custom pair implementation stotko/stdgpu#425 via a custompair
implementation.The implementation of thrust's namespace has been changed to include an ABI identifier which fixes linkage issues between different versions of thrust (see https://github.com/NVIDIA/cccl/releases/tag/v2.3.0 again). Since stdgpu needs to specialize some of thrust's internal classes to enable interoperability, this also broke compatibility. The issue has since also been fixed upstream in Fix thrust namespace for CUDA 12.6 stotko/stdgpu#428. However, the fix requires CUDA 11.5 or newer and has been advertised in General: Bump required thrust version to 1.13.1 stotko/stdgpu#429.
Thus, upgrade stdgpu to the latest version to enable support for CUDA 12.4 and newer. This also includes moving from
thrust::pair
tostdgpu::pair
in the respective hash map backend and should be more future-proof. However, this also means that Open3D would need to bump its CUDA requirements in alignment with stdgpu to at least CUDA 11.5. I would argue that this is acceptable since:I only focused on the fix itself and have not yet updated the documentation or the CUDA version checks in CMake. This needs to be added if the proposed fix is deemed acceptable.
Further discussion and respective user bug reports (mostly on Windows) can be found here:
stdgpu
target fails the CMake configure step with CUDA 12.4 due to changes in Thrust version header #6743