Multicomponent multiple-precision arithmetic is constructed from existing floating-point operations using error-free transformations (EFTs). Its performance can be improved by employing branch-free algorithms that eliminate conditional branches. Zhang and Aiken proposed branch-free addition and multiplication algorithms for double-word (DW), triple-word (TW), and quad-word (QW) arithmetic. We implemented their TW and QW algorithms, for which substantial performance improvements over conventional algorithms were expected, and demonstrated their effectiveness. In this paper, we propose branch-free fused multiply-add (FMA) algorithms for DW, TW, and QW arithmetic. The proposed algorithms integrate multiplication and addition into a single computational network and require fewer arithmetic operations than separately performing branch-free multiplication and addition. The anchor-relative error bounds, the preconditions of all FastTwoSum operations, and the non-overlapping properties of the outputs are mechanically verified using FPANVerifier, and input-relative error bounds are subsequently derived analytically. Benchmark results on CPUs and GPUs show that the proposed algorithms provide performance improvements in many compute-intensive cases, including division, square root, and basic linear algebra kernels, while maintaining accuracy comparable to that of the existing branch-free algorithms.
翻译:暂无翻译