TorchLean API

FloatLib.Floats.Formats.FiniteOnly.E4M3FNUZ

Finite-only E4M3FNUZ #

E4M3FNUZ is a nominal eight-bit format with finite values, one NaN encoding, and unsigned zero. Its name records the conventions used by the ONNX float8 specification: F excludes infinity, N retains NaN, and UZ identifies the unsigned-zero encoding. These choices belong to this format package; the universal executable interface assumes none of them.

The runtime carrier is one UInt8. Balanced and throughput policies select exhaustive proved byte tables for addition, subtraction, multiplication, division, and square root; latency uses the exact arithmetic baseline. Fused multiply-add uses the proved generic single-rounding kernel.

Reference #

Finite E4M3FNUZ with one NaN code, unsigned zero, and direct byte storage.

    Instances For
      @[instance_reducible, always_inline]

      Package the five byte tables with the proved arithmetic FMA baseline.

      @[inline]

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

      Instances For
        @[inline]

        Read the complete E4M3FNUZ encoding byte.

        Instances For