Harden nvbench-compare plotting and filter docs

Skip UNKNOWN rows when collecting summary plot entries so non-numeric
fractional differences cannot reach the plotting path. Add a regression test
that exercises compare_benches(..., plot=True) with an UNKNOWN row.

Document the supported pow2 axis-filter syntax and update the CLI help example
to use NAME[pow2]=EXP, matching the parser behavior for axes displayed as 2^N.

* Document when status ???? (UNKNOWN) is emitted
* Clarify --no-color behavior

* nvbench_compare.md: clarify --no-color behavior, fix example

* Document display options in nvbench_compare.md

* Small mention of plotting capabilities in nvbench_compare.md
* Call out that example requires shell with process substitution capabilities
This commit is contained in:
Oleksandr Pavlyk
2026-06-25 09:07:29 -05:00
parent d18706cc24
commit 10a5d1fcaa
3 changed files with 79 additions and 12 deletions

View File

@@ -2807,7 +2807,11 @@ def compare_benches(
comparison=comparison,
)
)
if plot:
if (
plot
and comparison.frac_diff is not None
and math.isfinite(comparison.frac_diff)
):
axis_label = format_axis_values(axis_values, axes, axis_filters)
if axis_label:
label = f"""{cmp_bench["name"]} | {axis_label}"""
@@ -3038,7 +3042,7 @@ def main() -> int:
dest="filter_actions",
action=OrderedBenchmarkFilterAction,
help=(
"Filter on axis value, e.g. -a Elements{io}=2^20. Applies to the "
"Filter on axis value, e.g. -a Elements{io}[pow2]=20. Applies to the "
"most recent --benchmark, or all benchmarks if specified before any "
"--benchmark arguments."
),