I want use the ->MinWarmUpTime(0.5)->MinTime(1) to sub whole pipeline time.
but How to get the avg time of Func in pipeline without any user-defined metric?
for (auto _ : state) {
timer.start();
// cuda kernel pipeline
for (int i = 0; i < pipeline_size; i++) {
Func();
}
timer.stop();
state.SetIterationTime(timer.elapsed_ms() / 1000.0);
}
state.SetIteration(state.Iterations() * pipeline_size); // not support
#define REG_BENCHMARK(DATA, FUNC, T) \
BENCHMARK(FUNC) \
->UseManualTime() \
->Unit(benchmark::kMillisecond) \
->MinWarmUpTime(0.5)->MinTime(1)
Maybe add the state.SetIteration mutable API make it work?
Or
?
I want use the
->MinWarmUpTime(0.5)->MinTime(1)to subwhole pipeline time.but How to get
the avg time of Funcin pipeline without any user-defined metric?Maybe add the
state.SetIterationmutable API make it work?Or
?