Skip to content

Conversation

@bdice
Copy link
Contributor

@bdice bdice commented Dec 18, 2025

Inside a class template like cccl_resource_ref<ResourceType>, the bare name cccl_resource_ref refers to the injected class name (the current instantiation), not the class template. The is_specialization_of_v trait requires a class template as its second argument, causing a type/value mismatch error.

Use fully qualified names (::rmm::detail::cccl_resource_ref and ::rmm::detail::cccl_async_resource_ref) to bypass the injected class name and correctly refer to the class template.

Also replaced std::optional with cuda::std::optional to fix a failure where rmm::mr::thrust_allocator derives from thrust::device_malloc_allocator which has __device__ constructors.

This fixes bugs observed in https://github.com/rapidsai/rmm/actions/runs/20351412120/job/58476756910?pr=2106.

Inside a class template like cccl_resource_ref<ResourceType>, the bare
name cccl_resource_ref refers to the injected class name (the current
instantiation), not the class template. The is_specialization_of_v trait
requires a class template as its second argument, causing a type/value
mismatch error.

Use fully qualified names (::rmm::detail::cccl_resource_ref and
::rmm::detail::cccl_async_resource_ref) to bypass the injected class
name and correctly refer to the class template.
@bdice bdice requested a review from a team as a code owner December 18, 2025 22:13
@bdice bdice requested review from PointKernel and ttnghia December 18, 2025 22:13
@bdice bdice self-assigned this Dec 18, 2025
@bdice bdice added the bug Something isn't working label Dec 18, 2025
@bdice bdice moved this to In Progress in RMM Project Board Dec 18, 2025
Replace std::optional with cuda::std::optional from libcu++ in
cccl_resource_ref and cccl_async_resource_ref. The standard library
std::optional lacks CUDA annotations and cannot be used in __device__
or __host__ __device__ contexts, causing warnings when thrust_allocator
(which has __host__ __device__ constructors) copies its resource ref
member.
@bdice bdice changed the title Fix injected class name bug in cccl_resource_ref constraints Fix injected class name bug in cccl_resource_ref constraints, use cuda::std::optional Dec 18, 2025
@vyasr vyasr added the non-breaking Non-breaking change label Dec 18, 2025
@bdice
Copy link
Contributor Author

bdice commented Dec 18, 2025

/merge

@bdice
Copy link
Contributor Author

bdice commented Dec 18, 2025

CI passed for the testing with CCCL 3.2 via #2106. Merging.

@bdice
Copy link
Contributor Author

bdice commented Dec 18, 2025

/merge

@rapids-bot rapids-bot bot merged commit 889050d into rapidsai:main Dec 18, 2025
80 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in RMM Project Board Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working non-breaking Non-breaking change

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants