Skip to content

Support configurable power-of-2 scaling ('oas' vs 'ceil') for floating-point microscaling in QWIX - #366

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_980016894
Open

copybara-service[bot] wants to merge 1 commit into
mainfrom
test_980016894

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Sep 11, 2026

Copy link
Copy Markdown

Support configurable power-of-2 scaling ('oas' vs 'ceil') for floating-point microscaling in QWIX

  • Support scale_method in qarray.compute_scale_zero_point and HowToQuantize ('default', 'oas', 'ceil') for microscaled floating-point formats ('mxfp8', 'mxfp4').
  • Enforce exact Ceil power-of-2 scaling unconditionally for microscaled integer formats ('mxint8', 'mxint4'), disallowing OAS for integers where uniform lattice steps cannot shift without loss of precision.
  • Use efficient bit manipulation (mantissa mask add + bitwise and) for 2 ** ceil(log2(scale)) without transcendentals.
  • Add scale_method fields to DotGeneralQtConfig for forward and backward passes.
  • Add unit tests verifying OAS and ceil scale behaviors for floating-point formats, exact Ceil scaling for integer formats, and INT8 emulation using INT4 passes.

@copybara-service
copybara-service Bot force-pushed the test_980016894 branch 2 times, most recently from 6105957 to 64dc0e9 Compare September 14, 2026 20:11
@copybara-service copybara-service Bot changed the title Support configurable power-of-2 scaling ('oas' vs 'ceil') in QWIX Support configurable power-of-2 scaling ('oas' vs 'ceil') for floating-point microscaling in QWIX Sep 14, 2026
…g-point microscaling in QWIX

- Support scale_method in qarray.compute_scale_zero_point and HowToQuantize ('default', 'oas', 'ceil') for microscaled floating-point formats ('mxfp8', 'mxfp4').
- Enforce exact Ceil power-of-2 scaling unconditionally for microscaled integer formats ('mxint8', 'mxint4'), disallowing OAS for integers where uniform lattice steps cannot shift without loss of precision.
- Use efficient bit manipulation (mantissa mask add + bitwise and) for 2 ** ceil(log2(scale)) without transcendentals.
- Add scale_method fields to DotGeneralQtConfig for forward and backward passes.
- Add unit tests verifying OAS and ceil scale behaviors for floating-point formats, exact Ceil scaling for integer formats, and INT8 emulation using INT4 passes.

PiperOrigin-RevId: 980016894
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.

0 participants