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

Initial CUB/NVRTC support #1081

Merged
merged 6 commits into from
Nov 15, 2023

Conversation

gevtushenko
Copy link
Collaborator

@gevtushenko gevtushenko commented Nov 10, 2023

Description

closes #403

This PR provides initial CUB/NVRTC support and adds a simple smoke test to see if basic warp / block-scope functionality works. Testing approach is temporary. Once the PR is merged, we'll need to hoist nvrtcc to CCCL level and start utilizing it for CUB.

Checklist

  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@gevtushenko gevtushenko requested review from a team as code owners November 10, 2023 07:14
@gevtushenko gevtushenko requested review from wmaxey, elstehle and miscco and removed request for a team November 10, 2023 07:14

#include <cuda.h>
#include <cuda/std/limits>
#include <cuda/__cccl_config> // _LIBCUDACXX_CUDACC_VER
Copy link
Collaborator

Choose a reason for hiding this comment

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

That should not be necessary as we pull in __cccl_config from cuda/__config

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@miscco did you mean cub/config.cuh?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I meant that <cuda/std/limits> already pulls it in but also <cub/config.cuh>

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I prefer having independent headers with explicit inclusion of what's used. Do you anticipate any issues with including cuda/__cccl_config directly?

Comment on lines +72 to +76
#if !defined(_LIBCUDACXX_COMPILER_NVRTC)
# include <iterator>
#else
# include <cuda/std/iterator>
#endif
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am of the impression, that we are quite feature complete now with respect to iterator. what do we need from std?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@wmaxey
Copy link
Member

wmaxey commented Nov 13, 2023

Swap _LIBCUDACXX macros with _CCCL macros.
_LIBCUDACXX_(.*)->_CCCL_$1

@gevtushenko
Copy link
Collaborator Author

This PR is blocked until #1097 is merged

@gevtushenko gevtushenko requested a review from a team as a code owner November 14, 2023 18:29
@gevtushenko gevtushenko merged commit db37b60 into NVIDIA:main Nov 15, 2023
518 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[EPIC]: Make CUB device-side algorithms work with NVRTC/Jitify
4 participants