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

@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.

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

1 participant