NVIDIA / NVIDIA/cccl

[CUB] Investigate limiting execution space of `current_tuning_cc` and `current_policy`

Open
#10,503 1 comment 0 reactions 0 assignees View on GitHub
cub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.