nvbench
nvbench copied to clipboard
Add command line option to skip batch benchmarks
I have a benchmark for which cold and batch measurements are meaningful, so those are both enabled in code. However, sometimes just running the cold benchmarks is enough for a comparison. I would like to have an option that I can pass to a benchmark executable to skip batch measurements.
void auto_batch_bench(nvbench::state &state) {
...
auto skip_batch = static_cast<bool>(state.get_int64_or_default("SkipBatch", 0));
if (skip_batch) {
state.exec(nvbench::exec_tag::no_batch, launchable);
} else {
state.exec(nvbench::exec_tag::none, launchable);
}
}
So presumable a tag can be introduced to automate this, which will do this under the hood.