Skip to content

Add F6E3M2FN and F6E2M3FN to xla::PrimitiveType.#3556

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

Add F6E3M2FN and F6E2M3FN to xla::PrimitiveType.#3556
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_916256455

Conversation

@copybara-service
Copy link
Copy Markdown

Add F6E3M2FN and F6E2M3FN to xla::PrimitiveType.

This CL introduces first-class declarations for two 6-bit floating point formats:

  • F6E3M2FN (3 exponent bits, 2 mantissa bits)
  • F6E2M3FN (2 exponent bits, 3 mantissa bits)

These types conform to the OCP Microscaling Formats (MX) specification:
https://www.opencompute.org/documents/ocp-microscaling-formats-mx-v1-0-spec-final-pdf

The encoding parameters are as follows:

FP6 E3M2 (Exponent bias: 3)

  • Max normal: +/-28.0
  • Min normal: +/-0.25
  • Max subnormal: +/-0.1875
  • Min subnormal: +/-0.0625

FP6 E2M3 (Exponent bias: 1)

  • Max normal: +/-7.5
  • Min normal: +/-1.0
  • Max subnormal: +/-0.875
  • Min subnormal: +/-0.125

This CL introduces first-class declarations for two 6-bit floating point formats:
- F6E3M2FN (3 exponent bits, 2 mantissa bits)
- F6E2M3FN (2 exponent bits, 3 mantissa bits)

These types conform to the OCP Microscaling Formats (MX) specification:
https://www.opencompute.org/documents/ocp-microscaling-formats-mx-v1-0-spec-final-pdf

The encoding parameters are as follows:

FP6 E3M2 (Exponent bias: 3)
- Max normal: +/-28.0
- Min normal: +/-0.25
- Max subnormal: +/-0.1875
- Min subnormal: +/-0.0625

FP6 E2M3 (Exponent bias: 1)
- Max normal: +/-7.5
- Min normal: +/-1.0
- Max subnormal: +/-0.875
- Min subnormal: +/-0.125

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

1 participant