1
1
BENCHES := ""
2
2
BENCHFLAGS := # "--benchmark-group-by=func"
3
3
4
+ # Pytest Specific Flags
4
5
# IGNORE := numpy/image.py
5
- IGNORE += taco
6
- IGNORE_FLAGS := $(addprefix --ignore=, $(IGNORE ) )
6
+ IGNORE += taco
7
+ IGNORE_FLAGS := $(addprefix --ignore=,$(IGNORE ) )
8
+
9
+ benches_name := $(patsubst % .py,% ,$(BENCHES ) )
10
+ benches_name := $(subst /,_,$(benches_name ) )
11
+ NUMPY_OUT = results/numpy/$(benches_name ) benches_$(shell date +% Y_% m_% d_% H% M% S) .csv
12
+
13
+ # Taco Specific Flags
14
+ TACO_OUT = results/taco/$(BENCHES ) benches_$(shell date +% Y_% m_% d_% H% M% S) .csv
7
15
8
16
GRAPHBLAS := "OFF"
9
17
OPENMP := "OFF"
@@ -13,22 +21,29 @@ export TACO_TENSOR_PATH = data/
13
21
# To group benchmark output by benchmark, use BENCHFLAGS=--benchmark-group-by=func.
14
22
# To additionally group by a parameterized value, add on ",param:<paramname>" to the
15
23
# command above.
16
- python-bench : numpy/* .py
17
- pytest $(IGNORE_FLAGS ) $(BENCHFLAGS ) $(BENCHES )
24
+ python-bench : results numpy/* .py
25
+ echo $(benches_name )
26
+ pytest $(IGNORE_FLAGS ) --csv $(NUMPY_OUT ) $(BENCHFLAGS ) $(BENCHES )
18
27
19
28
taco-bench : taco/build/taco-bench
20
29
ifeq ($(BENCHES ) ,"")
21
- LD_LIBRARY_PATH=taco/build/lib/:$(LD_LIBRARY_PATH) taco/build/taco-bench $(BENCHFLAGS)
30
+ LD_LIBRARY_PATH=taco/build/lib/:$(LD_LIBRARY_PATH) taco/build/taco-bench $(BENCHFLAGS) --benchmark_out_format="csv" --benchmark_out="$(TACO_OUT)"
31
+
22
32
else
23
- LD_LIBRARY_PATH=taco/build/lib/:$(LD_LIBRARY_PATH) taco/build/taco-bench $(BENCHFLAGS) --benchmark_filter="$(BENCHES)"
33
+ LD_LIBRARY_PATH=taco/build/lib/:$(LD_LIBRARY_PATH) taco/build/taco-bench $(BENCHFLAGS) --benchmark_filter="$(BENCHES)" --benchmark_out_format="csv" --benchmark_out="$(TACO_OUT)"
24
34
endif
25
35
26
- taco/build/taco-bench : check-and-reinit-submodules taco/benchmark/googletest
36
+ taco/build/taco-bench : results check-and-reinit-submodules taco/benchmark/googletest
27
37
mkdir -p taco/build/ && cd taco/build/ && cmake -DOPENMP=$(OPENMP ) -DGRAPHBLAS=$(GRAPHBLAS ) ../ && $(MAKE ) taco-bench
28
38
29
39
taco/benchmark/googletest : check-and-reinit-submodules
30
40
if [ ! -d " taco/benchmark/googletest" ] ; then git clone https://github.com/google/googletest taco/benchmark/googletest; fi
31
41
42
+ .PHONY : csvs
43
+ results :
44
+ mkdir -p results/taco
45
+ mkdir -p results/numpy
46
+
32
47
.PHONY : check-and-reinit-submodules
33
48
check-and-reinit-submodules :
34
49
@if git submodule status | egrep -q ' ^[-]|^[+]' ; then \
0 commit comments