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

Enable compiling with system cub. #7232

Merged
merged 5 commits into from
Sep 17, 2021

Conversation

trivialfis
Copy link
Member

@trivialfis trivialfis commented Sep 15, 2021

- This works only with CUDA 11.4, for CUDA 11.2 there are some obscure errors with inclusive scan and custom iterators.

  • Tested with all CUDA 11.x.
  • Workaround cub scan by using discard iterator in AUC.
  • Limit the size of Argsort when compiled with CUDA cub.

@trivialfis
Copy link
Member Author

trivialfis commented Sep 16, 2021

Eventually, we will have to move on to using system cub, with ctk 11.4 and custom cub there are lots of warnings. I think this might be the last version we can workaround it.

});
// shrink down to pair
auto fptp_it_out = thrust::make_transform_output_iterator(
dh::tbegin(d_fptp), [=] __device__(Triple const &t) {
return thrust::make_pair(thrust::get<1>(t), thrust::get<2>(t));
dh::TypedDiscard<Triple>{}, [d_fptp] __device__(Triple const &t) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Originally this reduces the triple to pair, cub in CUDA 11.0~11.2 doesn't handle changed type. So here I just write the result in lambda and use discard iterator to keep the output type unchanged.

* For now we need to limit the number of items to INT32_MAX

This is caused by latest RMM brings cub into its include path, so when XGBoost is compiled
with RMM the paths conflict.
@trivialfis trivialfis merged commit c311a8c into dmlc:master Sep 17, 2021
@trivialfis trivialfis deleted the limit-cub-sort-size branch September 17, 2021 06:28
@wbo4958
Copy link
Contributor

wbo4958 commented Sep 22, 2021

@trivialfis Could you cherry-pick this PR to 1.4.0 branch?

@trivialfis
Copy link
Member Author

No, I'm planning for a new release

NvTimLiu pushed a commit to NvTimLiu/spark-xgboost that referenced this pull request Nov 1, 2021
NvTimLiu added a commit to NvTimLiu/spark-xgboost that referenced this pull request Nov 1, 2021
Enable compiling with system cub. (dmlc#7232)

See merge request nvspark/xgboost!394
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.

3 participants