Skip to content

Merge main into staging#2347

Merged
bdice merged 5 commits intorapidsai:stagingfrom
bdice:staging-merge-main
Apr 4, 2026
Merged

Merge main into staging#2347
bdice merged 5 commits intorapidsai:stagingfrom
bdice:staging-merge-main

Conversation

@bdice
Copy link
Copy Markdown
Collaborator

@bdice bdice commented Apr 3, 2026

Description

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

bdice and others added 4 commits April 1, 2026 20:25
…diagnostics (rapidsai#2343)

CCCL main (3.4.0) introduces two breaking changes that affect RMM:

1. **Deprecated default-alignment overloads**: `allocate_sync`, `deallocate_sync`, `allocate`, and `deallocate` on `resource_ref` types no longer provide a default alignment parameter. Under `-Werror`, the deprecation warning becomes a build failure.

2. **`basic_resource_ref` copy constructor is `__host__`-only**: `thrust_allocator` inherits `__host__ __device__` from `thrust::device_malloc_allocator`, so its implicitly-generated copy constructor calls the `__host__`-only `cccl_async_resource_ref` copy constructor, triggering NVCC error 20011.

### Changes

- **`cpp/include/rmm/detail/cccl_adaptors.hpp`**: Pass `rmm::CUDA_ALLOCATION_ALIGNMENT` explicitly to all forwarded `allocate`/`deallocate`/`allocate_sync`/`deallocate_sync` calls on the underlying `resource_ref`, avoiding the deprecated default-alignment codepath.

- **`cpp/include/rmm/mr/thrust_allocator_adaptor.hpp`**: Provide explicit copy/move constructors with `RMM_EXEC_CHECK_DISABLE` so the `#pragma nv_exec_check_disable` has a function body to attach to (it has no effect on `= default`). This mirrors the pattern used for `device_uvector`'s destructor and move constructor.

- **`cpp/tests/mr/resource_ref_conversion_tests.cpp`**: Pass explicit alignment to `allocate_sync`/`deallocate_sync` on the type-erased `synchronous_resource_ref` to avoid the same deprecation error.

Validated by building with CCCL main (clean 119/119 targets including tests and benchmarks).

Authors:
  - Bradley Dice (https://github.com/bdice)

Approvers:
  - Vyas Ramasubramani (https://github.com/vyasr)

URL: rapidsai#2343
rapidsai#2331 fixed an issue with RMM using a deprecated type in its type annotations for `CudaStreamPool`. Our used the non-deprecated `rmm.pylibrmm.CudaStreamFlags`, which was technically incorrect according to mypy but worked at runtime because the two implementations were identical.

Our CI (specifically our type-checking pre-commit check) didn't catch these because our *tests* don't have type annotations. This PR is a POC showing how this *should* have caught the issue, if we had type annotations on our tests.

Authors:
  - Tom Augspurger (https://github.com/TomAugspurger)

Approvers:
  - Bradley Dice (https://github.com/bdice)

URL: rapidsai#2332
## Description
Fixes build errors like:

```cpp
FAILED: [code=1] benchmarks/CMakeFiles/RANDOM_ALLOCATIONS_BENCH.dir/random_allocations/random_allocations.cpp.o 
sccache $BUILD_PREFIX/bin/x86_64-conda-linux-gnu-c++ -DBENCHMARK_STATIC_DEFINE -DCCCL_DISABLE_PDL -DCUB_DISABLE_NAMESPACE_MAGIC -DCUB_IGNORE_NAMESPACE_MAGIC_ERROR -DRMM_LOG_ACTIVE_LEVEL=RAPIDS_LOGGER_LOG_LEVEL_INFO -DTHRUST_DEVICE_SYSTEM=THRUST_DEVICE_SYSTEM_CUDA -DTHRUST_DISABLE_ABI_NAMESPACE -DTHRUST_HOST_SYSTEM=THRUST_HOST_SYSTEM_CPP -DTHRUST_IGNORE_ABI_NAMESPACE_ERROR -I$SRC_DIR/cpp -I$SRC_DIR/cpp/build/_deps/benchmark-src/include -I$SRC_DIR/cpp/include -I$SRC_DIR/cpp/build/include -I$SRC_DIR/cpp/build/_deps/cccl-src/lib/cmake/thrust/../../../thrust -I$SRC_DIR/cpp/build/_deps/cccl-src/lib/cmake/libcudacxx/../../../libcudacxx/include -I$SRC_DIR/cpp/build/_deps/cccl-src/lib/cmake/cub/../../../cub -I$SRC_DIR/cpp/build/_deps/nvtx3-src/c/include -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem $PREFIX/include   -I$PREFIX/targets/x86_64-linux/include -I$PREFIX/targets/x86_64-linux/include/cccl -I$BUILD_PREFIX/targets/x86_64-linux/include -I$BUILD_PREFIX/targets/x86_64-linux/include/cccl -O3 -DNDEBUG -std=gnu++20 -fPIE -Wall -Werror -Wextra -Wsign-conversion -Wno-unknown-pragmas -MD -MT benchmarks/CMakeFiles/RANDOM_ALLOCATIONS_BENCH.dir/random_allocations/random_allocations.cpp.o -MF benchmarks/CMakeFiles/RANDOM_ALLOCATIONS_BENCH.dir/random_allocations/random_allocations.cpp.o.d -o benchmarks/CMakeFiles/RANDOM_ALLOCATIONS_BENCH.dir/random_allocations/random_allocations.cpp.o -c $SRC_DIR/cpp/benchmarks/random_allocations/random_allocations.cpp
$SRC_DIR/cpp/benchmarks/random_allocations/random_allocations.cpp:200:70: error: 'benchmark::internal::Benchmark' is deprecated: Use ::benchmark::Benchmark instead [-Werror=deprecated-declarations]
  200 | static void num_range(benchmark::internal::Benchmark* bench, int size)
      |                                                                      ^
In file included from $SRC_DIR/cpp/benchmarks/random_allocations/random_allocations.cpp:15:
$SRC_DIR/cpp/build/_deps/benchmark-src/include/benchmark/benchmark.h:1386:28: note: declared here
 1386 |     ::benchmark::Benchmark Benchmark;
      |                            ^~~~~~~~~
$SRC_DIR/cpp/benchmarks/random_allocations/random_allocations.cpp:207:70: error: 'benchmark::internal::Benchmark' is deprecated: Use ::benchmark::Benchmark instead [-Werror=deprecated-declarations]
  207 | static void size_range(benchmark::internal::Benchmark* bench, int num)
      |                                                                      ^
$SRC_DIR/cpp/build/_deps/benchmark-src/include/benchmark/benchmark.h:1386:28: note: declared here
 1386 |     ::benchmark::Benchmark Benchmark;
      |                            ^~~~~~~~~
$SRC_DIR/cpp/benchmarks/random_allocations/random_allocations.cpp:214:65: error: 'benchmark::internal::Benchmark' is deprecated: Use ::benchmark::Benchmark instead [-Werror=deprecated-declarations]
  214 | static void num_size_range(benchmark::internal::Benchmark* bench)
      |                                                                 ^
$SRC_DIR/cpp/build/_deps/benchmark-src/include/benchmark/benchmark.h:1386:28: note: declared here
 1386 |     ::benchmark::Benchmark Benchmark;
      |                            ^~~~~~~~~
$SRC_DIR/cpp/benchmarks/random_allocations/random_allocations.cpp:224:59: error: 'benchmark::internal::Benchmark' is deprecated: Use ::benchmark::Benchmark instead [-Werror=deprecated-declarations]
  224 | void benchmark_range(benchmark::internal::Benchmark* bench)
      |                                                           ^
$SRC_DIR/cpp/build/_deps/benchmark-src/include/benchmark/benchmark.h:1386:28: note: declared here
 1386 |     ::benchmark::Benchmark Benchmark;
      |                            ^~~~~~~~~
cc1plus: all warnings being treated as errors
```

## Checklist
- [x] I am familiar with the [Contributing
Guidelines](https://github.com/rapidsai/rmm/blob/HEAD/CONTRIBUTING.md).
- [x] New or existing tests cover these changes.
- [x] The documentation is up to date with these changes.
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot bot commented Apr 3, 2026

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@bdice bdice marked this pull request as ready for review April 3, 2026 23:19
@bdice bdice requested review from a team as code owners April 3, 2026 23:19
@bdice bdice requested review from rongou and wence- and removed request for a team April 3, 2026 23:19
@bdice bdice added non-breaking Non-breaking change improvement Improvement / enhancement to an existing function labels Apr 3, 2026
@bdice bdice self-assigned this Apr 3, 2026
@bdice bdice force-pushed the staging-merge-main branch from f56cbda to 6ed007b Compare April 4, 2026 04:07
@bdice bdice merged commit f807a3a into rapidsai:staging Apr 4, 2026
84 of 85 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improvement / enhancement to an existing function non-breaking Non-breaking change

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants