Make `rapids_cpm_cccl()` disable CUB detail namespace
Description
Define CUB_DISABLE_NAMESPACE_MAGIC and CUB_IGNORE_NAMESPACE_MAGIC_ERROR so CUB doesn't include the __CUDA_ARCH_LIST__ in its ABI.
Checklist
- [x] I am familiar with the Contributing Guidelines.
- [ ] New or existing tests cover these changes.
- [ ] The documentation is up to date with these changes.
- [ ] The
cmake-format.jsonis up to date with these changes. - [ ] I have added new files under rapids-cmake/
- [ ] I have added include guards (
include_guard(GLOBAL)) - [ ] I have added the associated docs/ rst file and update the api.rst
- [ ] I have added include guards (
@robertmaynard can you take a look here? I've lost track of what decisions we've made where about keeping or removing this particular ABI mangling. I know it's caused headaches with differences between host and device compilation of the same headers.
We know that for sure that projects the build with -fvisibility=hidden will have no impact since the CUB mangling is a fix for clashes in the global symbol table lookup.
My major concern is that by fully disabling the CUB detail magic logic we also drop the CUB_VERSION from the namespace name. That I think is important as it means that we could clash with DSO built with older ( 1.X ) versions of CUB which didn't have any name mangling. This issue currently exists with the Thrust types but we sorta ignore it for now.
In a perfect world we could tell CCCL to drop the CUDA_ARCH mangling but leave the VERSION mangling. That would give us reproducible builds and also ensure we don't clash at runtime
@trxcllnt Going to close this as no work has occurred in the last two releases