Faster Math Functions, Soundly

07/12/2021
by   Ian Briggs, et al.
0

Standard library implementations of functions like sin and exp optimize for accuracy, not speed, because they are intended for general-purpose use. But applications tolerate inaccuracy from cancellation, rounding error, and singularities-sometimes even very high error-and many application could tolerate error in function implementations as well. This raises an intriguing possibility: speeding up numerical code by tuning standard function implementations. This paper thus introduces OpTuner, an automatic method for selecting the best implementation of mathematical functions at each use site. OpTuner assembles dozens of implementations for the standard mathematical functions from across the speed-accuracy spectrum. OpTuner then uses error Taylor series and integer linear programming to compute optimal assignments of function implementation to use site and presents the user with a speed-accuracy Pareto curve they can use to speed up their code. In a case study on the POV-Ray ray tracer, OpTuner speeds up a critical computation, leading to a whole program speedup of 9 efforts result in slower code and lower-quality output). On a broader study of 37 standard benchmarks, OpTuner matches 216 implementations to 89 use sites and demonstrates speed-ups of 107 to 438

READ FULL TEXT
research
05/06/2020

Custom-Precision Mathematical Library Explorations for Code Profiling and Optimization

The typical processors used for scientific computing have fixed-width da...
research
11/08/2016

Fractal Art Generation using GPUs

Fractal image generation algorithms exhibit extreme parallelizability. U...
research
09/22/2018

Design Space Exploration of Neural Network Activation Function Circuits

The widespread application of artificial neural networks has prompted re...
research
12/26/2017

Ray RLLib: A Composable and Scalable Reinforcement Learning Library

Reinforcement learning (RL) algorithms involve the deep nesting of disti...
research
06/21/2021

Python computations of general Heun functions from their integral series representations

We present a numerical implementation in Python of the recently develope...
research
02/04/2019

Blaze: Simplified High Performance Cluster Computing

MapReduce and its variants have significantly simplified and accelerated...
research
01/13/2021

Multivariate phase-type theory for the site frequency spectrum

Linear functions of the site frequency spectrum (SFS) play a major role ...

Please sign up or login with your details

Forgot password? Click here to reset