Theodor Lindberg, Oscar Gustafsson
6 min
As FP8 formats (such as E5M2 and E4M3) gain traction in machine learning and edge computing, the lack of native hardware support on many microcontrollers presents a bottleneck. This paper investigates whether approximate FP8 arithmetic can be efficiently implemented using standard integer operations, potentially enabling high-performance floating-point computation on hardware lacking dedicated floating-point units (FPUs).
The authors utilize Mitchell’s approximation to map floating-point numbers into the logarithmic domain, where multiplication and division simplify to integer addition and subtraction. To address the precision loss inherent in this approximation, they derive specific carry-in terms—boolean expressions based on the mantissa bits of the operands—to compensate for rounding errors. They evaluate these methods across seven different rounding modes, including IEEE 754-compliant modes and faithful rounding, for both E5M2 and E4M3 formats.
The study shows that for most operations, correctly rounded results can be achieved by adding a conditional carry-in term to the integer operation. For the E5M2 format, most rounding modes are supported directly or via simple carry-in logic. For E4M3, while the logic is more complex, it remains highly efficient for FPGA implementation because the boolean expressions fit within single Look-Up Tables (LUTs). Hardware synthesis results indicate that this integer-based approach offers significant area and speed improvements over traditional floating-point multipliers, especially on FPGA platforms.
This work provides a practical pathway for deploying energy-efficient, low-latency AI models on resource-constrained edge devices. By bypassing the need for complex, power-hungry FPUs and leveraging existing integer-based SIMD instructions or FPGA logic, developers can implement FP8 arithmetic with minimal overhead, facilitating the integration of advanced neural networks into IoT and 6G applications.
In this work, approximate eight-bit floating-point operations performed using simple integer operations is discussed. For two-bit mantissa formats, faithful rounding can always be obtained for the considered operations. For all operations, correctly rounded results can be obtained for different rounding modes, either directly or by adding a conditional carry in. For three-bit mantissa formats, faithful rounding can be sometimes be obtained directly, while for other operations a conditional carry in must be added. Correctly rounded results can be obtained for most operations and rounding modes using slightly more complicated expressions for the carry in. Hardware implementation results for multiplication using both standard cell and FPGA technology are presented illustrating the potential benefit of integer computation. Especially for FPGA, significant resource savings are obtained.
Alex: What standard are they trying to meet?
Sam: It's called IEEE 754 — a widely agreed-upon set of rules for how floating-point math should behave. If your chip follows these rules, other software can trust its results. The goal of this paper is to meet that standard using only integer operations, which would normally be considered too crude for the job.
Alex: And they're doing this specifically with eight-bit numbers?
Sam: Right. The paper focuses on what's called FP8 — eight-bit floating-point numbers. These are a relatively new format, designed specifically for AI workloads where you want to pack as many calculations as possible into as little space as possible. There are two common versions: one trades some precision for a wider range of values, and the other does the opposite, prioritising precision over range. The authors show their approach works for both, though the correction logic has to be tuned slightly for each.
Alex: You mentioned this is particularly useful for a type of chip called an FPGA. What makes FPGAs different?
Sam: An FPGA is a chip that can be reprogrammed after it's manufactured — unlike a standard processor, which is fixed. Engineers use them to prototype designs or to build custom hardware for specific tasks. The building blocks inside an FPGA are small pre-programmed lookup tables — essentially tiny cheat sheets that say, "given this input, produce this output." The authors found that their correction logic fits neatly into these lookup tables, which means the savings in hardware resources are substantial.
Alex: How substantial?
Sam: For certain formats, they were able to cut the number of logic elements required by more than half. That's a meaningful reduction for a device where every unit of power and every square millimetre of chip space matters.
Alex: So this isn't just an academic exercise — it has direct implications for what kinds of devices can run AI?
Sam: That's the practical upshot. If you can do reliable floating-point math using only simple integer hardware, you open the door to running AI inference — the process of using a trained model to make decisions — on devices that were previously too limited. A sensor that monitors equipment on a factory floor, or a small medical device, or a low-power environmental monitor. These are the kinds of systems where this approach could make a real difference.
Alex: Are there limits to this? If it's an approximation, there must be cases where it doesn't quite work.
Sam: There are, and the authors are clear about this. The method achieves correct rounding for the majority of cases, but it cannot perfectly replicate every edge case that the full IEEE 754 standard covers. There are rare numerical situations where the approximation falls short. So this is genuinely a trade-off: you gain significant efficiency, but you give up the absolute guarantee of perfect precision in every conceivable scenario.
Alex: Which is probably acceptable for a lot of AI applications, where a small rounding error in one calculation doesn't derail the overall result.
Sam: Exactly. AI models are generally robust to small numerical imprecision — they're trained to handle a certain amount of noise. For applications like that, this approach offers a practical path to running more capable software on simpler, cheaper, lower-power hardware. That's a meaningful step for the next generation of embedded and edge devices.
Alex: Thanks for walking us through that. It's a good reminder that a lot of the progress in AI isn't just about bigger models — it's about making the underlying math fit into smaller and smaller spaces.
Sam: Well put. Thanks for listening to ResearchPod.