TorchLean API

FloatLib.Floats.Formats.OCP.MX.E2M3

OCP MX E2M3 #

FloatLib.Floats.E2M3 is a six-bit finite floating element from the OCP microscaling specification, with type-level identity E2M3.Family. The runtime carrier is a UInt8 with an erased proof that the code is below 64. 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 E2M3, selecting its descriptor, carrier, and kernels.

    Instances For

      The E2M3 encoding fits in its direct byte carrier.

      Certified E2M3 fused-multiply-add table.

      The table is generated lazily at its first lookup, so importing this package does not compute its 262,144 entries.

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

        OCP MX FP6 E2M3 element: 2 exponent and 3 fraction bits with bias 1, 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 E2M3 from a natural pattern, reduced to six bits.

          Instances For
            @[inline]

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

            Instances For