Skip to content

Replace std::min with cute::min in sm120 blockwise scaling device functions#3055

Open
vruga wants to merge 1 commit intoNVIDIA:mainfrom
vruga:fix/device-std-min-call
Open

Replace std::min with cute::min in sm120 blockwise scaling device functions#3055
vruga wants to merge 1 commit intoNVIDIA:mainfrom
vruga:fix/device-std-min-call

Conversation

@vruga
Copy link
Copy Markdown

@vruga vruga commented Feb 23, 2026

Fixes #3051.

Fix

Replaced std::min with cute::min, which is tagged CUTE_HOST_DEVICE constexpr
and is safe to call from device code. It accepts plain arithmetic types (both
arguments here are runtime integers), and is already the standard choice for this
pattern across the rest of the CUTLASS collective headers.

The same bug was also present in the load() function of the sister file
sm120_mma_array_tma_blockwise_scaling.hpp, so that has been fixed here as well.

@github-actions
Copy link
Copy Markdown

This PR has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this PR if it is no longer required. Otherwise, please respond with a comment indicating any updates. This PR will be labeled inactive-90d if there is no activity in the next 60 days.

@johnnynunez
Copy link
Copy Markdown

cc @depaulmillz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] std::min (host only) is called from device function

2 participants