Avoid use of class static variable in device function#7776
Merged
miscco merged 1 commit intoNVIDIA:mainfrom Feb 27, 2026
Merged
Avoid use of class static variable in device function#7776miscco merged 1 commit intoNVIDIA:mainfrom
miscco merged 1 commit intoNVIDIA:mainfrom
Conversation
davebayer
approved these changes
Feb 24, 2026
This comment has been minimized.
This comment has been minimized.
1f7119e to
5a7984d
Compare
This comment has been minimized.
This comment has been minimized.
Comment on lines
197
to
199
| thresholds = {ActivePolicyT::SmallReducePolicy::ITEMS_PER_TILE, | ||
| ActivePolicyT::MediumReducePolicy::ITEMS_PER_TILE, | ||
| ActivePolicyT::ReducePolicy::BLOCK_THREADS * ActivePolicyT::ReducePolicy::ITEMS_PER_THREAD}; |
Contributor
There was a problem hiding this comment.
Reading through the nvbug, maybe it's enough to just avoid ODR use:
Suggested change
| thresholds = {ActivePolicyT::SmallReducePolicy::ITEMS_PER_TILE, | |
| ActivePolicyT::MediumReducePolicy::ITEMS_PER_TILE, | |
| ActivePolicyT::ReducePolicy::BLOCK_THREADS * ActivePolicyT::ReducePolicy::ITEMS_PER_THREAD}; | |
| thresholds = {+ActivePolicyT::SmallReducePolicy::ITEMS_PER_TILE, | |
| +ActivePolicyT::MediumReducePolicy::ITEMS_PER_TILE, | |
| +ActivePolicyT::ReducePolicy::BLOCK_THREADS * +ActivePolicyT::ReducePolicy::ITEMS_PER_THREAD}; |
5a7984d to
493d5a1
Compare
We should not use a class static member in a device function, because it is not defined there. Luckily those tests do not need to be defined as `__device__` anyway Fixes nvbug5925530
493d5a1 to
df1e5a9
Compare
bernhardmgruber
approved these changes
Feb 26, 2026
This comment has been minimized.
This comment has been minimized.
Contributor
🥳 CI Workflow Results🟩 Finished in 14h 26m: Pass: 100%/213 | Total: 8d 11h | Max: 3h 56m | Hits: 71%/119936See results here. |
Contributor
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin branch/3.3.x
git worktree add -d .worktree/backport-7776-to-branch/3.3.x origin/branch/3.3.x
cd .worktree/backport-7776-to-branch/3.3.x
git switch --create backport-7776-to-branch/3.3.x
git cherry-pick -x b23597bc8d1565c81bf9f901af69b5b8816b463d |
miscco
added a commit
to miscco/cccl
that referenced
this pull request
Feb 27, 2026
We should not use a class static member in a device function, because it is not defined there. Luckily those tests do not need to be defined as `__device__` anyway Fixes nvbug5925530
wmaxey
pushed a commit
that referenced
this pull request
Feb 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We should not use a class static member in a device function, because it is not defined there.
Luckily those tests do not need to be defined as
__device__anywayFixes nvbug5925530