[CUB] Investigate limiting execution space of `current_tuning_cc` and `current_policy`
- Dominant language
- C++
- Stars
- 2.5k
- Forks
- 486
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 295
Description
The fact that `cub::detail::current_tuning_cc` and `cub::detail::current_policy` are usable from host code is a foot gun as it makes it easy to get into situations with diverging tunings accessed from host and device-code. It would be great if such a latent bug could be found before code-review. We should investigate if these functions could be made `__device__`-only to avoid such issues.
Contributor guide
Research direction
Trace the definitions and call sites of cub::detail::current_tuning_cc and cub::detail::current_policy in CUB, comparing their host and device usage. Check how restricting them to device code would affect existing callers and identify tests that should catch host-side access; done means the approach and compatibility impact are clear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- hpc
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100