nvbench icon indicating copy to clipboard operation
nvbench copied to clipboard

Add command line option to skip batch benchmarks

Open bernhardmgruber opened this issue 5 months ago • 1 comments

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.

bernhardmgruber avatar Sep 29 '25 21:09 bernhardmgruber

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.

oleksandr-pavlyk avatar Oct 02 '25 20:10 oleksandr-pavlyk