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

Work with newer thrust and libcudacxx #8432

Conversation

robertmaynard
Copy link
Contributor

No description provided.

When xgboost is brought into a large project it can
be compiled against Thrust 1.17+ which don't offer
this experimental allocator.

To ensure that going forward xgboost works in all enviornments we provide a xgboost namespaced version of
the pinned_allocator that previously was in Thrust.
@trivialfis
Copy link
Member

Thank you for working on this, I saw NVIDIA/cccl#730 , which mentioned a new universal_host_pinned_allocator. Can it be used here?

@robertmaynard
Copy link
Contributor Author

Thank you for working on this, I saw NVIDIA/cccl#730 , which mentioned a new universal_host_pinned_allocator. Can it be used here?

That is an option but it will cause a larger change to xgboost. The big difference between this allocator and universal_host_pinned_allocator is the value type they produce when placed in a container ( std::vector or thrust::host_vector ). When you switch to the universal_host_pinned_allocator the value type becomes thrust::pointer<T> instead of T* so anyplace that use data() needs to be updated to remove the thrust::pointer wrapper.

If you prefer that solution I am happy to update the pr to use universal_host_pinned_allocator

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.

Let's continue with the current approach. Could you please address the linter errors?

@robertmaynard robertmaynard force-pushed the work_with_newer_thrust_and_libcudacxx branch from 078d2d9 to 8907376 Compare November 8, 2022 13:40
@robertmaynard
Copy link
Contributor Author

Let's continue with the current approach. Could you please address the linter errors?

@trivialfis Style issues have been fixed.

@trivialfis
Copy link
Member

I just triggered the GPU CI, could you please address the remaining errors:
Build error: https://buildkite.com/xgboost/xgboost-ci-multi-gpu/builds/409#01845778-3f85-4bae-bdf1-9204c3177c77
Clang tidy: https://buildkite.com/xgboost/xgboost-ci/builds/678

@robertmaynard
Copy link
Contributor Author

The latest rounds of fixes should handle the clang tidy and java failures. For clang tidy I had to suppress most things due to meeting the std::allocator requirements, and the CUDA rules around = default and host/device markup.

@trivialfis
Copy link
Member

Could you please add a NOLINT mark to rebind for clang tidy?

@robertmaynard
Copy link
Contributor Author

Could you please add a NOLINT mark to rebind for clang tidy?

Done

@trivialfis trivialfis merged commit 9372370 into dmlc:release_1.7.0 Nov 10, 2022
@trivialfis
Copy link
Member

I didn't notice the change was done on 1.7, could you please port it to master as well?

@robertmaynard robertmaynard deleted the work_with_newer_thrust_and_libcudacxx branch November 10, 2022 17:30
@robertmaynard
Copy link
Contributor Author

I didn't notice the change was done on 1.7, could you please port it to master as well?

Opened #8454 for that

@hcho3 hcho3 mentioned this pull request Nov 29, 2022
9 tasks
@trivialfis trivialfis added this to To be backported in 1.7.2 Patch Release. Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
1.7.2 Patch Release.
To be backported
Development

Successfully merging this pull request may close these issues.

None yet

2 participants