TorchLean API

FloatLib.Floats.Formats.OCP.MX.E2M1

OCP MX E2M1 #

E2M1 is the four-bit floating element used by OCP microscaling formats. This nominal package stores its code in the low four bits of a UInt8; the high-bit invariant is erased at runtime. Balanced and throughput planning select exhaustive proved tables for all six operations, including the 4,096-entry fused-multiply-add table. Latency planning selects arithmetic kernels.

This package implements the scalar element format. OCP block semantics and scale selection are defined under FloatLib.Floats.Formats.OCP.MX.Standard.

Reference #

OCP MX E2M1 four-bit element format with byte-backed storage.

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

      Construct E2M1 from a natural pattern, reduced to four bits.

      Instances For
        @[inline]

        Read the byte whose low four bits contain the E2M1 code.

        Instances For