TorchLean API

FloatLib.Floats.Formats.OCP.MX.E3M2

OCP MX E3M2 #

FloatLib.Floats.E3M2 is a six-bit finite floating element from the OCP microscaling specification, with type-level identity E3M2.Family. Its direct runtime carrier is a byte with an erased < 64 invariant. For addition, subtraction, multiplication, division, and square root, balanced and throughput planning select exhaustive proved tables, and latency planning selects arithmetic kernels. Fused multiply-add keeps both a table and the generic proved kernel. Throughput planning selects the table, while balanced and latency-oriented planning avoid its larger lookup footprint.

Reference #

Type-level identity of E3M2, selecting its descriptor, carrier, and kernels.

    Instances For

      The E3M2 encoding fits in its direct byte carrier.

      @[instance_reducible, always_inline]
      @[reducible, inline]

      OCP MX FP6 E3M2 element: 3 exponent and 2 fraction bits with bias 3, every code finite, stored in the low six bits of a byte. Throughput planning answers all six operations from certified byte tables.

      Instances For
        @[inline]

        Construct E3M2 from a natural pattern, reduced to six bits.

        Instances For
          @[inline]

          Read the byte whose low six bits contain the E3M2 code.

          Instances For