Skip to content

AntonRydahl/libcperf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Comparing LIBC and OCML Functions

This project compares the LLVM LIBC math implementations from <LLVM_ROOT>/libc/src/math/generic to the HIP math implementations and the __builtin math functions.

Installation and Compilation

The src and include folders contain C++ templates and source files for running the math functions on uniformly distributed ranges of input. To compile the project, one must first install LLVM with LIBC configured to include either generic or __builtin functions in libmgpu.a. The two scripts install_builtin_math.sh and install_libc_math.sh can be used to build and install LLVM with LIBC configured to use generic or __builtin implementations, respectively.
To run the make, environment variables specifying the math function to be tested, return type, and input arguments must be configured. To make and run all __builtin functions on the device, use the shell scripts

source install_builtin_math.sh
./gpu_builtin.sh

To run install multiple versions of LIBC and test all the different versions, type

source driver.sh

Results

To see the results, please navigate to ./figures/error_plots.md or ./figures/timing_histograms.md. The former compares the output of the functions executed on the GPU using vendor and LIBC functions for an equidistantly spaced range of inputs. The latter compares the walltime of running the functions in GPU kernels.

Updating LLVM

patches contains a patch that can be used to update the LLVM main branch to only include __builtin functions in the GPU match archive libmgpu.a.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages