TorchLean API

FloatLib.Floats.Formats.Block.SharedScale.Runtime

Executable shared-scale quantization #

The kernel rounds each exact rational lane to a nearest-even integer significand at the caller-selected binary exponent.

@[inline]
def FloatLib.Floats.Formats.Block.quantizeAt {lanes : ℕ} (exponent : ℤ) (input : Vector ℚ lanes) :

Quantize every rational lane at an explicitly supplied shared exponent.

Instances For