Skip to content

north-numerical-computing/fixed-point-emulation-bitwidth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Estimating the required fixed-point bit width for emulating floating-point matrix multiplication

The MATLAB code in this repository compares different strategies to estimate the required fixed-point bit width to emulate floating-point matrix multiplication. These codes accompany a manuscript that will soon be released.

Cloning the repository

This repository contains a submodule, which will not be cloned automatically with git clone. You can clone the repository with its submodule via SSH with:

git clone -- recursive git@github.com:north-numerical-computing/fixed-point-emulation-bitwidth.git

or via HTTPS with:

git clone -- recursive https://github.com/north-numerical-computing/fixed-point-emulation-bitwidth.git

If you have already cloned the repository, you can clone the submodule with:

git submodule update --init --recursive

Dependencies

Running the code requires a recent version of MATLAB.

The accuracy experiments emulate floating-point matrix multiplication using the gemmi package, which is available as a submodule.

The MEX interface can be compiled using CMake with:

cmake -S deps/gemmi/ -Bdeps/gemmi/build
cmake --build deps/gemmi/build/

The binary file this command produces must be on the MATLAB path for the accuracy experiments to work. The startup.m file, which runs automatically when MATLAB is started in this repository, will set the path correctly for gemmi to be used. By default, accuracy testing is disabled. It can be enabled by setting the variable compute_products to true.

Running the experiments

To run all tests, use the run_tests.m MATLAB script. The figure numbers refer to the accompanying manuscript.

Each script whose name start with test_ runs a separate test. It will produce a series of heatmaps and save the data produced to a .dat file in the dat/ directory.

About

Compare strategies to estimate the required fixed-point bit width to emulate fixed-point matrix multiplication.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages