@@ -45,6 +45,11 @@ IndexExpr genMinMaxExpr(Tensor<float>& game, std::vector<IndexVar>& indexVars, i
45
45
}
46
46
47
47
static void bench_minimax (benchmark::State& state) {
48
+ int order = state.range (0 ) + 2 ;
49
+ std::vector<ModeFormatPack> modes (order, Sparse);
50
+ Format f (modes);
51
+ taco::Tensor<int64_t > tensor = castToType<int64_t >(" A" , loadMinMaxTensor (" A" , order, f));
52
+
48
53
// This benchmark needs this hack activated to generate correct code.
49
54
if (util::getFromEnv (" TACO_CONCRETIZE_HACK" , " 0" ) == " 0" ) {
50
55
state.SkipWithError (" must set TACO_CONCRETIZE_HACK=1" );
@@ -66,7 +71,8 @@ static void bench_minimax(benchmark::State& state) {
66
71
IndexVar (" t" ),
67
72
};
68
73
69
- std::vector<int > dims = {20 , 20 , 43 , 43 , 43 , 43 , 43 };
74
+ std::vector<int > dims = {20 , 20 , 43 , 43 , 43 , 43 , 43 , 43 , 43 };
75
+ dims.resize (order);
70
76
// TODO (rohany, owhsu): We need to actually generate the input game state.
71
77
Tensor<float > game (" game" , dims, Sparse);
72
78
for (auto _ : state) {
@@ -76,6 +82,7 @@ static void bench_minimax(benchmark::State& state) {
76
82
result.compile ();
77
83
std::cout << result.getSource () << std::endl;
78
84
state.ResumeTiming ();
85
+ result.compute ();
79
86
}
80
87
}
81
- TACO_BENCH (bench_minimax);
88
+ TACO_BENCH (bench_minimax)->Arg( 1 )->Arg( 3 )->Arg( 5 )->Arg( 7 ) ;
0 commit comments