Repository navigation
Make cuda::stream_ref constructible on device - #4243
Merged
Merged
Conversation
There is no reason we should not be able to construct it or extract the pointer out of it on device.
Contributor
Author
|
This avoids a ton of breakage for rapids /home/coder/cuml/cpp/src/hdbscan/detail/../condensed_hierarchy.cu(212): error: more than one instance of overloaded function "thrust::cuda_cub::par_t::on" matches the argument list:
function "thrust::cuda_cub::par_t::on(const cudaStream_t &) const" (declared at line 146 of /home/coder/cuml/cpp/build/conda/cuda-12.8/release/_deps/cccl-src/lib/cmake/thrust/../../../thrust/thrust/system/cuda/detail/par.h)
function "thrust::cuda_cub::par_t::on(const cuda::__4::stream_ref &) const" (declared at line 151 of /home/coder/cuml/cpp/build/conda/cuda-12.8/release/_deps/cccl-src/lib/cmake/thrust/../../../thrust/thrust/system/cuda/detail/par.h)
argument types are: (rmm::cuda_stream_view)
object type is: const thrust::cuda_cub::par_t
thrust::minmax_element(thrust::cuda::par.on(stream), parents_ptr, parents_ptr + n_edges); |
davebayer
reviewed
Mar 24, 2025
miscco
force-pushed
the
fix_stream_ref_par_n
branch
from
March 24, 2025 10:40
693c8fc to
d15f302
Compare
Contributor
ðĐ CI finished in 2h 14m: Pass: 100%/162 | Total: 1d 23h | Avg: 17m 35s | Max: 1h 07m | Hits: 92%/252726
|
| Project | |
|---|---|
| CCCL Infrastructure | |
| +/- | libcu++ |
| +/- | CUB |
| +/- | Thrust |
| CUDA Experimental | |
| stdpar | |
| python | |
| CCCL C Parallel Library | |
| Catch2Helper |
Modifications in project or dependencies?
| Project | |
|---|---|
| CCCL Infrastructure | |
| +/- | libcu++ |
| +/- | CUB |
| +/- | Thrust |
| +/- | CUDA Experimental |
| +/- | stdpar |
| +/- | python |
| +/- | CCCL C Parallel Library |
| +/- | Catch2Helper |
ðâ Runner counts (total jobs: 162)
| # | Runner |
|---|---|
| 113 | linux-amd64-cpu16 |
| 15 | windows-amd64-cpu16 |
| 12 | linux-arm64-cpu16 |
| 8 | linux-amd64-gpu-rtx2080-latest-1 |
| 6 | linux-amd64-gpu-rtxa6000-latest-1 |
| 5 | linux-amd64-gpu-h100-latest-1 |
| 3 | linux-amd64-gpu-rtx4090-latest-1 |
pciolkosz
approved these changes
Mar 24, 2025
miscco
enabled auto-merge (squash)
March 24, 2025 19:43
elstehle
approved these changes
Mar 24, 2025
wmaxey
approved these changes
Mar 24, 2025
caugonnet
pushed a commit
to caugonnet/cccl
that referenced
this pull request
Mar 25, 2025
* Make `cuda::stream_ref` constructible on device There is no reason we should not be able to construct it or extract the pointer out of it on device. * Pass by value * Make nvbench work
caugonnet
added a commit
that referenced
this pull request
Mar 26, 2025
* Enable NVHPC in CUDASTF CI * Use nvtx_range in the POTRI example * no need to include nvtx3 anymore here * Do not use nvtx3 directly * fix compilation * WIP: try to pass the type of the execution place to the parallel_for_scope * pass the exec_place type to parallel_for_scope * remove a device annotation for a host only lambda * is_shape_of_v is not working * experiment to see if we can avoid generating device code in parallel_for with a host place * fixes for a previous conflict merge * disable an invalid test * better typing for ctx.parallel_for with a partition * use ::std and more types for parallel_for * Add transform c parallel implementation (#4048) * Enable setting _CUB_HAS_TRANSFORM_UBLKCP as flag * Stale comment * Update make_kernel_user_binary_operator to accept lhs/rhs types * Add transform c.parallel implementation * Add tests for c.parallel transform * Use launcher factory to query ptx version * Refactor how we get iterator names * Add comment explaining why we need -default-device * Address remaining review feedback * Undo change to make_iterator_kernel_arg * Restore the comment * Restore comment --------- Co-authored-by: Ashwin Srinath <shwina@users.noreply.github.com> * Drop duplicated system header blocks (#4245) Those were accidentally duplicated * Exclude sm101 from RDC testing. (#4247) * Make `cuda::stream_ref` constructible on device (#4243) * Make `cuda::stream_ref` constructible on device There is no reason we should not be able to construct it or extract the pointer out of it on device. * Pass by value * Make nvbench work * Fix logic in test_segmented_reduce (#4198) * Fix logic in test_segmented_reduce, also test over different types of offsets To resolve gh-4197, use `cupy.cumsum` to accumulate over random partition sizes to form correct offsets sequence. Add assertions to verify that `offsets` is a non-decreasing sequence, and that its last element equals the size of the input array. Perform the test for several plausible offset data types. * Changes per PR review comments 1. Use `cupy.random` to draw random sample on GPU, rather than on CPU followed by a transfer 2. Use `cp.empty` to allocate output, rather than `cp.zeros` * Add new `WarpReduce` overloadings (#3884) Co-authored-by: Bernhard Manfred Gruber <bernhardmgruber@gmail.com> * Fix #4250 (#4251) * Refactor fp masks (#4246) * Implement `views::all` (#4244) * Implement `views::all` * [cudax] incorporate P3557 (constexpr completion signatures) into Âĩstdex (#3841) * incorporate P3557 (constexpr completion signatures) into ustdex * remove the need for nvcc-specific workarounds * review feedback * tweaks to ustdex for clangd * fix typo * use concepts portability macros for C++17 support * Add fixed size segmented reduce (#3969) * Adds fixed size segmented reduce * remove unnecessary changes * revert changes * Properly deal with parallel_for overloads with grids, add an is_host() for exec_place * Remove test doing illegal things, and which is not really useful anymore --------- Co-authored-by: Ashwin Srinath <3190405+shwina@users.noreply.github.com> Co-authored-by: Ashwin Srinath <shwina@users.noreply.github.com> Co-authored-by: Michael Schellenberger Costa <miscco@nvidia.com> Co-authored-by: Allison Piper <alliepiper16@gmail.com> Co-authored-by: Oleksandr Pavlyk <21087696+oleksandr-pavlyk@users.noreply.github.com> Co-authored-by: Federico Busato <50413820+fbusato@users.noreply.github.com> Co-authored-by: Bernhard Manfred Gruber <bernhardmgruber@gmail.com> Co-authored-by: David Bayer <48736217+davebayer@users.noreply.github.com> Co-authored-by: Eric Niebler <eniebler@nvidia.com> Co-authored-by: Srinivas Yadav <43375352+srinivasyadav18@users.noreply.github.com>
xwang233
added a commit
to xwang233/pytorch
that referenced
this pull request
Mar 30, 2025
davebayer
pushed a commit
to davebayer/cccl
that referenced
this pull request
Apr 7, 2025
* Make `cuda::stream_ref` constructible on device There is no reason we should not be able to construct it or extract the pointer out of it on device. * Pass by value * Make nvbench work
davebayer
added a commit
to davebayer/cccl
that referenced
this pull request
Apr 7, 2025
* Enable NVHPC in CUDASTF CI * Use nvtx_range in the POTRI example * no need to include nvtx3 anymore here * Do not use nvtx3 directly * fix compilation * WIP: try to pass the type of the execution place to the parallel_for_scope * pass the exec_place type to parallel_for_scope * remove a device annotation for a host only lambda * is_shape_of_v is not working * experiment to see if we can avoid generating device code in parallel_for with a host place * fixes for a previous conflict merge * disable an invalid test * better typing for ctx.parallel_for with a partition * use ::std and more types for parallel_for * Add transform c parallel implementation (NVIDIA#4048) * Enable setting _CUB_HAS_TRANSFORM_UBLKCP as flag * Stale comment * Update make_kernel_user_binary_operator to accept lhs/rhs types * Add transform c.parallel implementation * Add tests for c.parallel transform * Use launcher factory to query ptx version * Refactor how we get iterator names * Add comment explaining why we need -default-device * Address remaining review feedback * Undo change to make_iterator_kernel_arg * Restore the comment * Restore comment --------- Co-authored-by: Ashwin Srinath <shwina@users.noreply.github.com> * Drop duplicated system header blocks (NVIDIA#4245) Those were accidentally duplicated * Exclude sm101 from RDC testing. (NVIDIA#4247) * Make `cuda::stream_ref` constructible on device (NVIDIA#4243) * Make `cuda::stream_ref` constructible on device There is no reason we should not be able to construct it or extract the pointer out of it on device. * Pass by value * Make nvbench work * Fix logic in test_segmented_reduce (NVIDIA#4198) * Fix logic in test_segmented_reduce, also test over different types of offsets To resolve NVIDIAgh-4197, use `cupy.cumsum` to accumulate over random partition sizes to form correct offsets sequence. Add assertions to verify that `offsets` is a non-decreasing sequence, and that its last element equals the size of the input array. Perform the test for several plausible offset data types. * Changes per PR review comments 1. Use `cupy.random` to draw random sample on GPU, rather than on CPU followed by a transfer 2. Use `cp.empty` to allocate output, rather than `cp.zeros` * Add new `WarpReduce` overloadings (NVIDIA#3884) Co-authored-by: Bernhard Manfred Gruber <bernhardmgruber@gmail.com> * Fix NVIDIA#4250 (NVIDIA#4251) * Refactor fp masks (NVIDIA#4246) * Implement `views::all` (NVIDIA#4244) * Implement `views::all` * [cudax] incorporate P3557 (constexpr completion signatures) into Âĩstdex (NVIDIA#3841) * incorporate P3557 (constexpr completion signatures) into ustdex * remove the need for nvcc-specific workarounds * review feedback * tweaks to ustdex for clangd * fix typo * use concepts portability macros for C++17 support * Add fixed size segmented reduce (NVIDIA#3969) * Adds fixed size segmented reduce * remove unnecessary changes * revert changes * Properly deal with parallel_for overloads with grids, add an is_host() for exec_place * Remove test doing illegal things, and which is not really useful anymore --------- Co-authored-by: Ashwin Srinath <3190405+shwina@users.noreply.github.com> Co-authored-by: Ashwin Srinath <shwina@users.noreply.github.com> Co-authored-by: Michael Schellenberger Costa <miscco@nvidia.com> Co-authored-by: Allison Piper <alliepiper16@gmail.com> Co-authored-by: Oleksandr Pavlyk <21087696+oleksandr-pavlyk@users.noreply.github.com> Co-authored-by: Federico Busato <50413820+fbusato@users.noreply.github.com> Co-authored-by: Bernhard Manfred Gruber <bernhardmgruber@gmail.com> Co-authored-by: David Bayer <48736217+davebayer@users.noreply.github.com> Co-authored-by: Eric Niebler <eniebler@nvidia.com> Co-authored-by: Srinivas Yadav <43375352+srinivasyadav18@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There is no reason we should not be able to construct it or extract the pointer out of it on device.
Use that to drop the
cudaStream_tconstructors for thrust execution policies