File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 2
2
from scipy .sparse import random , csr_matrix
3
3
import sparse
4
4
import pytest
5
- from util import TensorCollectionFROSTT
5
+ from util import TensorCollectionFROSTT , PydataTensorShifter
6
6
7
7
# TODO (rohany): Ask hameer about this. pydata/sparse isn't happy when
8
8
# given this ufunc to evaluate.
@@ -89,14 +89,13 @@ def bench():
89
89
90
90
# Run benchmarks against the FROSTT collection.
91
91
FROSTTTensors = TensorCollectionFROSTT ()
92
- @pytest .mark .skip (reason = "way too slow" )
93
92
@pytest .mark .parametrize ("tensor" , FROSTTTensors .getTensors (), ids = FROSTTTensors .getTensorNames ())
94
93
def bench_pydata_frostt_ufunc_sparse (tacoBench , tensor ):
95
94
frTensor = tensor .load ()
96
- # TODO (rohany): Replace this with a call to the random generator.
97
- other = sparse . random (frTensor . shape , density = 0.001 )
95
+ shifter = PydataTensorShifter ()
96
+ other = shifter . shiftLastMode (frTensor ). astype ( 'int64' )
98
97
def bench ():
99
- print ( "Beginning ldexp" )
98
+ # TODO (rohany): Expand this test beyond ldexp.
100
99
c = numpy .ldexp (frTensor , other )
101
100
return c
102
101
tacoBench (bench )
You can’t perform that action at this time.
0 commit comments