Skip to content

[Core] Saturate scalar int-to-8-bit conversions - #3628

Open
XFDG wants to merge 1 commit into
NVIDIA:mainfrom
XFDG:fix/scalar-int8-saturation-3489
Open

XFDG wants to merge 1 commit into
NVIDIA:mainfrom
XFDG:fix/scalar-int8-saturation-3489

Conversation

@XFDG

@XFDG XFDG commented Sep 13, 2026

Copy link
Copy Markdown

Summary

  • add saturating scalar int to int8_t and uint8_t NumericConverter specializations
  • make width-1 and remainder conversions consistent with the existing packed cvt.pack.sat paths
  • cover signed and unsigned values on both sides of their representable ranges

Testing

  • B200 (SM100a), CUDA 13.1: current main produced -56 vs 127 for signed N=1/N=2 and 255 vs 0 for unsigned N=1/N=2
  • B200 (SM100a), CUDA 13.1: fixed targeted probe builds and runs with exit code 0; N=1 and N=2 both saturate consistently
  • cutlass_test_unit_core --gtest_filter=NumericConversion.s32_to_8bit_saturates on B200: 1/1 passed

Contribution disclosure

AI assistance was used for repository research, implementation, and running the checks above.

Fixes #3489

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.

int/int8 and int/uint8 conversion saturates for packed widths but wraps for width 1

1 participant