TorchLean API

FloatLib.Floats.Formats.Block.SharedScale.Core

Shared-scale block model #

A block code represents lanes rational values with one binary exponent and one integer significand per lane. Quantization is contextual because the shared exponent is supplied by the caller rather than inferred by the universal format.

The organization follows the Open Compute Project microscaling model while remaining independent of a particular element width or scale-selection policy.

Reference #

Runtime storage for a block of integer significands with one shared binary exponent.

  • exponent :

    Shared power-of-two exponent.

  • significands : Vector lanes

    Per-lane integer significands.

Instances For
    Instances For
      @[instance_reducible]

      Type-level identity of an unbounded shared-scale block with lanes entries.

      Instances For
        @[inline]

        Exact rational multiplier selected by a shared binary exponent.

        Instances For
          @[inline]

          Decode every lane using the one scale stored in the block.

          Instances For

            Exact block observation retaining the selected scale and stored significands.

            Forgetting this observation decodes the rational vector; it discards the choice of representation.

            Instances For
              def FloatLib.Floats.Formats.Block.QuantizesAt {lanes : } (exponent : ) (input : Vector lanes) (result : SharedScaleCode lanes) :

              Quantization at a caller-selected scale: retain the exponent and round each scaled lane to the nearest integer, with ties to even.

              Instances For