Skip to content

PolyArch/cs251a-microbench

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Example Microbenchmarks

A few simple microbenchmarks for you to test.

Note that some of the benchmarks do something useful, but others do not. The beauty of microbenchmarks is that they don't have to be meaningful, just evoke interesting behavior in the microarchitecture.

Benchmarks

  • bfs - Breadth-first search graph traversal. Irregular memory access pattern.
  • lfsr - Linear feedback shift register. Pseudo-random memory access.
  • merge - Merge sort. Recursive divide-and-conquer with unpredictable branches.
  • mm - Matrix multiplication. Compute-intensive with blocked/tiled access.
  • spmv - Sparse matrix-vector multiplication. Indirect memory access (CSR format).

Input Generation

Some benchmarks require generated input arrays:

  • randArr.h - Random integer array (used by merge)
  • spmvArr.h - Sparse matrix data in CSR format (used by spmv)
  • graphArr.h - Random graph in CSR format (used by bfs)

These are generated by Python scripts invoked from the Makefile. Feel free to play with the parameters of these scripts.

Build Instructions

Make all the benchmarks with the following command:

make

To build with different optimization levels:

make OPT=-O1

About

Simple Microbenchmarks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published