A Power-Efficient Hardware Implementation of L-Mul
Listen
Radio episode about this paper
Transcript
Introduction to the show: ident: Computer Science. The day in computer science: software, systems and theory on arXiv.
Tom: I'm Tom.
Jane: And I'm Jane, here with Lu, Meng and our in-house large language model, Lalam.
Tom: We're looking at the paper: "A Power-Efficient Hardware Implementation of L-Mul".
Paper summary: Tom: So, to recap, this paper is about using the linear complexity multiplication algorithm, L-Mul as an approximate method for neural networks to cut down on energy use and complexity. They focus on implementing it specifically with eight-bit floating point formats like FP8 <ref:2412.18948#pg1>.
Jane: The thesis is that they propose a power-efficient FPGAbased hardware implementation of this approximate multiplier for L-Mul, because hardware designs for L-Mul haven't been reported before. They claim this implementation uses dynamic reconfigurable lookup tables and carry chains available in AMD Xilinx UltraScale/UltraScale+ technology.
Lu: They are showing that they can build the core computation using a specific mathematical transformation of the original multiplication operation, which they call L-mul(x, y) = (one plus mx plus my plus two minus l of m) multiplied by two to E x E > <ref:2412.18948#pg2>.
Meng: This transformation turns the multiplication into shift and addition operations, which is good because those operations are often easier to implement efficiently in hardware than the original complex multiplication >.
Tom: And they then show the binary representation of L-Mul, which is given by a formula that involves a plus sign, and terms related to xm minus one through zero, ym minus one through zero and two l(m) divided by two to m times (two to E x plus bias x + bias y) >.
Jane: This binary representation shows how they can achieve this approximation using five different lookup table configurations combined with carry chains in order to implement the L-Mul FP8 approximate multiplier, as illustrated in figure three >.
Lu: The structure of those five LUT configurations is what makes the implementation concrete, and it’s the physical organization of those tables that determines how resources are used on an FPGA >.
Meng: So they designed these specific lookup tables to be very resource-efficient while handling all the different parts of the calculation, which is key for a real deployment where you want minimal footprint >.
Tom: And they detail how they structured the hardware into three main parts: an exponent-adder, a mantissa-adder, and a post processing unit >. The exponent-Adder has an m bit adder and an m plus one bit adder, and the Mantissa Adder includes an e bit adder and e plus one bit adder using LUT B and CARRY8 primitives to implement those additions >.
Jane: The specific use of LUT B for half-adder functions, where O5 corresponds to the sum S >.
Lu: And then there’s the Post-Processing Unit which uses LUT A to determine the sign bit of the product based on bits xseven and yseven > <ref:2412.18948#pg3>. This is a crucial piece for handling those signs correctly in FP8 computations >.
Meng: So they are essentially building a whole pipeline, from adding up all these small parts together into one efficient multiplication unit that handles both the exponent and the mantissa additions simultaneously >.
Tom: They also mentioned applying strict physical placement constraints at the CLB level to keep lookup tables connected directly to carry chains within the same CLB, and placing input FFs in adjacent CLBs to guarantee shortest possible data paths >.
Jane: That’s important for achieving that low latency they were aiming for, because minimizing wire length means you're minimizing delays across the chip >.
Lu: So they are using these physical placement tricks to ensure the hardware matches what's on paper, which is a great way to get those resource savings and performance benefits >.
Meng: It sounds like their methodology focuses heavily on mapping the math onto these existing FPGA primitives in a clever way for maximum efficiency >.
Tom: So they’re not just using off-the-shelf blocks; they are custom-designing the structure around the core computation to be as efficient as possible within those constraints >.
Jane: And that’s what makes this work, connecting the approximation method to the actual physical hardware implementation on FPGA for FP8 computations >.
Conclusion: Tom: So, looking at the full paper "A Power-Efficient Hardware Implementation of L-Mul," it boils down to this power-efficient deployment for L-mul. The authors are Ruiqi Chen and her team.
Jane: They achieved a power efficient hardware deployment by analyzing the CLB structure of AMD FPGAs to achieve fine-grained optimization through primitive based design >.
Lu: They proved that their design achieves the lowest LUT consumption and power usage compared to other eight-bit designs when deployed in FP8 > <ref:2412.18948#pg1>.
Meng: This means for production AI systems, we have a way to build multipliers that are significantly more efficient than what’s currently available on FPGAs for FP8 >.
Tom: And they demonstrated deployment results show their design achieves the lowest LUT consumption and power usage compared to previous FPGA based approximate multipliers >. It validates their approach.
Jane: It really shows how hardware optimization can lead to tangible efficiency gains for AI models, especially when dealing with emerging data formats like FP8 >.
Lu: The future work mentioned is integrating
Department of Electronics and Informatics (ETRO) · Vrije Universiteit Brussel
cs.AR
Submitted: 2024-12-25
Updated: 2024-12-25
Comments: 6 pages, 5 figures
License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
Importance score: 75/100
The gist: A power-efficient FPGAbased hardware implementation for L-Mul provides an approximate multiplication method for FP8 computations to reduce energy consumption and computational complexity in neural…
Key concepts
- Linear-Complexity Multiplication (L-Mul)
- L-Mul is an approximate multiplication method used in neural networks that simplifies the complex standard multiplication operation into simpler shift and addition operations. This approximation reduces the computational complexity required for multiplication, which directly translates to lower energy consumption during network computations.
- 8-bit Floating-Point (FP8)
- FP8 is a modern data format offering a better dynamic range than traditional 8-bit integers (INT8). Because it provides higher precision while still being relatively small, it is increasingly adopted in neural networks for inference, as the proposed hardware specifically targets this format for better performance.
- FPGA Implementation
- The hardware design is built using an FPGA (Field-Programmable Gate Array), specifically leveraging AMD UltraScale/UltraScale+ technology. This allows the multiplication logic to be reconfigured using primitives like lookup tables and carry chains, enabling fine-grained optimization to minimize resource usage and power consumption.
Terminology
Summary
A power-efficient FPGAbased hardware implementation for L-Mul provides an approximate multiplication method for FP8 computations to reduce energy consumption and computational complexity in neural networks. p. 0<ref:2412.18948#pg1, a power-efficient FPGAbased hardware implementation for L-Mul provides an approximate multiplication method for FP8 computations to reduce energy consumption and computational complexity in neural networks>. p. 0
Introduction and Motivation
The paper addresses the high energy consumption of neural network computations by proposing the linear-complexity multiplication (L-Mul) algorithm as an approximate multiplication method for emerging NN models like large language models (LLM).<ref:2412.18948#pg1, The linear-complexity multiplication (L-Mul) algorithm is specifically proposed as an approximate multiplication method for emerging NN models, such as large language model (LLM), to reduce the energy consumption and computational complexity of multiplications>. p. 0 It also highlights 8-bit floating-point (FP8) as a format offering better dynamic range compared to traditional 8-bit integer (INT8), making it increasingly popular in NN computations. p. 0<ref:2412.18948#pg1, Among these, 8-bit floating-point (FP8) numbers, compared to traditional 8-bit integer (INT8), offer better dynamic range and computational precision, making them widely adopted in neural network computations>. p. 0 Previous work on approximate multipliers has been aimed at reducing power consumption and area utilization in ASIC implementations but may perform suboptimally on FPGAs because FPGA reconfigurable logic is typically based on fixed-size lookup tables (LUTs). p. 0<ref:2412.18948#pg1, This is because FPGA reconfigurable logic is typically based on fixed-size lookup tables (LUTs). p. 0 However, the paper points out a lack of specialized approximate multipliers targeting the FP8 format in previous works, motivating their new design for L-Mul hardware implementation on FPGA and its main contributions include implementing L-Mul on FPGA using LUT and carry-chain primitives to minimize resource usage and power consumption, validating the design on AMD UltraScale/UltraScale+ devices, and demonstrating it achieves the highest accuracy, energy efficiency, and lowest latency among 8-bit designs when deployed in a CNN accelerator compared to previous FPGA-based 8-bit approximate multiplier designs with an average reduction of 10% in resource consumption while maintaining comparable performance and achieving the second smallest Power-Delay Product (PDP) among compared implementations under the E4M3 format, as shown in Table VI and Fig. p. 0 5 >
Hardware Architecture for L-Mul
The core computation of FP8 multiplication is represented by Equation 3, which shows that Mul(x, y) = (1 + mx) · 2 Ex × (1 + my) · 2 Ey = (1 + mx + my + mx · my) · 2(Ex+Ey).<ref:2412.18948#pg3, The core computation of FP8 multiplication is represented by Equation 3, which shows that Mul(x, y) = (1 + mx) · 2^Ex × (1 + my) · 2^Ey = (1 + mx + my + mx · my) · 2^(Ex+Ey)>. p. 0 The L-Mul algorithm approximates this process using Equation 4: L-Mul(x, y) = (1 + mx + my + 2−l(m)) × 2(Ex+Ey), where l(m) is a piecewise function approximation of the multiplication operation. p. 2<ref:2412.18948#pg3, Using this piecewise function approximation, the original multiplication operation can be transformed into shift and addition operations>. p. 2 The binary representation of L-Mul is given by Equation 5: L-MulBIN(x, y) = 1 + x[m − 1: 0] + y[m − 1: 0] + 2l(m) / (2 m × (2(Ex+Ey - bias x - bias y)). p. 2<ref:2412.18948#pg3, To achieve this, we design five LUT configurations combined with carry chains to implement the L-Mul FP8 approximate multiplier, as shown in Fig. p. 2 3>
Implementation Details and Optimization
The hardware design primarily consists of three parts: the Exponent-Adder, the Mantissa-Adder, and the Post-Processing unit.<ref:2412.18948#pg3, The Exponent-Adder includes an m-bit adder and an m+1-bit adder, while the MantissaAdder includes an e-bit adder and an e+1-bit adder using LUT B and CARRY8 primitives to implement the addition operations> LUT B primarily functions as a half-adder, where O5 corresponds to the sum (S). p. 2<ref:2412.18948#pg3, The Post-Processing Unit is primarily responsible for handling the sign bit and managing the carry of the mantissa, utilizing LUT A to determine the sign bit of the product based on bits x[7] and y[7]>. p. 2 To enhance performance, strict physical placement constraints were applied at the CLB level to ensure that LUTs are connected directly to carry chains within the same CLB, and input FFs are placed in adjacent CLBs to guarantee the shortest possible data paths. p. 3<ref:2412.18948#pg3>
Performance Evaluation
The error evaluation uses five metrics: Error Probability (EP), Mean Absolute Error (MAE), Mean Relative Error (MRE), Mean Squared Error (MSE), and Normalized Error Distance (NED).<ref:2412.18948#pg4>. The hardware implementation results show that our design consumes an average of fewer than 23 LUTs and achieves the lowest resource consumption compared to previous FPGAbased approximate multipliers. p. 4<ref:2412.18948#pg5, Furthermore, compared to the FP8-compatible RR DyRecMul [21], our design achieves a lower delay and lies on the Pareto frontier in the area and latency analysis, showing outstanding power-efficiency with a second smallest Power-Delay Product (PDP) among compared implementations>
Deployment Validation
The design was deployed and validated on the ZCU104 Evaluation Kit of UltraScale+ FPGA, performing multiple synthesis iterations to implement each design multiple times for accurate measurements.<ref:2412.18948#pg5, Deployment results under the E4M3 format show that L-Mul exhibits the lowest accuracy loss compared to INT8 and FP32 formats across representative CNN and GCN datasets, with CNN 0 showing a loss of -0. p. 504% for FP8 (E4M3) versus -0. p. 596% for L-Mul (E4M3) >. p. 4 The approximate multiplier design achieves a DSP-free implementation, reducing power consumption by 14. p. 559% at the same operating frequency (250 MHz), and in GCN inference, it also achieves a DSP-free implementation and reduces overall power consumption. p. 5<ref:2412.18948#pg6, Thanks to the approximate multiplier design, we achieve a DSP-free implementation and reduce power consumption by 14. p. 559% at the same operating frequency (250 MHz) >
Conclusion
This paper presents a power-efficient hardware deployment for the L-Mul algorithm.<ref:2412.18948#pg6, By analyzing the CLB structure of AMD FPGAs, we achieve fine-grained optimization through primitive-based design, demonstrating that our design achieves the lowest LUT consumption and power usage compared to other 8-bit designs when deployed in FP8 >. p. 5 We demonstrate and analyze the deployment results for FP8, showing that our design achieves the lowest LUT consumption and power usage compared to previous FPGAbased approximate multipliers. p. 5<ref:2412.18948#pg5>. In the future, we plan to integrate this design into LLMs and diffusion model to further demonstrate its advantages. p. 5<ref:2412.18948#pg6, This paper presents a power-efficient hardware deployment for the L-Mul algorithm >
References
[1] M. Dampfhoffer, T. p. 5 Mesquida, A. p. 5 Valentian, and L. p. 5 Anghel, “Backpropagation-based learning techniques for deep spiking neural networks: A survey,” IEEE Transactions on Neural Networks and Learning Systems, vol. p. 5 35, no. 9, pp. 11 906–11 921, 2024. p. 5<ref:2412.18948#pg6>
[2] H. Luo and W. Sun, “Addition is all you need for energy-efficient language models,” arXiv preprint arXiv:2410. p. 500907, 2024. p. 5<ref:2412.18948#pg6, Addition is all you need for energy-efficient language models>
[3] Q. Han, Y. Hu, F. Yu, H. Yang, B. Liu, P. Hu, R. Gong, Y. Wang, R. Wang, Z. Luan, and D. p. 5 Qian, “Extremely low-bit convolution optimization for quantized neural network on modern computer architectures,” in Proceedings of the 49th International Conference on Parallel Processing, ser. p. 5 ICPP ’20. p. 5<ref:2412.18948#pg3>
[4] Z. Yao, R. Yazdani Aminabadi, M. p. 5 Zhang, X. Wu, C. Li, and Y. He, “Zeroquant: Efficient and affordable post-training quantization for largescale transformers,” in Advances in Neural Information Processing Systems, vol. p. 5 35.<ref:2412.18948#pg6, Zeroquant: Efficient and affordable post-training quantization for largescale transformers>
[5] H. Shen, N. Mellempudi, X. p. 5 He, Q. Gao, C. Wang, and M. p. 5 Wang, “Efficient post-training quantization with fp8 formats,” in Proceedings of Machine Learning and Systems, P. p. 5 Gibbons, G. p. 5 Pekhimenko, and C. p. 5 D. Sa.<ref:2412.18948#pg5>
[6] D. R. Lutz, A. Saini, M. Kroes, T. Elmer, and H. p. 5 Valsaraju, “Fused fp8 4-way dot product with scaling and fp32 accumulation,” in 2024 IEEE 31st Symposium on Computer Arithmetic (ARITH). p. 5 IEEE.<ref:2412.18948#pg6, Fused fp8 4-way dot product with scaling and fp32 accumulation>
[7] S. K. Lee, A. Agrawal, J. p. 5 Silberman, M. p. 5 Ziegler, M. p. 5 Kang, S. Venkataramani, N. p. 5 Cao, B. Fleischer, M. p. 5 Guillorn, M. p. 5 Cohen et al. p. 5, “A 7-nm four-core mixed-precision ai chip with 26. p. 52-tflops hybrid-fp8 training, 104. p. 5 p. 59-tops int4 inference, and workload-aware throttling,” IEEE Journal of Solid-State Circuits, vol. p. 5 57, no. 1, pp. 182–197, 2021. p. 5<ref:2412.18948#pg6, A 7-nm four-core mixed-precision ai chip with 26. p. 52-tflops hybrid-fp8 training, 104.9-tops int4 inference, and workload-aware throttling>
[8] S. K. Venkataramanaiah, J. p. 5 Meng, H.-S. Suh, I. Yeo, J.-S. Seo,. “A 28-nm 8-bit floatingpoint tensor core-based programmable cnn training processor with dynamic structured sparsity,” IEEE Journal of Solid-State Circuits, vol. p. 5 58, no. 7, pp. 1885–1897, 2023. p. 5<ref:2412.18948#pg6, A 28-nm 8-bit floatingpoint tensor core-based programmable cnn training processor with dynamic structured sparsity>
[9] A. C. Elster and T. p. 5 A. Haugdahl, “Nvidia hopper gpu and grace cpu highlights,” Computing in Science & Engineering, vol. p. 5 24, no. 2, pp. 95–100, 2022. p. 5<ref:2412.18948#pg6, Nvidia hopper gpu and grace cpu highlights>
[10] AMD Xilinx. Ultrascale architecture configurable logic block user guide. p. 5 Accessed: 2024-11-11. p. 5<ref:2412.18948#pg3>
[11] P. Micikevicius, D. p. 5 Stosic, N. Burgess, M. p. 5 Cornea, P. Dubey, R. Grisenthwaite, S. p. 5 Ha, A. Heinecke, P Judd et al. p. 5, “Fp8 formats for deep learning,” arXiv preprint arXiv:2209. p. 505433.<ref:2412.18948#pg6, Fp8 formats for deep learning>
[12] M. van Baalen, A. p. 5 Kuzmin, S. S. Nair, Y. Ren, E. Mahurin, C Patel et al. p. 5, “Fp8 versus int8 for efficient deep learning inference,” arXiv preprint arXiv:2303. p. 517951.<ref:2412.18948#pg6, Fp8 versus int8 for efficient deep learning inference>
[13] M. S. Ansari, B. F. Cockburn, and J. p. 5 Han,. “An improved logarithmic multiplier for energy-efficient neural computing,” IEEE Transactions on Computers, vol. p. 5 70, no. 4, pp. 614–625, 2020. p. 5<ref:2412.18948#pg1>
[14] S. Zheng, Z. Li, Y. Lu, J. Gao, J. Zhang, and L. p. 5 Wang, “Heam: High-efficiency approximate multiplier optimization for deep neural networks,” in 2022 IEEE International Symposium on Circuits and Systems (ISCAS). p. 5 IEEE.<ref:2412.18948#pg1>
[15] C. Chen, S. Yang, W. Qian, M. Imani, X. Yin, and C. p. 5 Zhuo, “Optimally approximated and unbiased floating-point multiplier with runtime configurability,” in Proceedings of the 39th international conference on computer-aided design (ICCAD), 2020. p. 5<ref:2412.18948#pg1>
[16] S. Ullah, S. S. Murthy, and A. p. 5 Kumar, “Smapproxlib: Library of fpgabased approximate multipliers,” in Proceedings of the 55th Annual Design Automation Conference (DAC). p. 5 New York, NY, ACM, 2018. p. 5<ref:2412.18948#pg1>
[17] S. Ullah, H. Schmidl, S. p. 5 S. Sahoo, S. Rehman, and A. p. 5 Kumar, “Areaoptimized accurate and approximate softcore signed multiplier architectures,” IEEE Transactions on Computers, vol. p. 5 70, no. 3, pp. 384–392, 2020. p. 5<ref:2412.18948#pg6, Areaoptimized accurate and approximate softcore signed multiplier architectures>
[18] S. Ullah, S. Rehman, M. Shafique, and A. p. 5 p. 5 Kumar, “High-performance accurate and approximate multipliers for fpga-based hardware accelerators,” IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, vol. p. 5 41, no. 2, pp. 211–224, 2021. p. 5<ref:2412.18948#pg6, High-performance accurate and approximate multipliers for fpga-based hardware accelerators>
[19] Y. Liu, S. Ullah, and A. p. 0 Kumar, “Bitsys: Bitwise systolic array architecture for multi-precision quantized hardware accelerators,” in 2024 IEEE 32nd Annual International Symposium on Field-Programmable Custom Computing Machines (FCCM). p. 5 IEEE.<ref:2412.18948#pg6, Bitsys: Bitwise systolic array architecture for multi-precision quantized hardware accelerators>
[20] S. Ullah, S. S. Sahoo, and A. p. 5 Kumar, “Axospike: Spiking neural networks-driven approximate operator design,” IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, vol. p. 5 43, no. 11, pp. 3324–3335, 2024. p. 5<ref:2412.18948#pg6, Axospike: Spiking neural networks-driven approximate operator design>
[21] S. Vakili, M. Vaziri, A. Zarei, and J. p. 5 P. Langlois, “Dyrecmul: Fast and low-cost approximate multiplier for fpgas using dynamic reconfiguration,” ACM Transactions on Reconfigurable Technology and Systems, 2024. p. 5<ref:2412.18948#pg6, DyRecMul: Fast and low-cost approximate multiplier for fpgas using dynamic reconfiguration>
[22] V. Leon, T. Paparouni, E. p. 5 Petrongonas, D. p. 5 Soudris, and K. p. 5 Pekmestzi, “Improving power of dsp and cnn hardware accelerators using approximate floating-point multipliers,” ACM Transactions on Embedded Computing Systems (TECS), vol. p. 5 20, no. 5, pp. 1–21, 2021. p. 5<ref:2412.18948#pg6, Improving power of dsp and cnn hardware accelerators using approximate floating-point multipliers>
[23] S. Ullah, S. Rehman, B. S. Prabakaran, F. p. 5 Kriebel, M. p. 5 A. Hanif, M. Shafique, and A. Kumar, “Area-optimized low-latency approximate multipliers for fpga-based hardware accelerators,” in Proceedings of the 55th Annual Design Automation Conference ser DAC ’18. p. 5<ref:2412.18948#pg6, Area-optimized low-latency approximate multipliers for fpga-based hardware accelerators>
[24] N. Van Toan and J. p. 4-G. Lee, “Fpga-based multi-level approximate multipliers for high-performance error-resilient applications,” IEEE Access, vol. p. 5 8, pp. 25 481–25 497, 2020. p. 5<ref:2412.18948#pg6, Fpga-based multi-level approximate multipliers for high-performance error-resilient applications>
[25] Z. Tao, C. Wu, Y. Liang, K. Wang, and L. p. 5 He, “Lw-gcn: A lightweight fpga-based graph convolutional network accelerator,” ACM Transactions on Reconfigurable Technology and Systems, vol. p. 5 16, no. 1, pp. 1–19.<ref:2412.
Green — the paper says it, and the page is printed. Red — no passage carries it, so treat that sentence as unverified. The same check runs on your own text: check a summary against its source, $5.
Improvements for AI systems
-
Efficient hardware deployment for large language models (LLM) can be achieved by deploying L-Mul (FP8, E4M3) on FPGAs, which
achieves fine-grained optimization to minimize resource usage and power consumption.
This allows for inference acceleration in real-time with reduced energy overhead. -
The improved system can perform neural network inference across various datasets like MNIST, CIFAR-10, and ImageNetV2 with minimal accuracy loss compared to FP8 or INT8 methods, as shown by
Table VII shows the average accuracy loss for the corresponding models under different data formats.
-
A CNN accelerator based on L-Mul (FP8) can be designed to be DSP-free, reducing power consumption by 14.59% at the same operating frequency (250 MHz), as noted in
Table VIII.
-
The GCN inference accelerator can also achieve a DSP-free implementation at the same operating frequency while reducing overall power consumption, validating its effectiveness on graph neural networks.
Sources
- Addition is All You Need for Energy-efficient Language Models
- FP8 Formats for Deep Learning
- FP8 versus INT8 for efficient deep learning inference
Related papers
- Is Agentic AI Ready for Real-World Hardware Engineering? A Deep Dive with Phoenix-bench
- HierSVA: A Data Synthesis Pipeline, Dataset, and Benchmark for LLM-Driven Hierarchical Hardware Formal Verification
- Lachesis: Lifetime-Aware KV Cache Placement for Agent Serving across HBM and High-Bandwidth Flash
- Enabling Spatially Fine-Grained DVFS in Neural Processing Units for Energy-Efficient LLM Serving
- Embedded Arena: Iterative Optimization via Hardware Feedback
- WitCert: Sound Runtime Risk Observability and Gating for KV-Cache Quantization