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

[CMake] Explicitly link with CCCL (standalone or CTK) #10624

Merged
merged 13 commits into from
Jul 24, 2024

Conversation

hcho3
Copy link
Collaborator

@hcho3 hcho3 commented Jul 22, 2024

hcho3 added a commit to hcho3/xgboost-feedstock that referenced this pull request Jul 22, 2024
Copy link
Member

@trivialfis trivialfis left a comment

Choose a reason for hiding this comment

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

Do we want to replace thrust as well?

Copy link
Contributor

@jakirkham jakirkham left a comment

Choose a reason for hiding this comment

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

Thanks Hyunsu! 🙏

Had a couple questions below

CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
cmake/Utils.cmake Outdated Show resolved Hide resolved
@hcho3 hcho3 changed the title Add CMake option to build with external CCCL [CMake] Explicitly link with CCCL (standalone or CTK) Jul 22, 2024
@hcho3
Copy link
Collaborator Author

hcho3 commented Jul 22, 2024

@jakirkham It seems that for CUDA 11.8, CTK doesn't have the CMake config for CCCL:

$ find /usr/local/cuda/lib64/cmake/
/usr/local/cuda/lib64/cmake/
/usr/local/cuda/lib64/cmake/libcudacxx
/usr/local/cuda/lib64/cmake/libcudacxx/libcudacxx-config.cmake
/usr/local/cuda/lib64/cmake/libcudacxx/libcudacxx-header-search.cmake
/usr/local/cuda/lib64/cmake/libcudacxx/libcudacxx-config-version.cmake
/usr/local/cuda/lib64/cmake/thrust
/usr/local/cuda/lib64/cmake/thrust/README.md
/usr/local/cuda/lib64/cmake/thrust/FindTBB.cmake
/usr/local/cuda/lib64/cmake/thrust/thrust-config-version.cmake
/usr/local/cuda/lib64/cmake/thrust/thrust-config.cmake
/usr/local/cuda/lib64/cmake/cub
/usr/local/cuda/lib64/cmake/cub/cub-config-version.cmake
/usr/local/cuda/lib64/cmake/cub/cub-config.cmake

Do we need CTK 12.0+ to access the built-in CCCL? cc @bdice

@jakirkham
Copy link
Contributor

That sounds plausible

Can we just fallback to Thrust & CUB in that case?

Copy link
Contributor

@jakirkham jakirkham left a comment

Choose a reason for hiding this comment

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

Thanks Hyunsu! 🙏

Added a suggestion below

CMakeLists.txt Outdated Show resolved Hide resolved
@bdice
Copy link

bdice commented Jul 23, 2024

Do we need CTK 12.0+ to access the built-in CCCL? cc @bdice

The better way to get CCCL is via GitHub or conda, rather than the CTK: https://github.com/NVIDIA/cccl?tab=readme-ov-file#github

That way you can use a CCCL version that works with all the supported CTK versions, rather than having to make exceptions for every CUDA version in the build scripts. I think you need at least CCCL 2.2.0 to make things work properly with CMake, which shipped with CUDA 12.3.0. If you fetch CCCL from GitHub via CPM (or use a conda package of CCCL) you can get a more recent version that will support both CUDA 11 and 12. Currently RAPIDS is using CCCL 2.5.0.

@hcho3 hcho3 merged commit 411c846 into dmlc:master Jul 24, 2024
26 of 30 checks passed
@hcho3 hcho3 deleted the external_cccl branch July 24, 2024 01:42
hcho3 added a commit to hcho3/xgboost that referenced this pull request Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants