Font Size: a A A

Research On Automatic Generation Method Of Variable Precision Transcendental Functions

Posted on:2021-02-20Degree:MasterType:Thesis
Country:ChinaCandidate:J W HaoFull Text:PDF
GTID:2428330623482213Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
The performance of transcendental functions is important to the applications of highperformance computing due to its frequent presence in the algorithms of this domain.However,the performance and generality of the transcendental functions in standard mathematical libraries usually interfere with each other;the vendor library designers have to sacrifice the performance for the purpose of general applicability.This results in a variety of customized implementations of the transcendental functions in practice to obtain better results for some particular applications,but specializing the transcendental functions for each individual application cannot scale with the increase and diversity of the latter.It is thus of vital importance to design and implement an automatic generator for transcendental functions,and the effectiveness of such idea has already been validated in many realms of computing like linear algebra and digital signal processing.The most widely used,publicly accessible generator so far is metalibm,which can support the automatic generation of a large number of different functions.However,the performance of a function generated by metalibm does not scale with the increase of its computation intervals;the generator may even fail to produce an implementation of a function when the computation intervals stretches to a certain degree.Targeting this issue,this thesis studies the automatic generation of the implementations for transcendental functions and makes the following contributions.We propose the algorithmic sketches for unfixed-accuracy transcendental functions.The implementation of these algorithmic sketches is composed of four components,i.e.,Transformation,Reduction,Approximation and Reconstruction.A transcendental function is first transformed into the composition of four elementary functions,which is referred to as Transformation,followed by the Reduction step that collects all of the function's inputs into the identical computation interval.A polynomial approximation is then used within this computation interval to approach this transcendental function,and this process is called Approximation.The result of the Approximation step is finally substituted to the reconstructed expression,and this finalization step is referred to as Reconstruction.The propose of the algorithmic sketches provides the implementations of transcendental functions with a standard interface,laying the theoretical foundations for the follow-up automatic generation approaches.Using the analytical results of the error distribution within each step of the algorithmic sketches,we propose two techniques to control the precisions of computational errors and algorithmic errors.On the one hand,we reduce the computational errors by increasing the effective digits of float-point numbers and changing the order of floating-point operations;on the other hand,we decrease the algorithmic errors by tuning the parameters,like the width of the approximation interval and the degree of the polynomial,of an algorithmic sketch.The experimental results show that the approaches can effectively control function errors.We finally implement an automatic generator TGen for unfixed-accuracy transcendental functions using the algorithmic sketches and the approaches to controlling the precisions.Given a specific computation interval,TGen can automatically generate independent implementations with different precisions for a transcendental function,and select the most suitable version for the target by means of a code filtering strategy.Our generator can now support the automatic generation of 18 representative transcendental functions.The experimental results show that TGen can generate code with the unfixed accuracy,and the performance of the generated code is superior to that of the code generated by metalibm.More specifically,when compiled with the GCC compiler,the code generated by TGen can provide a mean speedup of 1.84 x over that of a metalibm's version,while the speedup of TGen's code over that of the metalibm is 1.27 x when compiled with the SW5 CC compiler.
Keywords/Search Tags:unfixed accuracy, transcendental function, code generation, floating-point arithmetic, precision control
PDF Full Text Request
Related items