Skip to content

Commit

Permalink
[Vectorization] Organize the Vectorization folder and add the linpack…
Browse files Browse the repository at this point in the history
…c benchmark framework (#60)

* [Vectorization] Organize the Vectorization folder

* [Vectorization] Add the linpackc benchmark framework

* [Vectorization] Add the linpackc link in readme
  • Loading branch information
Panhaolin2001 authored May 18, 2023
1 parent 7db95bb commit b752ce8
Show file tree
Hide file tree
Showing 52 changed files with 1,286 additions and 529 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@ The result is saved in `bin/res.png`. For more usage, use `audio-plot -h` for de

## Vectorization Benchmark

Some of the benchmarks are ported from gcc-loops([link](https://github.com/llvm/llvm-test-suite/blob/main/SingleSource/UnitTests/Vectorizer/gcc-loops.cpp)) in LLVM test suit
Some of the benchmarks are ported from gcc-loops([link](https://github.com/llvm/llvm-test-suite/blob/main/SingleSource/UnitTests/Vectorizer/gcc-loops.cpp)) in LLVM test suit and linpackc([link](https://github.com/2000nickels/linpackc/blob/master/linpack.c))

*Note: Please replace the `/PATH/TO/*` with your local path.*
*Note: Please replace the `/PATH/TO/*` with your local path and the `XXX` with specific target name (ex: gccloops,linpackc,matrix).*

```
$ cd buddy-benchmark
Expand All @@ -190,7 +190,7 @@ $ cmake -G Ninja .. \
-DCMAKE_BUILD_TYPE=RELEASE \
-DVECTORIZATION_BENCHMARKS=ON \
-DBUDDY_MLIR_BUILD_DIR=/PATH/TO/BUDDY-MLIR/BUILD/
$ ninja vectorization-benchmark
$ ninja vectorization-XXX-benchmark
$ cd bin
$ ./vectorization-benchmark
$ ./vectorization-XXX-benchmark
```
490 changes: 6 additions & 484 deletions benchmarks/Vectorization/CMakeLists.txt

Large diffs are not rendered by default.

42 changes: 1 addition & 41 deletions benchmarks/Vectorization/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,14 @@
//
//===----------------------------------------------------------------------===//
//
// This is the main file of the vectorization benchmark.
// This is the main file of the matrix vectorization benchmark.
//
//===----------------------------------------------------------------------===//

#include <benchmark/benchmark.h>

void generateResultMLIRMatMul();
void generateResultMLIRMatVec();
void generateResultMLIRGccLoopsEx1();
void generateResultMLIRGccLoopsEx2a();
void generateResultMLIRGccLoopsEx2b();
void generateResultMLIRGccLoopsEx3();
void generateResultMLIRGccLoopsEx4a();
void generateResultMLIRGccLoopsEx4b();
void generateResultMLIRGccLoopsEx4c();
void generateResultMLIRGccLoopsEx7();
void generateResultMLIRGccLoopsEx8();
void generateResultMLIRGccLoopsEx9();
void generateResultMLIRGccLoopsEx10a();
void generateResultMLIRGccLoopsEx10b();
void generateResultMLIRGccLoopsEx11();
void generateResultMLIRGccLoopsEx12();
void generateResultMLIRGccLoopsEx13();
void generateResultMLIRGccLoopsEx14();
void generateResultMLIRGccLoopsEx21();
void generateResultMLIRGccLoopsEx23();
void generateResultMLIRGccLoopsEx24();
void generateResultMLIRGccLoopsEx25();

// Run benchmarks.
int main(int argc, char **argv) {
Expand All @@ -52,25 +32,5 @@ int main(int argc, char **argv) {
// Generate result.
generateResultMLIRMatMul();
generateResultMLIRMatVec();
generateResultMLIRGccLoopsEx1();
generateResultMLIRGccLoopsEx2a();
generateResultMLIRGccLoopsEx2b();
generateResultMLIRGccLoopsEx3();
generateResultMLIRGccLoopsEx4a();
generateResultMLIRGccLoopsEx4b();
generateResultMLIRGccLoopsEx4c();
generateResultMLIRGccLoopsEx7();
generateResultMLIRGccLoopsEx8();
generateResultMLIRGccLoopsEx9();
generateResultMLIRGccLoopsEx10a();
generateResultMLIRGccLoopsEx10b();
generateResultMLIRGccLoopsEx11();
generateResultMLIRGccLoopsEx12();
generateResultMLIRGccLoopsEx13();
generateResultMLIRGccLoopsEx14();
generateResultMLIRGccLoopsEx21();
generateResultMLIRGccLoopsEx23();
generateResultMLIRGccLoopsEx24();
generateResultMLIRGccLoopsEx25();
return 0;
}
Loading

0 comments on commit b752ce8

Please sign in to comment.