Block Floating Point
   HOME

TheInfoList



OR:

Block floating point (BFP) is a method used to provide an arithmetic approaching
floating point In computing, floating-point arithmetic (FP) is arithmetic on subsets of real numbers formed by a ''significand'' (a signed sequence of a fixed number of digits in some base) multiplied by an integer power of that base. Numbers of this form ...
while using a fixed-point processor. BFP assigns a group of ''
significand The significand (also coefficient, sometimes argument, or more ambiguously mantissa, fraction, or characteristic) is the first (left) part of a number in scientific notation or related concepts in floating-point representation, consisting of its s ...
s'' (the non-exponent part of the floating-point number) to a single exponent, rather than single significand being assigned its own exponent. BFP can be advantageous to limit space use in hardware to perform the same functions as floating-point algorithms, by reusing the exponent; some operations over multiple values between blocks can also be done with a reduced amount of computation. The common exponent is found by data with the largest amplitude in the block. To find the value of the exponent, the number of leading zeros must be found (
count leading zeros In computer software and hardware, find first set (ffs) or find first one is a bit operation that, given an unsigned machine word, designates the index or position of the least significant bit set to one in the word counting from the least signif ...
). For this to be done, the number of left shifts needed for the data must be normalized to the dynamic range of the processor used. Some processors have means to find this out themselves, such as exponent detection and normalization instructions. Block floating-point algorithms were extensively studied by James Hardy Wilkinson. BFP can be recreated in software for smaller performance gains.


Microscaling (MX) Formats

Microscaling (MX) formats are a type of Block Floating Point (BFP) data format specifically designed for AI and machine learning workloads. The MX format, endorsed and standardized by major industry players such as AMD, Arm, Intel, Meta, Microsoft, NVIDIA, and Qualcomm, represents a significant advancement in narrow precision data formats for AI. The MX format uses a single shared scaling factor (exponent) for a block of elements, significantly reducing the memory footprint and computational resources required for AI operations. Each block of k elements shares this common scaling factor, which is stored separately from the individual elements. The initial MX specification introduces several specific formats, including MXFP8, MXFP6, MXFP4, and MXINT8. These formats support various precision levels: * MXFP8: 8-bit floating-point with two variants (E5M2 and E4M3). * MXFP6: 6-bit floating-point with two variants (E3M2 and E2M3). * MXFP4: 4-bit floating-point (E2M1). * MXINT8: 8-bit integer. MX formats have been demonstrated to be effective in a variety of AI tasks, including large language models (LLMs), image classification, speech recognition and recommendation systems. For instance, MXFP6 closely matches FP32 for inference tasks after quantization-aware fine-tuning, and MXFP4 can be used for training generative language models with only a minor accuracy penalty. The MX format has been standardized through the
Open Compute Project The Open Compute Project (OCP) is an organization that facilitates the sharing of data center product designs and industry best practices among companies. Founded in 2011, OCP has significantly influenced the design and operation of large-scale co ...
(OCP) as Microscaling Formats (MX) Specification v1.0. An emulation libraries also has been published to provide details on the data science approach and select results of MX in action.


Hardware support

The following hardware supports BFP operations: * d-Matrix Jayhawk II * Tenstorrent Grayskull e75 and e150 (BFP8, BFP4 and BFP2) * Tenstorrent Wormhole n150 and n300 (BFP8, BFP4 and BFP2) * AMD Strix Point APU (branded as Ryzen AI 300 series) supports Block FP16 in NPU * AMD Versal AI Edge Series Gen 2 supports MX6 and MX9 data types * x86 processors implementing the AVX10.2 extension set support E5M2 and E4M3


See also

*
Binary scaling In computing, fixed-point is a method of representing fraction (mathematics), fractional (non-integer) numbers by storing a fixed number of digits of their fractional part. US dollar, Dollar amounts, for example, are often stored with exactl ...
*
Fast Fourier transform A fast Fourier transform (FFT) is an algorithm that computes the discrete Fourier transform (DFT) of a sequence, or its inverse (IDFT). A Fourier transform converts a signal from its original domain (often time or space) to a representation in ...
(FFT) *
Digital signal processor A digital signal processor (DSP) is a specialized microprocessor chip, with its architecture optimized for the operational needs of digital signal processing. DSPs are fabricated on metal–oxide–semiconductor (MOS) integrated circuit chips. ...
(DSP)


References


Further reading

* {{data types Floating point Computer arithmetic