--min-time options is currently treated as a stopping-criterion parameter owned by stdrel.
This creates surprising CLI behavior when users select another stopping criterion such as sample-count, entropy, or a custom criterion. For example:
./build/bin/nvbench.example.cpp20.throughput \
--stopping-criterion sample-count \
--target-samples 3 \
--min-time 1e-5
fails with:
NVBench encountered an error:
/home/opavlyk/repos/nvbench/nvbench/option_parser.cu:1107: Error handling option `--min-time 1e-5`:
/home/opavlyk/repos/nvbench/nvbench/option_parser.cu:1073: Unrecognized stopping criterion \
parameter: `min-time` for `sample-count`.
The same happens with entropy:
./build/bin/nvbench.example.cpp20.throughput \
--stopping-criterion entropy \
--min-time 1e-5
Confusingly, this ordering works:
./build/bin/nvbench.example.cpp20.throughput \
--min-time 1e-5 \
--stopping-criterion entropy
but --min-time does not actually apply to "entropy". It is accepted while the default "stdrel" criterion is active, then --stopping-criterion entropy resets the benchmark criterion parameters.
Conceptually, --min-time does not seem like it should be a "stdrel"-specific stopping-criterion parameter.
It is used by hot/batched measurement logic, where it behaves more like a benchmark or measurement option.
Suggested improvements:
- Keep rejecting invalid options, but improve the error message. For example:
--min-time is only valid for the 'stdrel' stopping criterion in the current CLI model.
Current criterion 'entropy' accepts: --max-angle, --min-r2.
-
Move min-time out of 'stdrel; criterion params and model it as a benchmark/measurement option, or introduce a more explicit hot/batch option such as --batch-min-time.
-
Once min-time is no longer criterion-owned, simplify the example CTest logic and remove or reduce the need for no_min_time_examples.
--min-timeoptions is currently treated as a stopping-criterion parameter owned bystdrel.This creates surprising CLI behavior when users select another stopping criterion such as sample-count, entropy, or a custom criterion. For example:
./build/bin/nvbench.example.cpp20.throughput \ --stopping-criterion sample-count \ --target-samples 3 \ --min-time 1e-5fails with:
The same happens with entropy:
Confusingly, this ordering works:
./build/bin/nvbench.example.cpp20.throughput \ --min-time 1e-5 \ --stopping-criterion entropybut
--min-timedoes not actually apply to "entropy". It is accepted while the default "stdrel" criterion is active, then--stopping-criterion entropyresets the benchmark criterion parameters.Conceptually,
--min-timedoes not seem like it should be a "stdrel"-specific stopping-criterion parameter.It is used by hot/batched measurement logic, where it behaves more like a benchmark or measurement option.
Suggested improvements:
Move
min-timeout of 'stdrel; criterion params and model it as a benchmark/measurement option, or introduce a more explicit hot/batch option such as--batch-min-time.Once min-time is no longer criterion-owned, simplify the example CTest logic and remove or reduce the need for no_min_time_examples.