An Effective Genetic Algorithm for Mixed Precision - Wanyu Zhang; Yu Shang; Min Tsao; Yiwei Li; Xiaoyu Song (IEEE Access)
The precision of floating-point numbers is a critical task in high-performance computing. Many scientific applications rely on floating-point arithmetic, but excessive precision can lead to unnecessary computational overhead. Reducing precision may introduce unacceptable errors. Addressing this trade-off is essential for optimizing performance while ensuring numerical accuracy. In this paper, we present a genetic algorithm-based approach for tuning the precision of floating-point computations. Our method leverages algorithmic differentiation and first-order Taylor series approximation to assess the impact of precision variations efficiently. We employ stochastic partitioning algorithms with multiple precision combinations that meet the error requirements. Moreover, we present a genetic heuristic algorithm to determine the maximum number of variables that can sustain precision alterations without compromising the desired error threshold. The proposed approach is evaluated across various benchmark programs, analyzing the effects of precision tuning under increasing error thresholds. Our findings reveal that, for a majority of these programs, reducing precision through partitioning leads to significant performance enhancements, with improvements of up to 15%.