Skip to content

Commit e8c6788

Browse files
committed
Add in flags to get results in csv format for graphing
1 parent 6298b39 commit e8c6788

File tree

2 files changed

+23
-7
lines changed

2 files changed

+23
-7
lines changed

Makefile

+22-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
BENCHES := ""
22
BENCHFLAGS := #"--benchmark-group-by=func"
33

4+
# Pytest Specific Flags
45
#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
715

816
GRAPHBLAS := "OFF"
917
OPENMP := "OFF"
@@ -13,22 +21,29 @@ export TACO_TENSOR_PATH = data/
1321
# To group benchmark output by benchmark, use BENCHFLAGS=--benchmark-group-by=func.
1422
# To additionally group by a parameterized value, add on ",param:<paramname>" to the
1523
# 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)
1827

1928
taco-bench: taco/build/taco-bench
2029
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+
2232
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)"
2434
endif
2535

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
2737
mkdir -p taco/build/ && cd taco/build/ && cmake -DOPENMP=$(OPENMP) -DGRAPHBLAS=$(GRAPHBLAS) ../ && $(MAKE) taco-bench
2838

2939
taco/benchmark/googletest: check-and-reinit-submodules
3040
if [ ! -d "taco/benchmark/googletest" ] ; then git clone https://github.com/google/googletest taco/benchmark/googletest; fi
3141

42+
.PHONY: csvs
43+
results:
44+
mkdir -p results/taco
45+
mkdir -p results/numpy
46+
3247
.PHONY: check-and-reinit-submodules
3348
check-and-reinit-submodules:
3449
@if git submodule status | egrep -q '^[-]|^[+]' ; then \

numpy/ufuncs.py

+1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ def get_ufunc_str(ufunc):
6666
return "2^"
6767

6868
#@pytest.mark.parametrize("dim", [250, 500, 750, 1000, 2500, 5000, 7500, 8000])
69+
@pytest.mark.skip(reason="Not using this import type anymore")
6970
@pytest.mark.parametrize("dim", [10])
7071
@pytest.mark.parametrize("ufunc", [numpy.logical_xor])
7172
def bench_pydata_import_ufunc_sparse(tacoBench, dim, ufunc):

0 commit comments

Comments
 (0)