-
Notifications
You must be signed in to change notification settings - Fork 185
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
Add a new CUDA Next library and a first entry in it with hierarchy_dimensions type template #1485
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some cursory comments, I did not dive into the code itself yet.
Generally I am super excited to get this started, but we should discuss some core guidelines expectations going we have
Fix missing _CCCL_HOST_DEVICE and add missing ones Change index_type to dimensions_index_type License year fixes
Add cmake files for package management, for now hardcode version 0.1 Make CCCL package include CUDA_Next Add C++17 target properties to CUDA_Next
Co-authored-by: Michael Schellenberger Costa <[email protected]>
Some assumptions I'm making as I update the CMake. Let me know if anything here is incorrect (@jrhemstad for vis):
1b and 1c are not consistent for our other projects for legacy reasons, so I want to make sure we stay consistent with this one. |
@alliepiper Regarding 1. I think it's a good name, I started with CUDA_Next, but CudaNext seems better. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice! I found one typo in the README.
Over-arching comment: I think to accurately estimate the usefulness of an experimental feature, it has to be documented well. Do we have an idea how we want to document the CUDA next library? Can we add that as part of this PR or as part of a next PR?
Another question: I'm guessing that we'll want to install these headers under a prefix, e.g. I think |
I agree that |
Co-authored-by: Allard Hendriksen <[email protected]>
@pciolkosz I've noticed that the current tests have a couple of issues:
I can WAR this for now by unsetting the build type for CudaNext, but this should be fixed before we merged, since it usually means there's some UB somewhere. The runtime failure is:
To save some time, CUDA error 98 is "invalid device function". Maybe it's related to the lambda being used? I have verified that |
/ok to test |
/ok to test |
[skip-tests] since this is only changing infra.
/ok to test |
🟩 CI Results [ Failed: 0 | Passed: 365 | Total: 365 ]
|
# | Runner |
---|---|
275 | linux-amd64-cpu16 |
40 | linux-amd64-gpu-v100-latest-1 |
28 | linux-arm64-cpu16 |
22 | windows-amd64-cpu16 |
👃 Inspect Changes
Modifications in project?
Project | |
---|---|
+/- | CCCL Infrastructure |
libcu++ | |
+/- | CUB |
Thrust | |
+/- | CUDA Experimental |
Modifications in project or dependencies?
Project | |
---|---|
+/- | CCCL Infrastructure |
+/- | libcu++ |
+/- | CUB |
+/- | Thrust |
+/- | CUDA Experimental |
pre-commit.ci autofix |
pre-commit.ci autofix |
/ok to test |
🟩 CI Results [ Failed: 0 | Passed: 365 | Total: 365 ]
|
# | Runner |
---|---|
275 | linux-amd64-cpu16 |
40 | linux-amd64-gpu-v100-latest-1 |
28 | linux-arm64-cpu16 |
22 | windows-amd64-cpu16 |
👃 Inspect Changes
Modifications in project?
Project | |
---|---|
+/- | CCCL Infrastructure |
libcu++ | |
CUB | |
Thrust | |
+/- | CUDA Experimental |
Modifications in project or dependencies?
Project | |
---|---|
+/- | CCCL Infrastructure |
+/- | libcu++ |
+/- | CUB |
+/- | Thrust |
+/- | CUDA Experimental |
The infrastructure is complete and CI is ready but disabled -- once the code is ready, just add it back in and uncomment the |
/ok to test |
🟨 CI Results [ Failed: 1 | Passed: 305 | Total: 306 ]
|
# | Runner |
---|---|
232 | linux-amd64-cpu16 |
32 | linux-amd64-gpu-v100-latest-1 |
24 | linux-arm64-cpu16 |
18 | windows-amd64-cpu16 |
👃 Inspect Changes
Modifications in project?
Project | |
---|---|
+/- | CCCL Infrastructure |
libcu++ | |
CUB | |
Thrust | |
+/- | CUDA Experimental |
Modifications in project or dependencies?
Project | |
---|---|
+/- | CCCL Infrastructure |
+/- | libcu++ |
+/- | CUB |
+/- | Thrust |
+/- | CUDA Experimental |
🟩 CI Results [ Failed: 0 | Passed: 306 | Total: 306 ]
|
# | Runner |
---|---|
232 | linux-amd64-cpu16 |
32 | linux-amd64-gpu-v100-latest-1 |
24 | linux-arm64-cpu16 |
18 | windows-amd64-cpu16 |
👃 Inspect Changes
Modifications in project?
Project | |
---|---|
+/- | CCCL Infrastructure |
libcu++ | |
CUB | |
Thrust | |
+/- | CUDA Experimental |
Modifications in project or dependencies?
Project | |
---|---|
+/- | CCCL Infrastructure |
+/- | libcu++ |
+/- | CUB |
+/- | Thrust |
+/- | CUDA Experimental |
This change introduces a new CUDA Next library that aims to be a collection of experimental features. It would allow CUDA users to test and provide feedback on those features before they end up in other libraries in a more stable manner.
This change adds license file and some minimal cmake bits that needs to be extended in future changes.
The first entry in the CUDA Next library added in this pull request is hierarchy_dimensions type template that allows to describe a hierarchy of CUDA threads with a mix of static and dynamic information. It can be used to pass into kernels and then calculate aggregates at compile time (like count threads in each CUDA block to create a statically sized array). It can also be used to make libraries aware of the shape of currently running grid and optimize some thread id calculation with compile time values.
hierarchy_dimensions type template is basically a tuple of level_dimensions entries that describe levels. Each level consist of two things, first one is a type to describe what that level it is, for example block_level, cluster_level, etc. Second one is cuda::std::extents object to describe dimensions of that level with both static and dynamic values, the same way it describes cuda::std::mdspan objects.
This is an initial implementation, there is a number of TODOs, names are not final and the interface can change depending on the feedback received.
This type is is also a building block for other libraries and features that are in the pipeline.
NVBUG 4541889