Exploring Accuracy and Performance Trade-offs in Functional Array Programs
Modern software increasingly relies on aggressive compiler optimizations to meet performance demands on parallel hardware. However, optimizations like parallel reduction can alter the numerical behavior of floating-point computations due to their sensitivity to operation ordering. Developers often lack tools to evaluate the tradeoffs between speed and accuracy, especially in high-level functional programming frameworks.This thesis addresses this challenge by extending the SHINE compiler with support for highprecision evaluation via the MPFR library. A supporting toolchain was developed to generate drivers, run benchmarks, and visualize the effects of optimizations on both runtime and numerical accuracy. Using this infrastructure, experiments were performed on common numeric kernels, including summation, average, variance, and matrix multiplication.Results show that some optimizations, particularly chunked parallel summation, can improve both performance and accuracy by mimicking pairwise accumulation. In contrast, follow-up operations like scalar division can negate these gains, and not all reductions benefit similarly. Accuracy was also shown to vary based on input distribution and program structure.By exposing these effects, the thesis enables more informed optimization decisions and promotes better practices in performance-tuned, numerically robust software development, especially in functional array programming contexts.
Publication Details
- Journal
- KTH Publication Database DiVA (KTH Royal Institute of Technology)
- Published
- 2025-01-01
- Primary Topic
- Machine Learning in Bioinformatics
- Type
- article
- Field-Weighted Citation Impact
- 0.00