diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-06-06 12:01:53 +0200 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-06-06 12:01:53 +0200 |
commit | 33cc0aeef68f3adbb51484dbeafccfca5735f8ee (patch) | |
tree | e2085af4c0119e0727fd4cd613f92d75de263316 | |
parent | 61e43b19a3fa145a91f3697349f032de73edc779 (diff) | |
download | compcert-kvx-33cc0aeef68f3adbb51484dbeafccfca5735f8ee.tar.gz compcert-kvx-33cc0aeef68f3adbb51484dbeafccfca5735f8ee.zip |
some more benchmarks
-rw-r--r-- | test/monniaux/benches.sh | 2 | ||||
-rw-r--r-- | test/monniaux/heptagon_radio_transmitter/make.proto | 3 | ||||
-rw-r--r-- | test/monniaux/lustrev4_lustrec_heater_control/make.proto | 3 | ||||
-rw-r--r-- | test/monniaux/lustrev4_lv4_heater_control/make.proto | 3 | ||||
-rw-r--r-- | test/monniaux/lustrev4_lv6-en-2cgc_heater_control/make.proto | 3 | ||||
-rw-r--r-- | test/monniaux/lustrev6-convertible-en-2cgc/make.proto | 3 | ||||
-rw-r--r-- | test/monniaux/xor_and_mat/Makefile | 35 | ||||
-rw-r--r-- | test/monniaux/xor_and_mat/int_mat_run.c | 32 | ||||
-rw-r--r-- | test/monniaux/xor_and_mat/make.proto | 3 |
9 files changed, 60 insertions, 27 deletions
diff --git a/test/monniaux/benches.sh b/test/monniaux/benches.sh index 9bca6b42..59723893 100644 --- a/test/monniaux/benches.sh +++ b/test/monniaux/benches.sh @@ -1 +1 @@ -benches="binary_search bitsliced-aes bitsliced-tea complex float_mat glibc_qsort heapsort idea number_theoretic_transform quicksort sha-2 tacle-bench-lift tacle-bench-powerwindow ternary too_slow" +benches="binary_search bitsliced-aes bitsliced-tea complex float_mat glibc_qsort heapsort idea number_theoretic_transform quicksort sha-2 tacle-bench-lift tacle-bench-powerwindow ternary too_slow heptagon_radio_transmitter lustrev4_lustrec_heater_control lustrev4_lv4_heater_control lustrev4_lv6-en-2cgc_heater_control lustrev6-convertible-en-2cgc xor_and_mat" diff --git a/test/monniaux/heptagon_radio_transmitter/make.proto b/test/monniaux/heptagon_radio_transmitter/make.proto new file mode 100644 index 00000000..40de14dc --- /dev/null +++ b/test/monniaux/heptagon_radio_transmitter/make.proto @@ -0,0 +1,3 @@ +sources: "$(wildcard *.c)" +target: radiotrans +measures: [cycles] diff --git a/test/monniaux/lustrev4_lustrec_heater_control/make.proto b/test/monniaux/lustrev4_lustrec_heater_control/make.proto new file mode 100644 index 00000000..ccb0e684 --- /dev/null +++ b/test/monniaux/lustrev4_lustrec_heater_control/make.proto @@ -0,0 +1,3 @@ +sources: "$(wildcard *.c)" +target: lustrec_heater_control +measures: [cycles] diff --git a/test/monniaux/lustrev4_lv4_heater_control/make.proto b/test/monniaux/lustrev4_lv4_heater_control/make.proto new file mode 100644 index 00000000..f19fec0f --- /dev/null +++ b/test/monniaux/lustrev4_lv4_heater_control/make.proto @@ -0,0 +1,3 @@ +sources: "$(wildcard *.c)" +target: lv4_heater_control +measures: [cycles] diff --git a/test/monniaux/lustrev4_lv6-en-2cgc_heater_control/make.proto b/test/monniaux/lustrev4_lv6-en-2cgc_heater_control/make.proto new file mode 100644 index 00000000..ac398d0e --- /dev/null +++ b/test/monniaux/lustrev4_lv6-en-2cgc_heater_control/make.proto @@ -0,0 +1,3 @@ +sources: "$(wildcard *.c)" +target: lv6-en-2cgc_heater_control +measures: [cycles] diff --git a/test/monniaux/lustrev6-convertible-en-2cgc/make.proto b/test/monniaux/lustrev6-convertible-en-2cgc/make.proto new file mode 100644 index 00000000..f73538f6 --- /dev/null +++ b/test/monniaux/lustrev6-convertible-en-2cgc/make.proto @@ -0,0 +1,3 @@ +sources: "$(wildcard *.c)" +target: lv6-en-2cgc_convertible +measures: [cycles] diff --git a/test/monniaux/xor_and_mat/Makefile b/test/monniaux/xor_and_mat/Makefile index 005382de..be4d8158 100644 --- a/test/monniaux/xor_and_mat/Makefile +++ b/test/monniaux/xor_and_mat/Makefile @@ -1,21 +1,36 @@ + include ../rules.mk -PRODUCTS=int_mat.host int_mat.gcc.k1c.out int_mat.ccomp.k1c.out int_mat.ccomp.k1c.s int_mat.gcc.k1c.s int_mat.gcc.k1c int_mat.ccomp.k1c -all: $(PRODUCTS) +src=int_mat_run.c int_mat.c -int_mat.host: int_mat.c int_mat_run.c xor_and.h - $(CC) $(CFLAGS) int_mat.c int_mat_run.c -o $@ +PRODUCTS?=xor_and_mat.gcc.host xor_and_mat.ccomp.host xor_and_mat.gcc.k1c xor_and_mat.gcc.o1.k1c xor_and_mat.ccomp.k1c +PRODUCTS_OUT=$(addsuffix .out,$(PRODUCTS)) -int_mat.gcc.k1c.s int_mat.ccomp.k1c.s int_mat_run.gcc.k1c.s: xor_and.h +all: $(PRODUCTS) + +.PHONY: +run: measures.csv -int_mat.gcc.k1c: int_mat.gcc.k1c.o int_mat_run.gcc.k1c.o - $(K1C_CC) $(K1C_CFLAGS) $+ -o $@ -int_mat.ccomp.k1c: int_mat.ccomp.k1c.o int_mat_run.gcc.k1c.o +xor_and_mat.gcc.host: $(src:.c=.gcc.host.o) ../clock.gcc.host.o + $(CC) $(CFLAGS) $+ -o $@ +xor_and_mat.ccomp.host: $(src:.c=.ccomp.host.o) ../clock.gcc.host.o + $(CCOMP) $(CCOMPFLAGS) $+ -o $@ +xor_and_mat.gcc.k1c: $(src:.c=.gcc.k1c.o) ../clock.gcc.k1c.o + $(K1C_CC) $(K1C_CFLAGS) $+ -o $@ +xor_and_mat.gcc.o1.k1c: $(src:.c=.gcc.o1.k1c.o) ../clock.gcc.k1c.o + $(K1C_CC) $(K1C_CFLAGS_O1) $+ -o $@ +xor_and_mat.ccomp.k1c: $(src:.c=.ccomp.k1c.o) ../clock.gcc.k1c.o $(K1C_CCOMP) $(K1C_CCOMPFLAGS) $+ -o $@ +measures.csv: $(PRODUCTS_OUT) + echo "benches, gcc host,ccomp host,gcc k1c,gcc o1 k1c,ccomp k1c" > $@ + echo "xor_and_mat c2", $$(grep 'c2_time' xor_and_mat.gcc.host.out | cut -d':' -f2), $$(grep 'c2_time' xor_and_mat.ccomp.host.out | cut -d':' -f2), $$(grep 'c2_time' xor_and_mat.gcc.k1c.out | cut -d':' -f2), $$(grep 'c2_time' xor_and_mat.gcc.o1.k1c.out | cut -d':' -f2), $$(grep 'c2_time' xor_and_mat.ccomp.k1c.out | cut -d':' -f2)>> $@ + echo "xor_and_mat c7", $$(grep 'c7_time' xor_and_mat.gcc.host.out | cut -d':' -f2), $$(grep 'c7_time' xor_and_mat.ccomp.host.out | cut -d':' -f2), $$(grep 'c7_time' xor_and_mat.gcc.k1c.out | cut -d':' -f2), $$(grep 'c7_time' xor_and_mat.gcc.o1.k1c.out | cut -d':' -f2), $$(grep 'c7_time' xor_and_mat.ccomp.k1c.out | cut -d':' -f2)>> $@ + +.SECONDARY: +.PHONY: clean: - $(RM) -f $(PRODUCTS) int_mat.gcc.k1c.o int_mat.ccomp.k1c.o int_mat_run.gcc.k1c.o + rm -f *.o *.s *.k1c *.csv -.PHONY: clean diff --git a/test/monniaux/xor_and_mat/int_mat_run.c b/test/monniaux/xor_and_mat/int_mat_run.c index 53335de4..541b7f6a 100644 --- a/test/monniaux/xor_and_mat/int_mat_run.c +++ b/test/monniaux/xor_and_mat/int_mat_run.c @@ -3,50 +3,50 @@ #include <stdio.h> #include <inttypes.h> #include "xor_and.h" -#include "../cycles.h" +#include "../clock.h" int main() { const unsigned m = 60, n = 31, p = 50; - cycle_count_config(); + clock_prepare(); xor_and *a = malloc(sizeof(xor_and) * m * n); xor_and_mat_random(m, n, a, n); xor_and *b = malloc(sizeof(xor_and) * n * p); xor_and_mat_random(n, p, b, p); xor_and *c1 = malloc(sizeof(xor_and) * m * p); - cycle_t c1_time = get_cycle(); + cycle_t c1_time = get_current_cycle(); xor_and_mat_mul1(m, n, p, c1, p, a, n, b, p); - c1_time = get_cycle()-c1_time; + c1_time = get_current_cycle()-c1_time; xor_and *c2 = malloc(sizeof(xor_and) * m * p); - cycle_t c2_time = get_cycle(); + cycle_t c2_time = get_current_cycle(); xor_and_mat_mul2(m, n, p, c2, p, a, n, b, p); - c2_time = get_cycle()-c2_time; + c2_time = get_current_cycle()-c2_time; xor_and *c3 = malloc(sizeof(xor_and) * m * p); - cycle_t c3_time = get_cycle(); + cycle_t c3_time = get_current_cycle(); xor_and_mat_mul3(m, n, p, c3, p, a, n, b, p); - c3_time = get_cycle()-c3_time; + c3_time = get_current_cycle()-c3_time; xor_and *c4 = malloc(sizeof(xor_and) * m * p); - cycle_t c4_time = get_cycle(); + cycle_t c4_time = get_current_cycle(); xor_and_mat_mul4(m, n, p, c4, p, a, n, b, p); - c4_time = get_cycle()-c4_time; + c4_time = get_current_cycle()-c4_time; xor_and *c5 = malloc(sizeof(xor_and) * m * p); - cycle_t c5_time = get_cycle(); + cycle_t c5_time = get_current_cycle(); xor_and_mat_mul5(m, n, p, c5, p, a, n, b, p); - c5_time = get_cycle()-c5_time; + c5_time = get_current_cycle()-c5_time; xor_and *c6 = malloc(sizeof(xor_and) * m * p); - cycle_t c6_time = get_cycle(); + cycle_t c6_time = get_current_cycle(); xor_and_mat_mul6(m, n, p, c6, p, a, n, b, p); - c6_time = get_cycle()-c6_time; + c6_time = get_current_cycle()-c6_time; xor_and *c7 = malloc(sizeof(xor_and) * m * p); - cycle_t c7_time = get_cycle(); + cycle_t c7_time = get_current_cycle(); xor_and_mat_mul7(m, n, p, c7, p, a, n, b, p); - c7_time = get_cycle()-c7_time; + c7_time = get_current_cycle()-c7_time; printf("c1==c2: %s\n" "c1==c3: %s\n" diff --git a/test/monniaux/xor_and_mat/make.proto b/test/monniaux/xor_and_mat/make.proto new file mode 100644 index 00000000..0c2f3dc1 --- /dev/null +++ b/test/monniaux/xor_and_mat/make.proto @@ -0,0 +1,3 @@ +sources: int_mat_run.c int_mat.c +target: xor_and_mat +measures: [[c2_time, c2], [c7_time, c7]] |