TorchLean API

FloatLib.Floats.Formats.OCP.FP8.E4M3FN

OCP FP8 E4M3FN #

OCP E4M3FN has a nominal format identity and a direct UInt8 runtime carrier. For addition, subtraction, multiplication, division, and square root, balanced and throughput planning select exhaustive byte tables; latency planning selects the arithmetic kernels. Fused multiply-add uses the proved generic single-rounding kernel because an eight-bit ternary table would contain 16,777,216 entries.

The binary-interchange descriptor specifies the format and its kernels. It is not stored in FloatLib.Floats.ExecFloat E4M3FN.

Reference #

OCP E4M3 finite-number FP8 with direct byte storage.

    Instances For
      @[instance_reducible, always_inline]

      Package the five dense byte tables with the proved arithmetic FMA baseline. The tables total roughly 257 KiB; retaining the single-rounding model kernel avoids a separate 16 MiB FMA table.

      @[inline]

      Construct OCP E4M3FN from a natural bit pattern, reduced to eight bits.

      Instances For
        @[inline]

        Read the complete OCP E4M3FN encoding byte.

        Instances For