Skip to content

Commit f2c6f7a

Browse files
author
Olivia W Hsu
committed
Final fixes for image and minimax bench
1 parent e5e1a99 commit f2c6f7a

File tree

6 files changed

+9
-11
lines changed

6 files changed

+9
-11
lines changed

numpy/image.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,8 @@ def dense_bench():
235235
print("Dense xor NNZ = ", np.sum(xor_img != 0))
236236
assert(sparse_xor_img.nnz == np.sum(xor_img != 1))
237237

238-
@pytest.mark.skip(reason="for getting the input matrices statistics only")
238+
239+
#@pytest.mark.skip(reason="for getting the input matrices statistics only")
239240
@pytest.mark.parametrize("num", list(range(1, 253)))
240241
@pytest.mark.parametrize("pt1", [0.75])
241242
def bench_edge_detection_statistics(tacoBench, num, pt1):

numpy/minmax.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
mport numpy as np
1+
import numpy as np
22
from scipy.sparse import random, csr_matrix
33
import sparse
44
import pytest

scripts/image_runner.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ set -u
88

99
source /data/scratch/rohany/array-programming-benchmarks/venv/bin/activate
1010

11-
out=image-bench/numpy
11+
out=image-bench/
1212

1313
mkdir -p "$out"
1414
mkdir -p "data/image/tensors"
1515

16-
jsonout="$out/result-numpy.json"
16+
jsonout="$out/image-bench-statistics-all.json"
1717

18-
LANKA=ON NUMPY_JSON="$jsonout" make python-bench BENCHES="numpy/image.py"
18+
LANKA=ON NUMPY_JSON="$jsonout" make python-bench BENCHES="numpy/image.py::bench_edge_detection_statistics"

scripts/image_taco_runner.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ out=image-bench/taco
1010

1111
mkdir -p "$out"
1212

13-
for i in {1..98}
13+
for i in {1..253}
1414
do
1515
csvout="$out/result-taco-img$i.csv"
1616
LANKA=ON IMAGE_NUM="$i" TACO_TENSOR_PATH="data/" TACO_OUT="$csvout" make -j8 taco-bench BENCHES="bench_image"

scripts/minimax_runner.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ out=minmax-bench/numpy
1313
mkdir -p "$out"
1414
mkdir -p "data/minmax"
1515

16-
jsonout="$out/statistics-numpy.json"
16+
jsonout="$out/results-scipy-only.json"
1717

18-
LANKA=ON NUMPY_JSON="$jsonout" make python-bench BENCHES="numpy/minmax.py::bench_pydata_minmax"
18+
LANKA=ON NUMPY_JSON="$jsonout" make python-bench BENCHES="numpy/minmax.py::bench_scipy_minmax"

taco/minimax.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,6 @@ static void bench_minimax(benchmark::State& state) {
9292
// std::cout << result.getSource() << std::endl;
9393
state.ResumeTiming();
9494
result.compute();
95-
state.PauseTiming();
96-
return_value = result();
9795
}
98-
state.counters["return"] = return_value;
9996
}
10097
TACO_BENCH(bench_minimax);

0 commit comments

Comments
 (0)