-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update benchmark config * update Makefiles for benchmarks Co-authored-by: William Moses <[email protected]> * re-enable benchmarkign in CI * some updates to makefiles * test ci fix * more fixes * more fixes * don't enforce new pm for older llvm * don't benchmark debug builds * more fixes * more fixes * test * test * test * update fft * update gmm * update lstm * update ba * drop support for benchmarking 14 and older * don't run all benchmark examples by default * add even llvm 17/18 support * also enable 17/18 in CI and fix ode-real since Rust may use it * bench gmm: use env BENCH_LARGE=1 to run the larger (slow) tests --------- Co-authored-by: William Moses <[email protected]> Co-authored-by: Jed Brown <[email protected]>
- Loading branch information
1 parent
d2d3649
commit 5f841a2
Showing
10 changed files
with
93 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
# RUN: cd %S && LD_LIBRARY_PATH="%bldpath:$LD_LIBRARY_PATH" BENCH="%bench" BENCHLINK="%blink" LOAD="%loadEnzyme" make -B ba-unopt.ll ba-raw.ll results.json -f %s | ||
# RUN: cd %S && LD_LIBRARY_PATH="%bldpath:$LD_LIBRARY_PATH" PTR="%ptr" BENCH="%bench" BENCHLINK="%blink" LOAD="%loadEnzyme" LOADCLANG="%loadClangEnzyme" ENZYME="%enzyme" make -B ba-raw.ll results.json -f %s | ||
|
||
.PHONY: clean | ||
|
||
dir := $(abspath $(lastword $(MAKEFILE_LIST))/../../../..) | ||
|
||
clean: | ||
rm -f *.ll *.o results.txt results.json | ||
|
||
%-unopt.ll: %.cpp | ||
clang++ $(BENCH) $^ -O2 -fno-vectorize -fno-slp-vectorize -ffast-math -fno-unroll-loops -Xclang -new-struct-path-tbaa -o $@ -S -emit-llvm | ||
#clang++ $(BENCH) $^ -O1 -Xclang -disable-llvm-passes -fno-vectorize -fno-slp-vectorize -ffast-math -fno-unroll-loops -Xclang -new-struct-path-tbaa -o $@ -S -emit-llvm | ||
clang++ $(BENCH) $(PTR) $^ -pthread -O2 -fno-vectorize -fno-slp-vectorize -ffast-math -fno-unroll-loops -o $@ -S -emit-llvm | ||
|
||
%-raw.ll: %-unopt.ll | ||
opt $^ $(LOAD) -enzyme -o $@ -S | ||
opt $^ $(LOAD) $(ENZYME) -o $@ -S | ||
|
||
%-opt.ll: %-raw.ll | ||
opt $^ -o $@ -S | ||
#opt $^ -O2 -o $@ -S | ||
|
||
ba.o: ba-opt.ll | ||
clang++ -O2 $^ -o $@ $(BENCHLINK) | ||
clang++ $(BENCH) -pthread -O2 $^ -I /usr/include/c++/11 -I/usr/include/x86_64-linux-gnu/c++/11 -O2 -o $@ $(BENCHLINK) -lpthread -lm -L /usr/lib/gcc/x86_64-linux-gnu/11 | ||
|
||
results.json: ba.o | ||
./$^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
# RUN: cd %S && LD_LIBRARY_PATH="%bldpath:$LD_LIBRARY_PATH" BENCH="%bench" BENCHLINK="%blink" LOAD="%loadEnzyme" make -B fft-unopt.ll fft-raw.ll fft-opt.ll results.txt VERBOSE=1 -f %s | ||
# RUN: cd %S && LD_LIBRARY_PATH="%bldpath:$LD_LIBRARY_PATH" PTR="%ptr" BENCH="%bench" BENCHLINK="%blink" LOAD="%loadEnzyme" LOADCLANG="%loadClangEnzyme" ENZYME="%enzyme" make -B fft-raw.ll results.json -f %s | ||
|
||
.PHONY: clean | ||
|
||
dir := $(abspath $(lastword $(MAKEFILE_LIST))/../../../..) | ||
|
||
clean: | ||
rm -f *.ll *.o results.txt | ||
rm -f *.ll *.o results.txt results.json | ||
|
||
%-unopt.ll: %.cpp | ||
clang++ $(BENCH) $^ -O2 -fno-use-cxa-atexit -fno-vectorize -fno-slp-vectorize -ffast-math -fno-unroll-loops -o $@ -S -emit-llvm | ||
#clang++ $(BENCH) $^ -O1 -Xclang -disable-llvm-passes -fno-use-cxa-atexit -fno-vectorize -fno-slp-vectorize -ffast-math -fno-unroll-loops -o $@ -S -emit-llvm | ||
clang++ $(BENCH) $(PTR) $^ -pthread -O2 -fno-use-cxa-atexit -fno-vectorize -fno-slp-vectorize -ffast-math -fno-unroll-loops -o $@ -S -emit-llvm | ||
|
||
%-raw.ll: %-unopt.ll | ||
opt $^ $(LOAD) -enzyme -o $@ -S | ||
opt $^ $(LOAD) $(ENZYME) -o $@ -S | ||
|
||
%-opt.ll: %-raw.ll | ||
opt $^ -o $@ -S | ||
#opt $^ -O2 -o $@ -S | ||
|
||
fft.o: fft-opt.ll | ||
clang++ -O2 $^ -o $@ $(BENCHLINK) -lm | ||
clang++ $(BENCH) -pthread -O2 $^ -o $@ $(BENCHLINK) -lpthread -lm -L /usr/lib/gcc/x86_64-linux-gnu/11 | ||
#clang++ $(LOAD) $(BENCH) fft.cpp -I /usr/include/c++/11 -I/usr/include/x86_64-linux-gnu/c++/11 -O2 -o fft.o -lpthread $(BENCHLINK) -lm -L /usr/lib/gcc/x86_64-linux-gnu/11 | ||
|
||
results.txt: fft.o | ||
results.json: fft.o | ||
./$^ 1048576 | tee $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
# RUN: if [ %llvmver -ge 12 ] || [ %llvmver -le 9 ]; then cd %S && LD_LIBRARY_PATH="%bldpath:$LD_LIBRARY_PATH" BENCH="%bench" BENCHLINK="%blink" LOAD="%loadEnzyme" make -B gmm-unopt.ll gmm-raw.ll results.json -f %s; fi | ||
# RUN: cd %S && LD_LIBRARY_PATH="%bldpath:$LD_LIBRARY_PATH" PTR="%ptr" BENCH="%bench" BENCHLINK="%blink" LOAD="%loadEnzyme" LOADCLANG="%loadClangEnzyme" ENZYME="%enzyme" make -B gmm-raw.ll results.json -f %s | ||
|
||
.PHONY: clean | ||
|
||
dir := $(abspath $(lastword $(MAKEFILE_LIST))/../../../..) | ||
|
||
clean: | ||
rm -f *.ll *.o results.txt results.json | ||
|
||
%-unopt.ll: %.cpp | ||
clang++ $(BENCH) $^ -O2 -fno-vectorize -fno-slp-vectorize -ffast-math -fno-unroll-loops -o $@ -S -emit-llvm | ||
#clang++ $(BENCH) $^ -O1 -Xclang -disable-llvm-passes -fno-vectorize -fno-slp-vectorize -ffast-math -fno-unroll-loops -o $@ -S -emit-llvm | ||
clang++ $(BENCH) $(PTR) $^ -pthread -O2 -fno-vectorize -fno-slp-vectorize -ffast-math -fno-unroll-loops -o $@ -S -emit-llvm | ||
|
||
%-raw.ll: %-unopt.ll | ||
opt $^ $(LOAD) -enzyme -o $@ -S | ||
opt $^ $(LOAD) $(ENZYME) -o $@ -S | ||
|
||
%-opt.ll: %-raw.ll | ||
opt $^ -o $@ -S | ||
#opt $^ -O2 -o $@ -S | ||
|
||
gmm.o: gmm-opt.ll | ||
clang++ -O2 $^ -o $@ $(BENCHLINK) -lm | ||
clang++ -pthread -O2 $^ -o $@ $(BENCHLINK) -lm | ||
#clang++ $(LOADCLANG) $(BENCH) gmm.cpp -I /usr/include/c++/11 -I/usr/include/x86_64-linux-gnu/c++/11 -O2 -o gmm.o -lpthread $(BENCHLINK) -lm -L /usr/lib/gcc/x86_64-linux-gnu/11 | ||
|
||
results.json: gmm.o | ||
./$^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
# RUN: cd %S && LD_LIBRARY_PATH="%bldpath:$LD_LIBRARY_PATH" BENCH="%bench" BENCHLINK="%blink" LOAD="%loadEnzyme" make -B lstm-raw.ll results.json -f %s | ||
# RUN: cd %S && LD_LIBRARY_PATH="%bldpath:$LD_LIBRARY_PATH" PTR="%ptr" BENCH="%bench" BENCHLINK="%blink" LOAD="%loadEnzyme" LOADCLANG="%loadClangEnzyme" ENZYME="%enzyme" make -B lstm-raw.ll results.json -f %s | ||
|
||
.PHONY: clean | ||
|
||
dir := $(abspath $(lastword $(MAKEFILE_LIST))/../../../..) | ||
|
||
clean: | ||
rm -f *.ll *.o results.txt | ||
rm -f *.ll *.o results.txt results.json | ||
|
||
%-unopt.ll: %.cpp | ||
clang++ $(BENCH) $^ -O2 -fno-vectorize -fno-slp-vectorize -ffast-math -fno-unroll-loops -o $@ -S -emit-llvm | ||
#clang++ $(BENCH) $^ -O1 -Xclang -disable-llvm-passes -fno-vectorize -fno-slp-vectorize -ffast-math -fno-unroll-loops -o $@ -S -emit-llvm | ||
clang++ $(BENCH) $(PTR) $^ -pthread -O2 -fno-vectorize -fno-slp-vectorize -ffast-math -fno-unroll-loops -o $@ -S -emit-llvm | ||
|
||
%-raw.ll: %-unopt.ll | ||
opt $^ $(LOAD) -enzyme -o $@ -S | ||
opt $^ $(LOAD) $(ENZYME) -o $@ -S | ||
|
||
%-opt.ll: %-raw.ll | ||
opt $^ -o $@ -S | ||
#opt $^ -O2 -o $@ -S | ||
|
||
lstm.o: lstm-opt.ll | ||
clang++ -O2 $^ -o $@ $(BENCHLINK) -lm | ||
clang++ -pthread -O2 $^ -o $@ $(BENCHLINK) -lm | ||
|
||
results.json: lstm.o | ||
./$^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters